<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: GeSHi syntax-colorer per posar-li color al codi</title>
	<link>http://pof.eslack.org/blog/2005/11/28/geshi-syntax-colorer-per-posar-li-color-al-codi/</link>
	<description>pof HeadQuarters - Pau Oliva's blog</description>
	<pubDate>Fri, 16 May 2008 03:43:25 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.2</generator>

	<item>
		<title>by: pof</title>
		<link>http://pof.eslack.org/blog/2005/11/28/geshi-syntax-colorer-per-posar-li-color-al-codi/#comment-3275</link>
		<pubDate>Fri, 20 Jan 2006 02:38:13 +0000</pubDate>
		<guid>http://pof.eslack.org/blog/2005/11/28/geshi-syntax-colorer-per-posar-li-color-al-codi/#comment-3275</guid>
					<description>&lt;p&gt;Ja he fet que funcioni amb WP2, només calia canviar la prioritat a la funció &lt;tt&gt;add_filter&lt;/tt&gt; del plugin de 6 a 11 i afegir un &lt;tt&gt;strip_tags&lt;/tt&gt;, ha quedat així:&lt;/p&gt;
&lt;p&gt;&lt;code lang=&quot;php&quot;&gt;
[...]
$geshi = new GeSHi(strip_tags($codes[$i]['code']), $codes[$i]['lang'], ABSPATH.'/wp-content/plugins/geshi/');
[...]
add_filter('the_content', 'GeshiSyntaxColorer', 11);
add_filter('the_excerpt', 'GeshiSyntaxColorer', 11);
add_filter('comment_text', 'GeshiSyntaxColorer', 11);
&lt;/code&gt;&lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>Ja he fet que funcioni amb WP2, només calia canviar la prioritat a la funció <tt>add_filter</tt> del plugin de 6 a 11 i afegir un <tt>strip_tags</tt>, ha quedat així:</p>
<p><code>
<pre>&nbsp;
<span style="color: #66cc66;">&#91;</span>...<span style="color: #66cc66;">&#93;</span>
<span style="color: #0000ff;">$geshi</span> = <span style="color: #000000; font-weight: bold;">new</span> GeSHi<span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/strip_tags"><span style="color: #000066;">strip_tags</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$codes</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$i</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'code'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>, <span style="color: #0000ff;">$codes</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$i</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'lang'</span><span style="color: #66cc66;">&#93;</span>, ABSPATH.<span style="color: #ff0000;">'/wp-content/plugins/geshi/'</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#91;</span>...<span style="color: #66cc66;">&#93;</span>
add_filter<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'the_content'</span>, <span style="color: #ff0000;">'GeshiSyntaxColorer'</span>, <span style="color: #cc66cc;">11</span><span style="color: #66cc66;">&#41;</span>;
add_filter<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'the_excerpt'</span>, <span style="color: #ff0000;">'GeshiSyntaxColorer'</span>, <span style="color: #cc66cc;">11</span><span style="color: #66cc66;">&#41;</span>;
add_filter<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'comment_text'</span>, <span style="color: #ff0000;">'GeshiSyntaxColorer'</span>, <span style="color: #cc66cc;">11</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p></code></p>
]]></content:encoded>
				</item>
	<item>
		<title>by: pof</title>
		<link>http://pof.eslack.org/blog/2005/11/28/geshi-syntax-colorer-per-posar-li-color-al-codi/#comment-3274</link>
		<pubDate>Fri, 20 Jan 2006 02:13:50 +0000</pubDate>
		<guid>http://pof.eslack.org/blog/2005/11/28/geshi-syntax-colorer-per-posar-li-color-al-codi/#comment-3274</guid>
					<description>glups! després de l'upgrade a &lt;acronym title=&quot;WordPress 2.0&quot;&gt;WP2&lt;/acronym&gt; ha deixat de funcionar el plugin :(</description>
		<content:encoded><![CDATA[<p>glups! després de l&#8217;upgrade a <acronym title="WordPress 2.0">WP2</acronym> ha deixat de funcionar el plugin <img src='http://pof.eslack.org/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: pof</title>
		<link>http://pof.eslack.org/blog/2005/11/28/geshi-syntax-colorer-per-posar-li-color-al-codi/#comment-2636</link>
		<pubDate>Wed, 30 Nov 2005 23:39:38 +0000</pubDate>
		<guid>http://pof.eslack.org/blog/2005/11/28/geshi-syntax-colorer-per-posar-li-color-al-codi/#comment-2636</guid>
					<description>si, es poden fer funcions, els paràmetres son $1 $2... igual q si cridessis un script nou.</description>
		<content:encoded><![CDATA[<p>si, es poden fer funcions, els paràmetres son $1 $2&#8230; igual q si cridessis un script nou.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Dan</title>
		<link>http://pof.eslack.org/blog/2005/11/28/geshi-syntax-colorer-per-posar-li-color-al-codi/#comment-2635</link>
		<pubDate>Wed, 30 Nov 2005 22:05:37 +0000</pubDate>
		<guid>http://pof.eslack.org/blog/2005/11/28/geshi-syntax-colorer-per-posar-li-color-al-codi/#comment-2635</guid>
					<description>Uauu! Molt xulo! Fa temps ho vaig estar buscant, i vaig acabar pensant &lt;i&gt;deu ser impossible..&lt;/i&gt;

Per cert, es poden fer funcions en un shell script? Ara me n'entero... m'hauré de documentar millor :D</description>
		<content:encoded><![CDATA[<p>Uauu! Molt xulo! Fa temps ho vaig estar buscant, i vaig acabar pensant <i>deu ser impossible..</i></p>
<p>Per cert, es poden fer funcions en un shell script? Ara me n&#8217;entero&#8230; m&#8217;hauré de documentar millor <img src='http://pof.eslack.org/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: iolanda</title>
		<link>http://pof.eslack.org/blog/2005/11/28/geshi-syntax-colorer-per-posar-li-color-al-codi/#comment-2628</link>
		<pubDate>Tue, 29 Nov 2005 09:11:49 +0000</pubDate>
		<guid>http://pof.eslack.org/blog/2005/11/28/geshi-syntax-colorer-per-posar-li-color-al-codi/#comment-2628</guid>
					<description>Sip que queda curiós si. Fa molt més entenedor el codi. La font una mica petita pel meu gust. :P</description>
		<content:encoded><![CDATA[<p>Sip que queda curiós si. Fa molt més entenedor el codi. La font una mica petita pel meu gust. <img src='http://pof.eslack.org/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Marc</title>
		<link>http://pof.eslack.org/blog/2005/11/28/geshi-syntax-colorer-per-posar-li-color-al-codi/#comment-2622</link>
		<pubDate>Mon, 28 Nov 2005 22:14:41 +0000</pubDate>
		<guid>http://pof.eslack.org/blog/2005/11/28/geshi-syntax-colorer-per-posar-li-color-al-codi/#comment-2622</guid>
					<description>Uooo! Com mola. Ho poso a la cua del ToDo.</description>
		<content:encoded><![CDATA[<p>Uooo! Com mola. Ho poso a la cua del ToDo.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Juanjo</title>
		<link>http://pof.eslack.org/blog/2005/11/28/geshi-syntax-colorer-per-posar-li-color-al-codi/#comment-2620</link>
		<pubDate>Mon, 28 Nov 2005 21:01:27 +0000</pubDate>
		<guid>http://pof.eslack.org/blog/2005/11/28/geshi-syntax-colorer-per-posar-li-color-al-codi/#comment-2620</guid>
					<description>Oi que es maco? Encara que aquest fron negre que fas servir no queda masa be :D</description>
		<content:encoded><![CDATA[<p>Oi que es maco? Encara que aquest fron negre que fas servir no queda masa be <img src='http://pof.eslack.org/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Ivo Sandoval</title>
		<link>http://pof.eslack.org/blog/2005/11/28/geshi-syntax-colorer-per-posar-li-color-al-codi/#comment-2619</link>
		<pubDate>Mon, 28 Nov 2005 17:05:04 +0000</pubDate>
		<guid>http://pof.eslack.org/blog/2005/11/28/geshi-syntax-colorer-per-posar-li-color-al-codi/#comment-2619</guid>
					<description>Queda molt maco, li acabas de fer un :syntax on al teu tag pre ;)</description>
		<content:encoded><![CDATA[<p>Queda molt maco, li acabas de fer un :syntax on al teu tag pre <img src='http://pof.eslack.org/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
