<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[[Plugin] Nuovo plugin per categorie]]></title><description><![CDATA[<p dir="auto">Salve a tutti,</p>
<p dir="auto">ho creato il mio primo plugin e ve lo segnalo.</p>
<p dir="auto">Si tratta di <a href="http://www.centrostudilaruna.it/huginnemuninn/2007/07/17/plugin-per-wordpress-categories-autolink/" rel="nofollow ugc">Categories Autolink</a>. E' disponibile per il download.</p>
<p dir="auto">Fa una semplice operazione: linka automaticamente le categorie quando se ne cita il nome all'interno di un articolo o di una pagina.</p>
]]></description><link>https://dev.connect.gt/topic/41053/plugin-nuovo-plugin-per-categorie</link><generator>RSS for Node</generator><lastBuildDate>Thu, 26 Nov 2026 16:29:48 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/41053.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 18 Jul 2007 08:53:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [Plugin] Nuovo plugin per categorie on Sat, 04 Aug 2007 15:42:09 GMT]]></title><description><![CDATA[<p dir="auto">Scusate per il ritardo con cui rispondo (ero in vacanza...).</p>
<p dir="auto">Grazie mille a pixelate per la correzione (mi è sfuggita nel passaggio dalla versione 1.0 alla 1.01). Appena posso correggo anche nel file scaricabile.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/giorgio" aria-label="Profile: giorgio">@<bdi>giorgio</bdi></a>: scusa, non ho capito cosa intendi dire...</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gputignano" aria-label="Profile: gputignano">@<bdi>gputignano</bdi></a>: credo influisca positivamente per il fatto che i nomi delle categorie vengono linkati anche nei singoli articoli. Questo ha un effetto ulteriore, per esempio, se i tuoi post vengono ripubblicati altrove tramite feed o con l'xmlrpc.</p>
]]></description><link>https://dev.connect.gt/post/568703</link><guid isPermaLink="true">https://dev.connect.gt/post/568703</guid><dc:creator><![CDATA[runen]]></dc:creator><pubDate>Sat, 04 Aug 2007 15:42:09 GMT</pubDate></item><item><title><![CDATA[Reply to [Plugin] Nuovo plugin per categorie on Mon, 30 Jul 2007 17:33:01 GMT]]></title><description><![CDATA[<p dir="auto">Bel plugin, davvero utile, pensando di adottarlo sul mio wordpress-site, ho scoperto che c'è un piccolo errorino a livello di sintassi, o, se di errore non si tratta, a me proprio non andava.</p>
<p dir="auto">Comunque leggendo per bene il codice ho notato una cosa.</p>
<p dir="auto">L'errore si riscontra su questa riga , trattasi di virgola superflua:</p>
<pre><code class="language-php">&lt;?php
$categories = $wpdb-&gt;get_results("SELECT cat_ID, cat_name, FROM
</code></pre>
<p dir="auto">Mi sono permesso dunque di modificare il codice, ovviamente senza toccare in alcun modo i tuoi copyright e le licenze.<br />
Ecco il codice modificato per rendere funzionante il plugin per tutti coloro che avessero riscontrato il mio problema:</p>
<pre><code class="language-php">&lt;?php
function categories_autolink($text) 
{

/*
Plugin Name: Categories Autolink 
Version: 1.01
Plugin URI: http://www.centrostudilaruna.it/huginnemuninn/plugin-wordpress
Description: Wraps categories names in links
Author: Alberto Lombardo
Author URI: http://www.centrostudilaruna.it/huginnemuninn
Based on : Autolink by Chris Lynch http://www.planetofthepenguins.com
Copyright (c) 2007
Released under the GPL license
http://www.gnu.org/licenses/gpl.txt

    This file is part of WordPress.
    WordPress is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

/* Define the $wpdb to perform queries on the WP database */
global $wpdb;
/* Wrap spaces around the text - helps with regexp? */
$text = " $text ";
/* Set exceptions; will be developed in tollowing releases */
$exceptions = 'WHERE cat_name &lt;&gt; "Names"';
/* Load categories */
$categories = $wpdb-&gt;get_results("SELECT cat_ID, cat_name FROM $wpdb-&gt;categories");
/* Loop through links */
foreach ($categories as $categoria) 
{
/* create cat_urls */
$cat_urls = get_category_link($categoria-&gt;cat_ID);
/* Replace any instance of the cat_name with the cat_name wrapped in a HREF to link_url */
$text = preg_replace("|(?!&lt;[^&lt;&gt;]*?)(?&lt;![?./&amp;])\b$categoria-&gt;cat_name\b(?!:)(?![^&lt;&gt;]*?&gt;)|imsU","&lt;a href=\"$cat_urls\"&gt;$categoria-&gt;cat_name&lt;/a&gt;" , $text);
}
/* Trim extraneous spaces off and return */
return trim( $text );
}
add_filter('the_content', 'categories_autolink', 18);
?&gt;
</code></pre>
<p dir="auto">Saluti, e ancora complimenti per il plugin.</p>
]]></description><link>https://dev.connect.gt/post/568705</link><guid isPermaLink="true">https://dev.connect.gt/post/568705</guid><dc:creator><![CDATA[pixelate]]></dc:creator><pubDate>Mon, 30 Jul 2007 17:33:01 GMT</pubDate></item><item><title><![CDATA[Reply to [Plugin] Nuovo plugin per categorie on Mon, 30 Jul 2007 14:55:23 GMT]]></title><description><![CDATA[<p dir="auto">Volevo chiedere che vantaggio darebbe dal punto di vista SEO.</p>
]]></description><link>https://dev.connect.gt/post/568706</link><guid isPermaLink="true">https://dev.connect.gt/post/568706</guid><dc:creator><![CDATA[gputignano]]></dc:creator><pubDate>Mon, 30 Jul 2007 14:55:23 GMT</pubDate></item><item><title><![CDATA[Reply to [Plugin] Nuovo plugin per categorie on Tue, 24 Jul 2007 16:19:25 GMT]]></title><description><![CDATA[<p dir="auto">Bello, utile.</p>
<p dir="auto">Che ne pensi di espanderlo creando un Glossario?</p>
]]></description><link>https://dev.connect.gt/post/568700</link><guid isPermaLink="true">https://dev.connect.gt/post/568700</guid><dc:creator><![CDATA[giorgiotave]]></dc:creator><pubDate>Tue, 24 Jul 2007 16:19:25 GMT</pubDate></item><item><title><![CDATA[Reply to [Plugin] Nuovo plugin per categorie on Wed, 18 Jul 2007 14:25:40 GMT]]></title><description><![CDATA[<p dir="auto">Mi sembra ottimo <img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/android/1f604.png?v=12b9555a9a1" class="not-responsive emoji emoji-android emoji--smile" style="height:1.4em;width:auto;vertical-align:middle" title=":D" alt="😄" /></p>
]]></description><link>https://dev.connect.gt/post/568701</link><guid isPermaLink="true">https://dev.connect.gt/post/568701</guid><dc:creator><![CDATA[federiko]]></dc:creator><pubDate>Wed, 18 Jul 2007 14:25:40 GMT</pubDate></item></channel></rss>