<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>JaypeeOnline &#187; code</title> <atom:link href="http://jaypeeonline.net/tag/code/feed/" rel="self" type="application/rss+xml" /><link>http://jaypeeonline.net</link> <description>Technology, Blogging News, WordPress Theme and Plugin Reviews, Tips and Tricks</description> <lastBuildDate>Mon, 21 May 2012 03:17:06 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=</generator> <item><title>WP Plugin Review: Google Syntax Highlighter</title><link>http://jaypeeonline.net/wordpress-plugins/wp-plugin-review-google-syntax-highlighter/</link> <comments>http://jaypeeonline.net/wordpress-plugins/wp-plugin-review-google-syntax-highlighter/#comments</comments> <pubDate>Wed, 06 May 2009 05:52:28 +0000</pubDate> <dc:creator>Jaypee Habaradas</dc:creator> <category><![CDATA[WordPress Plugins]]></category> <category><![CDATA[code]]></category> <category><![CDATA[google syntax highlighter]]></category> <category><![CDATA[google syntax highlighter wordpress plugin]]></category> <category><![CDATA[hightlight]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[syntax]]></category> <category><![CDATA[wp-plugin]]></category><guid
isPermaLink="false">http://jaypeeonline.net/?p=3397</guid> <description><![CDATA[UPDATE: I&#8217;m no longer using this plugin, the Google Syntax Highlighter because as of this time it is not compatible with WordPress 2.8+. I&#8217;ll be posting about the new syntax highlighter WordPress plugin that I&#8217;m using so stay tuned for it. In my last blog update post, I listed the new WordPress plugins that I [...]]]></description> <content:encoded><![CDATA[<p><strong>UPDATE:</strong> I&#8217;m no longer using this plugin, the <strong>Google Syntax Highlighter</strong> because as of this time it is not compatible with WordPress 2.8+. I&#8217;ll be posting about the new syntax highlighter WordPress plugin that I&#8217;m using so stay tuned for it.</p><p>In my last <a
href="http://jaypeeonline.net/blog/blog-update-0309/">blog update</a> post, I listed the new <a
href="http://jaypeeonline.net/category/wordpress-plugins/">WordPress plugins</a> that I installed here on JaypeeOnline. I also mentioned that I would do a review of those plugins so you guys would have an idea on how they work and how I use them here.</p><p>Today, I&#8217;ll be sharing with you the <strong>Google Syntax Highlighter WordPress plugin</strong> created by <a
href="http://www.peterryan.net/">Peter Ryan</a>. It integrates the <a
href="http://code.google.com/p/syntaxhighlighter">Google Syntax Highlighter</a> by Alex Gorbatchev to any WordPress-powered blog. This is the plugin I use to display codes which you might have noticed in my recent articles like <a
href="http://jaypeeonline.net/tips-tricks/howto-allow-google-reader-access-to-hotlink-protected-images/">HowTo: Allow Google Reader Access To Hotlink-Protected Images</a> and <a
href="http://jaypeeonline.net/tips-tricks/howto-widgetize-a-wordpress-theme/">HowTo: Widgetize a WordPress Theme</a>.</p><p><strong>Features:</strong></p><ul><li>100% client side, no server dependency</li><li>Multiple languages support</li><li>Wide browser support</li><li>Very lightweight</li></ul><p><strong>Languages Supported:</strong></p><ul><li>C++  (cpp, c, c++)</li><li>C#  (c#, c-sharp, csharp)</li><li>CSS (css)</li><li>Delphi (delphi, pascal)</li><li>Java (java)</li><li>Java Script (js, jscript, javascript)</li><li>PHP (php)</li><li>Python (py, python)</li><li>Ruby (rb, ruby, rails, ror)</li><li>Sql (sql)</li><li>VB (vb, vb.net)</li><li>XML/HTML (xml, html, xhtml, xslt)</li></ul><p><strong>Screenshots:</strong></p><p><strong>.htaccess file</strong><br
/> <img
src="http://maxcdn.jaypeeonline.net/images/googlesyntaxhighlighter.png" alt="Google Syntax Highlighter Plugin" /></p><p><strong>WordPress theme sidebar</strong><br
/> <img
src="http://maxcdn.jaypeeonline.net/images/googlesyntaxhighlighter2.png" alt="Google Syntax Highlighter Plugin" /></p><p>Previously, when I wanted to display a piece of code within my post I would have to copy and paste the code into a text editor, take a screenshot, edit it and insert the image into my post. It was a tedious and very time consuming task.</p><p><strong>WordPress</strong> has a built-in tag called &#8220;<strong>code</strong>&#8221; that lets you display and specify a certain line of text as code. So why am I not using it? The problem with this is that it doesn&#8217;t recognize HTML tags and in order for it to work you&#8217;ll have to use <a
href="http://codex.wordpress.org/Fun_Character_Entities">character entities or extended characters</a>. One alternative is to use the &#8220;<strong>pre</strong>&#8221; tag which is the one used by the <strong>Google Syntax Highlighter plugin</strong>. The &#8220;pre&#8221; tag like the &#8220;code&#8221; tag displays the tagged text as <code>monospaced type</code> but the difference between the two is that the &#8220;pre&#8221; tag exactly reproduces everything inside the &#8220;pre&#8221; tags.</p><p>What makes Google Syntax Highlighter cool is that it displays the code the way advanced text editors do. The parameters are color coded and there are line numbers that makes it easy to find a specific line of code. Aside from that, the Google Syntax Highlighter plugin also gives the user an option to see the code in plain text and to copy the code into the computer&#8217;s clipboard. This plugin lets you implement the &#8220;pre&#8221; tag and display the code in style easily without having to worry about messing with the WordPress stylesheet.</p><p>So how do you use the <strong>Google Syntax Highlighter plugin</strong>? All you need to do is download, install and activate the plugin and make sure you read the <a
href="http://code.google.com/p/syntaxhighlighter/wiki/Usage">Usage Directions</a>. Then you can start using it. Just specify the code snippet in your blog post/page and you&#8217;re good to go.</p><p>Here&#8217;s a sample of how I was able to display the code for screenshot #2 or the code for the WordPress theme sidebar.</p><p>[php]<br
/> &lt;pre name=&quot;code&quot; class=&quot;php&quot;&gt;<br
/> &lt;?php<br
/> if ( function_exists(&#8216;register_sidebar&#8217;) )<br
/> register_sidebar(array(<br
/> &#8216;before_widget&#8217; =&gt; &#8221;,<br
/> &#8216;after_widget&#8217; =&gt; &#8221;,<br
/> &#8216;before_title&#8217; =&gt; &#8216;&lt;h4&gt;&#8217;,<br
/> &#8216;after_title&#8217; =&gt; &#8216;&lt;/h4&gt;&#8217;,<br
/> ));<br
/> ?&gt;<br
/> &lt;/pre&gt;<br
/> [/php]</p><p>Copy the piece of code that you want to display and paste it between the line highlighted in red. Replace the value of <strong>&#8220;class&#8221;</strong> to the specific language that the code is written in. In the example, I put php because I needed to display a piece of php code.</p><p>The <strong>Google Syntax Highlighter WordPress plugin</strong> is very easy to install and doesn&#8217;t use much resources. Its very useful if you want to display codes within your post.</p><p>Check out the <a
href="http://wordpress.org/extend/plugins/google-syntax-highlighter">Google Syntax Highlighter WordPress plugin</a>.</p><p>What do you think of the Google Syntax Highlighter WordPress plugin? Are you already using it or have tried it before on your blog? Do you know of other WordPress plugins that have the same functionality? Please share your thoughts. Thanks for your time!</p><div
id="crp_related"><ul><li><a
href="http://jaypeeonline.net/blog/blog-updates-08-09/" rel="bookmark" class="crp_title">Blog Updates 08.09</a></li><li><a
href="http://jaypeeonline.net/wordpress-plugins/google-plus-one-wordpress-plugin/" rel="bookmark" class="crp_title">Google +1 Button WordPress Plugin</a></li><li><a
href="http://jaypeeonline.net/blog/blog-update-0309/" rel="bookmark" class="crp_title">Blog Updates 03.09</a></li><li><a
href="http://jaypeeonline.net/blog/blog-updates-05-12/" rel="bookmark" class="crp_title">Blog Updates 05.12</a></li><li><a
href="http://jaypeeonline.net/tips-tricks/howto-widgetize-a-wordpress-theme/" rel="bookmark" class="crp_title">HowTo: Widgetize a WordPress Theme</a></li><li><a
href="http://jaypeeonline.net/wordpress-plugins/wp-plugin-review-theme-authenticity-checker/" rel="bookmark" class="crp_title">WP Plugin Review: TAC (Theme Authenticity Checker)</a></li><li><a
href="http://jaypeeonline.net/freeware/phpanywhere/" rel="bookmark" class="crp_title">PHPanywhere</a></li><li><a
href="http://jaypeeonline.net/wordpress-plugins/wmd-editor/" rel="bookmark" class="crp_title">WP Plugin Review: WMD Editor</a></li><li><a
href="http://jaypeeonline.net/wordpress-plugins/foursquare-integration-wordpress-plugin/" rel="bookmark" class="crp_title">Foursquare Integration WordPress Plugin</a></li><li><a
href="http://jaypeeonline.net/tips-tricks/howto-allow-google-reader-access-to-hotlink-protected-images/" rel="bookmark" class="crp_title">HowTo: Allow Google Reader Access To Hotlink-Protected Images</a></li></ul></div>]]></content:encoded> <wfw:commentRss>http://jaypeeonline.net/wordpress-plugins/wp-plugin-review-google-syntax-highlighter/feed/</wfw:commentRss> <slash:comments>19</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (User agent is rejected)
Database Caching 2/31 queries in 0.079 seconds using disk
Object Caching 525/579 objects using disk
Content Delivery Network via maxcdn.jaypeeonline.net

Served from: jaypeeonline.net @ 2012-05-25 17:31:56 -->
