<?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>Let&#039;s start again... &#187; Wordpress Plugin</title> <atom:link href="http://manchumahara.com/wordpress-plugin/feed/" rel="self" type="application/rss+xml" /><link>http://manchumahara.com</link> <description>&#34;Manchumahara&#34; ...... The virtual, crazy, vagabond and  an emotional stupid!</description> <lastBuildDate>Thu, 02 Feb 2012 13:47:24 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>WP Photo Album Plus Plus: WordPress Image Gallery</title><link>http://manchumahara.com/2010/08/28/wp-photo-album-plus-plus-wordpress-image-gallery/</link> <comments>http://manchumahara.com/2010/08/28/wp-photo-album-plus-plus-wordpress-image-gallery/#comments</comments> <pubDate>Sat, 28 Aug 2010 11:47:55 +0000</pubDate> <dc:creator>Manchumahara(Sabuj Kundu)</dc:creator> <category><![CDATA[wordpress]]></category> <category><![CDATA[Wordpress Plugin]]></category> <category><![CDATA[image gallery]]></category> <category><![CDATA[plugin]]></category><guid isPermaLink="false">http://manchumahara.com/?p=594</guid> <description><![CDATA[Most of the wordpress image gallery plugins can not make me happy. NExtgen is too much heavy, then I got another wordpress plugin &#8220;WP Photo Album Plus&#8221; developed by J.N. Breetvelt, a.k.a. (OpaJaap). R.J. Kaplan developed WP Photo Album 1.5.1 &#8230; <a href="http://manchumahara.com/2010/08/28/wp-photo-album-plus-plus-wordpress-image-gallery/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>Most of the wordpress image gallery plugins can not make me happy. NExtgen is too much heavy, then I got another wordpress plugin &#8220;<a href="http://wordpress.org/extend/plugins/wp-photo-album-plus/">WP Photo Album Plus</a>&#8221; developed by J.N. Breetvelt, a.k.a. <a href="http://www.opajaap.nl/"> (OpaJaap)</a>. R.J. Kaplan developed WP Photo Album 1.5.1 and then J.N. Breetvelt extended it with new features. Really I like this simple but powerfull gallery plugin. But something I didn&#8217;t like which I am trying to modify and releasing for every body so that I can get more ideas from other and even this modification can be done to main plugin too. <strong> Though my modification is not done yet! But why not I share my last modification and explain what I have done upto now <img src='http://manchumahara.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </strong><br /> <span id="more-594"></span><br /><dl id="attachment_595" class="wp-caption aligncenter" style="width: 645px"><dt><img class="size-full wp-image-595" title="gallery1" src="http://manchumahara.com/wp-content/uploads/2010/08/gallery1.png" alt="" width="635" height="209" /></dt><dd class="wp-caption-text">Gallerific image gallery with wp photo albumm plus plus</dd></dl></p><p><strong>Change in Backend:</strong></p><ul><li>Added pagination in backend for album listing</li><li>Added pagination in backend for file/image listing, sites having large amount of images in each gallery should like this feature.</li><li>Image will not list while edit any album. Better way to edit or view images for any album in backend.</li><li>Changed backend design a little for easy navigation to other options. More will be done.</li><li>Now thumb can be made squre so that it does&#8217;t look ugly and diff sizes</li><li>Added midium size thumb so that you can place image size that you want as big size but original one is always kept so that you can regenerate all thumbs again.</li></ul><p><strong>Change in Front end:</strong></p><ul><li>Replaced the old slideshow with  new slideshow using  jquery based image slideshow plugin <a href="http://www.twospy.com/galleriffic/" target="_blank">Galleriffic</a>. You may need to edit style if currrent setting doesn&#8217;t match your style. You can select black or white combination. Need to do more work though. Current <a href="http://www.twospy.com/galleriffic/example-5.html">gallerific style</a> is used.</li></ul><p><strong>Todo list:</strong></p><ul><li>So many things so don&#8217;t wana write so long list <img src='http://manchumahara.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /></li><li>One thing must to do for replaceing the normal regex based shortcode with wordpress default shortcode method to add gallery in a page.</li></ul><p>Note: There is a file embedded within this post, please visit this post to download the file.<br /> I am attaching the current modified version so that you can test and give me some feedback. If  any one need any jquery based custom slideshow with it let me know(to hire professionaly <img src='http://manchumahara.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )</p>Comment is open. You can participate in the discussion by visiting <a href='http://manchumahara.com/2010/08/28/wp-photo-album-plus-plus-wordpress-image-gallery/'>here</a> ]]></content:encoded> <wfw:commentRss>http://manchumahara.com/2010/08/28/wp-photo-album-plus-plus-wordpress-image-gallery/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Adding My posts sub menu for posts section in wordpress</title><link>http://manchumahara.com/2010/08/14/adding-my-posts-sub-menu-for-posts-section-in-wordpress/</link> <comments>http://manchumahara.com/2010/08/14/adding-my-posts-sub-menu-for-posts-section-in-wordpress/#comments</comments> <pubDate>Sat, 14 Aug 2010 11:59:23 +0000</pubDate> <dc:creator>Manchumahara(Sabuj Kundu)</dc:creator> <category><![CDATA[Tips and Tricks]]></category> <category><![CDATA[wordpress]]></category> <category><![CDATA[Wordpress Plugin]]></category> <category><![CDATA[hack]]></category><guid isPermaLink="false">http://manchumahara.com/?p=588</guid> <description><![CDATA[Let me explain the situation. Suppose you have contributor access to wordpress. If you go to posts page in admin panel that list all posts   and here you are not author of all posts.  you will see the url like &#8230; <a href="http://manchumahara.com/2010/08/14/adding-my-posts-sub-menu-for-posts-section-in-wordpress/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>Let me explain the situation. Suppose you have contributor access to wordpress. If you go to posts page in admin panel that list all posts   and here you are not author of all posts.  you will see the url like</p><pre class="brush: php; title: ; notranslate">edit.php?post_type=post&amp;all_posts=1</pre><p> and All( total post number here). There will be another menu named Mine(Current user post number). All link is default. So we can make nother submenu of posts in admin section for Mine link directly. Let me show you the few lines code.</p><pre class="brush: php; title: ; notranslate">add_action('admin_menu', 'manchu_myposts');
function manchu_myposts()
{
    if (function_exists('add_submenu_page'))
    {
		//$parent, $page_title, $menu_title, $access_level, $file, $function = ''
		add_submenu_page('edit.php','My Posts','My posts', 1, 'edit.php?post_type=post&amp;author='.get_current_user_id());
    }
}</pre><p>You can copy-paste  above code in your theme functions.php file and it will show a new sub menu in posts ectin as My posts. Multi user blog users can get easily link for his/her posts.<br /> <img src="http://manchumahara.com/wp-content/uploads/2010/08/myposts.png" alt="myposts" title="myposts" width="509" height="234" class="size-full wp-image-589" /><br /> it&#8217;s just a easy way to make personal posts link for any user have access at leas contributor. Access level 1  belongs to contributor..</p><p>Update: 15-09-2011</p><p>While working on a project I got a tips from stackoverflow wordpress site about showing only specific author&#8217;s posts in author mode.</p><pre class="brush: php; title: ; notranslate">
function cb_posts_for_current_author($query) {
     global $pagenow;

     if( 'edit.php' != $pagenow || !$query-&gt;is_admin )
     return $query;

     if( !current_user_can( 'manage_options' ) ) {
     global $user_ID;
     $query-&gt;set('author', $user_ID );
     }
     return $query;
}
add_filter('pre_get_posts', 'cb_posts_for_current_author');
</pre><p>thank you</p>Comment is open. You can participate in the discussion by visiting <a href='http://manchumahara.com/2010/08/14/adding-my-posts-sub-menu-for-posts-section-in-wordpress/'>here</a> ]]></content:encoded> <wfw:commentRss>http://manchumahara.com/2010/08/14/adding-my-posts-sub-menu-for-posts-section-in-wordpress/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>WP Plugin: webmasterkey</title><link>http://manchumahara.com/2010/02/01/wp-plugin-webmasterkey/</link> <comments>http://manchumahara.com/2010/02/01/wp-plugin-webmasterkey/#comments</comments> <pubDate>Mon, 01 Feb 2010 12:13:45 +0000</pubDate> <dc:creator>Manchumahara(Sabuj Kundu)</dc:creator> <category><![CDATA[wordpress]]></category> <category><![CDATA[Wordpress Plugin]]></category> <category><![CDATA[alex]]></category> <category><![CDATA[bing]]></category> <category><![CDATA[google]]></category> <category><![CDATA[search engine]]></category> <category><![CDATA[webmasterkey]]></category> <category><![CDATA[yahoo]]></category><guid isPermaLink="false">http://manchumahara.com/2010/02/01/wp-plugin-webmasterkey/</guid> <description><![CDATA[Webmasterkey is a wordpress plugin to add google, yahoo, bing, alexa site verification meta tag from admin. I think it will be handy for webmaster. Quick links for Google,Yahoo and Bing,Alexa webmaster tool Google Webmaster Yahoo Siteexplorer Bing/Live webmaster Alexa &#8230; <a href="http://manchumahara.com/2010/02/01/wp-plugin-webmasterkey/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>Webmasterkey is a wordpress plugin to add google, yahoo, bing, alexa  site verification meta tag from admin. I think it will be handy for webmaster.<br /> Quick links for Google,Yahoo and Bing,Alexa  webmaster tool</p><ul><li><a href="http://www.google.com/webmasters/" target="_blank">Google Webmaster</a></li><li><a href="https://siteexplorer.search.yahoo.com/" target="_blank">Yahoo Siteexplorer</a></li><li><a href="http://www.bing.com/webmaster" target="_blank">Bing/Live webmaster</a></li><li><a href="http://www.alexa.com/siteowners">Alexa Siteowners</a>(new)</li></ul><h4>how to collect meta tags</h4><p>I know max ppl are smart enough and can do it easily but some ppl are not mcuh technical and don no how to  upload file or add meta tag in theme file and where. so, to get google meta tag key go to <a href="http://www.google.com/webmasters/" target="_blank">Google Webmaster</a>, login using your google id and your site. See image bellow and check you will see something like this. Copy meta value (red underline in screenshot)<br /> <span id="more-424"></span><br /> <img class="size-full wp-image-426 aligncenter" title="meta" src="http://manchumahara.com/wp-content/uploads/2010/02/meta1.jpg" alt="" width="605" height="141" /></p><h4>Download</h4> Note: There is a file embedded within this post, please visit this post to download the file.<h4>Plugin installation</h4><ul><li>Download the zip</li><li>Unzip and install like any other plugin</li><li>Activate it</li><li>Go to <strong>&#8220;Setting -&gt; Webmaster key&#8221;</strong> and now paste your google meta tag code</li><li>Same way put yahoo and bing meta tag key and save, you are done!</li></ul><p><img class="alignleft size-full wp-image-427" title="webmasterkey" src="http://manchumahara.com/wp-content/uploads/2010/02/webmasterkey.jpg" alt="" width="578" height="357" /></p>Comment is open. You can participate in the discussion by visiting <a href='http://manchumahara.com/2010/02/01/wp-plugin-webmasterkey/'>here</a> ]]></content:encoded> <wfw:commentRss>http://manchumahara.com/2010/02/01/wp-plugin-webmasterkey/feed/</wfw:commentRss> <slash:comments>8</slash:comments> </item> <item><title>Download Category widget for WP-DownloadManager plugin</title><link>http://manchumahara.com/2010/01/27/download-category-widget-for-wp-downloadmanager-plugin/</link> <comments>http://manchumahara.com/2010/01/27/download-category-widget-for-wp-downloadmanager-plugin/#comments</comments> <pubDate>Wed, 27 Jan 2010 00:16:16 +0000</pubDate> <dc:creator>Manchumahara(Sabuj Kundu)</dc:creator> <category><![CDATA[wordpress]]></category> <category><![CDATA[Wordpress Plugin]]></category> <category><![CDATA[wordpres plugin]]></category> <category><![CDATA[wpdownload manager]]></category><guid isPermaLink="false">http://manchumahara.com/?p=422</guid> <description><![CDATA[I am using WP-DownloadManager plugin to manage downloads in my blog. It&#8217;s a very usefull plugin by Lester &#8216;GaMerZ&#8217; Chan. I think , He made the most important plugins for wp . He already wrote 17 wordpress plugins ! I &#8230; <a href="http://manchumahara.com/2010/01/27/download-category-widget-for-wp-downloadmanager-plugin/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>I am using <a rel="external nofollow" href="http://wordpress.org/extend/plugins/wp-downloadmanager/" target="_blank">WP-DownloadManager</a> plugin to manage downloads in my blog. It&#8217;s a very usefull plugin by <a rel="external nofollow" href="http://lesterchan.net/portfolio/programming/php/" target="_blank">Lester &#8216;GaMerZ&#8217; Chan</a>. I think , He made the most important plugins for wp <img src='http://manchumahara.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> . He already wrote 17 wordpress plugins ! I am a big fan of Lester Chan aka &#8216;GaMerZ&#8217; Chan and sometimes I try to get help from his plugin .. I mean how to wrote such nice and clean plugins&#8230;</p><p>Ok, I just checked that <a rel="external nofollow" href="http://wordpress.org/extend/plugins/wp-downloadmanager/" target="_blank">WP-DownloadManager</a> plugin can list category but with files in each. But I wanted something like a download category widgets and a list of download category (<em>just list of download category</em>). So I just wrote a plugin for <a rel="external nofollow" href="http://wordpress.org/extend/plugins/wp-downloadmanager/" target="_blank">WP-DownloadManager</a> plugin <img src='http://manchumahara.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> . It will allow you to put a widget in sidebar showing all the Download Category as list with files and hits count as soon as you can use short code  in post and pages. And this will make a download category list like bellow <img src='http://manchumahara.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br /><ul><li><a href="http://manchumahara.com/downloads/?dl_cat=2">Joomla Extensions( 10 Files,36,999 Hits)</a></li><li><a href="http://manchumahara.com/downloads/?dl_cat=3">Wordpress Plugins( 11 Files,11,831 Hits)</a></li><li><a href="http://manchumahara.com/downloads/?dl_cat=4">Phpbb Mods( 1 Files,6,418 Hits)</a></li><li><a href="http://manchumahara.com/downloads/?dl_cat=5">Projukti Kothon( 3 Files,6,223 Hits)</a></li><li><a href="http://manchumahara.com/downloads/?dl_cat=6">Personal( 3 Files,5,789 Hits)</a></li><li><a href="http://manchumahara.com/downloads/?dl_cat=7">Wordpress Themes( 1 Files,254 Hits)</a></li></ul><span id="more-422"></span></p><h4>Download</h4> Note: There is a file embedded within this post, please visit this post to download the file.<h4>Installation</h4><ul><li>Make sure that you installed the wp-downloadmanager plugin first !</li><li>Now, Install the plugin like any other plugin.</li></ul><h4>Shortcode/widget usage</h4><p>You can use as short code as well as widget. After installing visit your widget area from admin panel and  use &#8220;Download Categories&#8221; widget to place in sidebar. To use shortcode in post or pages, write in your post/pages editor in html mode<br /> <strong>page_download_cat</strong> and wrap this word in []   , you are done.</p><p>I just made a quick wrap of my needs and sharing with you. If you find any problem using this let me know. BTW, I am  using this plugin in my <a rel="follow internal" href="http://manchumahara.com/downloads/">download page</a> where you will get my other wordpress, joomla and phpbb plugins.<br /> Thank you.</p>Comment is open. You can participate in the discussion by visiting <a href='http://manchumahara.com/2010/01/27/download-category-widget-for-wp-downloadmanager-plugin/'>here</a> ]]></content:encoded> <wfw:commentRss>http://manchumahara.com/2010/01/27/download-category-widget-for-wp-downloadmanager-plugin/feed/</wfw:commentRss> <slash:comments>12</slash:comments> </item> <item><title>Tab/Sliders for wordpress posts/pages</title><link>http://manchumahara.com/2010/01/18/tabsliders-for-wordpress-postspages/</link> <comments>http://manchumahara.com/2010/01/18/tabsliders-for-wordpress-postspages/#comments</comments> <pubDate>Mon, 18 Jan 2010 12:13:19 +0000</pubDate> <dc:creator>Manchumahara(Sabuj Kundu)</dc:creator> <category><![CDATA[Wordpress Plugin]]></category> <category><![CDATA[slide]]></category> <category><![CDATA[tab]]></category> <category><![CDATA[wordpresplugin]]></category> <category><![CDATA[wordpress]]></category><guid isPermaLink="false">http://manchumahara.com/?p=420</guid> <description><![CDATA[Helo guys I am ready to show you a tab/slides plugin for wordpress. Let me tell u a tale. Once I did a site in joomla1.x for a client and that used the tab slides in content, a jooomla mambot &#8230; <a href="http://manchumahara.com/2010/01/18/tabsliders-for-wordpress-postspages/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>Helo guys I am ready to show you a tab/slides plugin for wordpress. Let me tell u a tale. Once I did a site in joomla1.x for a client and that used the tab slides in content, a jooomla mambot of <a rel="follow external" href="http://www.joomlaworks.gr/content/view/15/42/" target="_blank">joomlaworks.gr</a>. Somedays ago I made the same site in using wordpress and wordpress is better than joomla for blogging. So I needed to reuse the tabslide plugin for wordpress and I just converted that joomla mambot/plugin to wordpress plugin. I am releasing in same GPL licence and free. I think this will help some ppl to enable tab/slide in wordpress posts/pages.</p><p>Check live demo in <a rel="nofollow external" href="http://gdpnetwork.com" target="_blank">gdpnetwork.com</a> or u can give a try in your localhost <img src='http://manchumahara.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /><br /> <span id="more-420"></span><br /> <a href="http://manchumahara.com/wp-content/uploads/2010/01/Tab-Sliders-for-wordpress-posts-pages-Lets-start-again..._1263816986127.png"><img class="aligncenter size-full wp-image-421" title="Tab-Sliders" src="http://manchumahara.com/wp-content/uploads/2010/01/Tab-Sliders-for-wordpress-posts-pages-Lets-start-again..._1263816986127.png" alt="Tab-Sliders" width="586" height="355" /></a></p><h4>Usage:</h4><ul><li>Install the plugin and activate</li><li>Check there will be added a new menu in Settings</li><li>Go to <strong>Settings-&gt;JW TabSlides</strong></li><li>Check setting and change slider timer and speed as u need</li><li>Check Tab/Slide usage syntax bottom in setting page</li><li><strong>Special feature:</strong> On demand js, css loading, heh heh think smart.</li></ul><p><strong>Update: Syntax is given here as I disabled this plugin in my blog <img src='http://manchumahara.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </strong></p><pre class="brush: xml; title: ; notranslate">
Tab:

<div class="tabber" id="tab"><div class="tabbertab" title="First Tab"><h2><a name="advtab">First Tab</a></h2>
here some content
</div><div class="tabbertab" title=" Another tab"><h2><a name="advtab"> Another tab</a></h2>
I need some sleep
</div><div class="tabbertab" title="This is fun"><h2><a name="advtab">This is fun</a></h2>
I thi it will be fun for you
</div></div>

Slide:

<div class="jw_slidetitle" ><div class="jw_st_left" ><div class="jw_st_cont" > First slide</div></div></div><div class="jw_slide"><div>
Here is content for first slide
</div></div>
<div class="jw_slidetitle" ><div class="jw_st_left" ><div class="jw_st_cont" > 2nd slide</div></div></div><div class="jw_slide"><div>
This is fun too
</div></div>

Slides  in Tabs:

<div class="tabber" id="tab"><div class="tabbertab" title="First Tab"><h2><a name="advtab">First Tab</a></h2>
<div class="jw_slidetitle" ><div class="jw_st_left" ><div class="jw_st_cont" > First slide</div></div></div><div class="jw_slide"><div>
Here is content for first slide
</div></div>
<div class="jw_slidetitle" ><div class="jw_st_left" ><div class="jw_st_cont" > 2nd slide</div></div></div><div class="jw_slide"><div>
This is fun too
</div></div>
</div><div class="tabbertab" title=" Another tab"><h2><a name="advtab"> Another tab</a></h2>
I need some sleep
</div><div class="tabbertab" title="This is fun"><h2><a name="advtab">This is fun</a></h2>
<div class="jw_slidetitle" ><div class="jw_st_left" ><div class="jw_st_cont" >Mu ha ha</div></div></div><div class="jw_slide"><div>
Here is content for first slide
</div></div>
<div class="jw_slidetitle" ><div class="jw_st_left" ><div class="jw_st_cont" > This is done</div></div></div><div class="jw_slide"><div>
This is fun too
</div></div>
</div></div>
</pre><h4>Download:</h4> Note: There is a file embedded within this post, please visit this post to download the file.<p>hei don&#8217;t forget to click social bookmark if you like this and I like donation which will help me to give time for development of open source works. thank you checking&#8230;</p>Comment is open. You can participate in the discussion by visiting <a href='http://manchumahara.com/2010/01/18/tabsliders-for-wordpress-postspages/'>here</a> ]]></content:encoded> <wfw:commentRss>http://manchumahara.com/2010/01/18/tabsliders-for-wordpress-postspages/feed/</wfw:commentRss> <slash:comments>36</slash:comments> </item> <item><title>Fix wordpress plugin &#8220;GT post approval&#8221;</title><link>http://manchumahara.com/2009/12/29/fix-wordpress-plugin-gt-post-approval/</link> <comments>http://manchumahara.com/2009/12/29/fix-wordpress-plugin-gt-post-approval/#comments</comments> <pubDate>Tue, 29 Dec 2009 07:53:08 +0000</pubDate> <dc:creator>Manchumahara(Sabuj Kundu)</dc:creator> <category><![CDATA[Tips and Tricks]]></category> <category><![CDATA[wordpress]]></category> <category><![CDATA[Wordpress Plugin]]></category> <category><![CDATA[plugin]]></category> <category><![CDATA[wordpres plugin]]></category> <category><![CDATA[wp custom column]]></category><guid isPermaLink="false">http://manchumahara.com/2009/12/29/fix-wordpress-plugin-gt-post-approval/</guid> <description><![CDATA[Hello! 2010 is just knocking at door .Hope to write lots of blog with my day2day thinking, learning and the problems I face every day. Let me clear about this blog post: I think, you know that in wordpress we &#8230; <a href="http://manchumahara.com/2009/12/29/fix-wordpress-plugin-gt-post-approval/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>Hello! 2010 is just knocking at door <img src='http://manchumahara.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> .Hope to write lots of blog with my day2day thinking, learning and the problems I face every day.</p><p>Let me clear about this blog post: I think, you know that in wordpress we can add new coasdl in posts listing area. Check the bellow image of my post edit panel/listing(http://(yoursitename)/wp-admin/edit.php)<br /> <span id="more-413"></span><br /> <img class="aligncenter size-full wp-image-411" title="editpanel1" src="http://manchumahara.com/wp-content/uploads/2009/12/editpanel1.png" alt="" width="395" height="247" /></p><p>If you check the plugin there is an extra col named GT Status. It&#8217;s here because I have installed the plugin <a rel="external nofollow" href="http://www.gt-globalwarming-awareness2007.org/wordpress/gt-post-approval-for-gt-globalwarming-awareness2007-wordpress-plugin/" target="_blank">GT-post-approval</a>. Check this in wordpress plugin repository from <a rel="external nofollow" href="http://wordpress.org/extend/plugins/gt-post-approval/" target="_blank">here</a>. Cool na ?  Let me show another screenshot after enabling another nice plugin named &#8220;<a rel="external nofollow" href="http://sivel.net/wordpress/simply-show-ids/" target="_blank">Simply Show IDs&#8221;</a>. Check that plugin wordpress plugin repository from <a rel="external nofollow" href="http://wordpress.org/extend/plugins/simply-show-ids/" target="_blank">here</a>. This plugin will add another extra col to show any post id so that we(at least normal blog user who doesn&#8217;t know how to pick post id) can  pick post id easily. Actually this plugin does</p><blockquote><p>&#8220;Simply shows the ID of Posts, Pages, Media, Links, Categories, Tags and Users in the admin tables for easy access. Very lightweight.&#8221;</p></blockquote><p><img class="aligncenter size-full wp-image-412" title="editpanel2" src="http://manchumahara.com/wp-content/uploads/2009/12/editpanel2.png" alt="" width="481" height="219" />Check there are two extra col now.. ignore the blug arrow and messed up id with text &#8220;Reject&#8221;. Let me now explain why this messed up&#8230;<br /></p><h4>Conflict between &#8220;GT-post-approval&#8221; and &#8220;Simply show ids&#8221;</h4><p>Actually it&#8217;s not conflict but bug og gt-post-approval plugin(<em>latest Version: 0.3 b0.3</em>). let me show how it&#8217;s hooking the post edit extra col. check near line 113.</p><pre class="brush: php; title: ; notranslate">
// If current user is admin or editor
		if(current_user_can('edit_others_posts')){

			// Add the GT Status column
			add_filter('manage_posts_columns', 'gt_column');

			// Set the global array with the structure post_ID =&gt; gt_status, ...
			add_filter('the_posts', 'gt_post2status');

			// For each post in edit.php add a button approve/reject
			add_filter('manage_posts_custom_column', 'gt_return_status');

			// Add a CSS to emphasize the button approve
			add_filter('admin_head', 'gt_emphasize_to_aprove');
</pre><p>here I will highlight this filter function</p><pre class="brush: plain; title: ; notranslate">
// For each post in edit.php add a button approve/reject
add_filter('manage_posts_custom_column', 'gt_return_status');
</pre><p>Before I advance please in wordpress codex about <a rel="external nofollow" href="http://codex.wordpress.org/Function_Reference/add_filter" target="_blank">add_filter</a> and manage_posts_custom_column(no complete codex page yet but see <a rel="external nofollow" href="http://codex.wordpress.org/Plugin_API/Filter_Reference" target="_blank">this page</a> for all filter/hook functions)<br /> add_filter usage is like</p><pre class="brush: php; title: ; notranslate">
&lt;?php add_filter( $tag, $function_to_add, $priority, $accepted_args ); ?&gt;
</pre><p>check the last param $accepted_args. it&#8217;s definition is<br /> <em>(integer) (optional) The number of arguments the function(s) accept(s). In WordPress 1.5.1 and newer. hooked functions can take extra arguments that are set when the matching do_action() or apply_filters() call is run.<br /> Default: 1</em></p><p>So using this filter add_filter(&#8216;manage_posts_custom_column&#8217;, &#8216;gt_return_status&#8217;);   gt approve passed only one argument. But the hook manage_posts_custom_column action  takes two parameter , column name and post id. here is gt approve plugin&#8217;s gt-return_status function</p><pre class="brush: plain; title: ; notranslate">
// Print a button approve/reject for the current post
function gt_return_status(){
	global $id, $post_gt_aproved;

	// If current post is approved (see gt_post2status() function)
	if($post_gt_aproved[$id])
		echo &quot;&lt;a href='edit.php?gt_reject=$id&amp;amp;$_SERVER[QUERY_STRING]' class='edit'&gt;&quot;.__('Reject').'&lt;/a&gt;';
		// Note: I use also the query string for an easy redirect in the gt_redirect_after_change() function
	else
		echo &quot;&lt;a href='edit.php?gt_approve=$id&amp;amp;$_SERVER[QUERY_STRING]' class='edit gtaprove'&gt;&quot;.__('Approve').'&lt;/a&gt;';
}
</pre><p>that means it&#8217;s doesn&#8217;t handle with column name and this function is called each time an unknown column is triggered and messed up with other plugin which works with extra column &#8230;. grrr. The funny thing is that plugin I mean the function gt_return_status() handle the post id in tricky way&#8230;. Please don&#8217;t get me wrong.. that plugin works great and prefectly but I am just trying to improve it.</p><p>This is how i modified that plugin<br /> changing hook so that it takes two parameter and also priority is set</p><pre class="brush: php; title: ; notranslate">
// For each post in edit.php add a button approve/reject
add_filter('manage_posts_custom_column', 'gt_return_status',10, 2);

function gt_return_status($cname,$id){
	global $post_gt_aproved;
	if ($cname == 'gt_column'){
		// If current post is approved (see gt_post2status() function)
		if($post_gt_aproved[$id]){
			echo '&lt;a href=&quot;edit.php?gt_reject='.$id.'&amp;amp;'.$_SERVER['QUERY_STRING'].'&quot; class=&quot;edit&quot;&gt;'.__('Reject').'&lt;/a&gt;';
			// Note: I use also the query string for an easy redirect in the gt_redirect_after_change() function
		}
		else{
			echo '&lt;a href=&quot;edit.php?gt_approve='.$id.'&amp;amp;'.$_SERVER['QUERY_STRING'].'&quot; class=&quot;edit gtaprove&quot;&gt;'.__('Approve').'&lt;/a&gt;';

		}
	}
}
</pre><p>Here is my total modification about this plugin.</p><pre class="brush: plain; title: ; notranslate">
&lt;?php
/*
Plugin Name: GT Post Approval 0.3 Beta
Plugin URI: http://www.gt-globalwarming-awareness2007.org/wordpress/gt-post-approval-for-gt-globalwarming-awareness2007-wordpress-plugin/
Description: Add Approve/Reject buttoms visible just for administrators and editors in &lt;a href='edit.php'&gt;edit &gt; posts&lt;/a&gt;. Go to &lt;a href='options-general.php?page=gt-post-approval.php'&gt;Options &gt; Approval&lt;/a&gt; to choose where display not approved posts
Version: 0.3 b0.3
Author: Francesco Terenzani
Author URI: http://www.terenzani.it/
*/

//
// Self extension
//

if(function_exists('is_tag'))
	add_filter('gt_areas', 'gt_self_extension');

function gt_self_extension($array){
	$array['is_tag'] = 'Tags archive';
	return $array;
}

//
// Installation
//

// On activation of the plugin launch the install_gt_post_approval function below
register_activation_hook(__FILE__, 'install_gt_post_approval');

// Change the wp_posts table
function install_gt_post_approval(){
	global $wpdb;
	// If gt_status column do not exist
	if($wpdb-&gt;get_var(&quot;SHOW COLUMNS FROM $wpdb-&gt;posts LIKE 'gt_status'&quot;) != 'gt_status'){

		// Step 1, add gt_status column and set every post as approved (value 1)
		$wpdb-&gt;query(&quot;ALTER TABLE $wpdb-&gt;posts ADD gt_status INT( 1 ) NOT NULL DEFAULT '1'&quot;);

		// Step 2, change the default value of gt_status. New posts have to be approved
		$wpdb-&gt;query(&quot;ALTER TABLE $wpdb-&gt;posts CHANGE gt_status gt_status INT( 1 ) NOT NULL DEFAULT '0'&quot;);
	}
	// Unhelpful optiomisation <img src='http://manchumahara.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />
	add_option('gt_opt', 'empty', '', 'no');

	// Set default options
	$_POST['gt-form'] = true;
	$_POST['is_'] = array('is_author' =&gt; true, 'is_search' =&gt; true, 'is_single' =&gt; true);
	$_POST['gt-level'] = 10;
	gt_save_options();
}

//
// The_Loop
//

// Change the where clause from the wp_query class using the show_only_gt_approved function below
add_filter('posts_where', 'show_only_gt_approved');

// Show only GT Approved posts
// Disable the filter in admin area, in single page and in user defined areas
function show_only_gt_approved($where){
	if(is_admin() || is_page() || is_custom_defined() )
		return $where;
	return 'AND gt_status = 1 '.$where;
}
// Return true if we are in a user defined page of wordpress
// I feel this function very cool <img src='http://manchumahara.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />
function is_custom_defined(){
	$callback = get_option('gt_opt_callback');
	if(is_array($callback)){
		do
			if(call_user_func(current($callback)))
				return true;

		while(next($callback));
	}
	return false;
}

//
// Optimisation
//

// Set the global array $post_gt_aproved with the structure: [post_ID] =&gt; gt_status
// I use it to know the gt_status without any other query
function gt_post2status($post_query_results){
	global $post_gt_aproved;

	$post_gt_aproved = array();

	for($i = 0, $j = count($post_query_results); $i &lt; $j; $i++)
		$post_gt_aproved[$post_query_results[$i]-&gt;ID] = $post_query_results[$i]-&gt;gt_status;

	return $post_query_results;
}

//
// Administration
//

// Change the admin area wp-admin/edit.php if current user is admin or editor
if(is_admin()){
	add_filter('init', 'gt_admin_status');

	function gt_admin_status(){
		global $wpdb;
		// If current user is admin or editor
		if(current_user_can('edit_others_posts')){

			// Add the GT Status column
			add_filter('manage_posts_columns', 'gt_column');

			// Set the global array with the structure post_ID =&gt; gt_status, ...
			add_filter('the_posts', 'gt_post2status');

			// For each post in edit.php add a button approve/reject
			add_filter('manage_posts_custom_column', 'gt_return_status',10, 2);

			// Add a CSS to emphasize the button approve
			add_filter('admin_head', 'gt_emphasize_to_aprove');

			// On click of approve/reject change the status in the database (value 1 -&gt; approved/0 -&gt; rejected)
			if(isset($_GET['gt_reject']) &amp;&amp; is_numeric($_GET['gt_reject'])){
				$wpdb-&gt;query(&quot;UPDATE $wpdb-&gt;posts SET gt_status = 0 WHERE ID = $_GET[gt_reject]&quot;);
				gt_redirect_after_change();
			}
			elseif(isset($_GET['gt_approve']) &amp;&amp; is_numeric($_GET['gt_approve'])){
				$wpdb-&gt;query(&quot;UPDATE $wpdb-&gt;posts SET gt_status = 1 WHERE ID = $_GET[gt_approve]&quot;);
				gt_redirect_after_change();
			}

		}
		// Auto approve a post if current user level is greater then X
		add_filter('wp_insert_post', 'gt_auto_approve');
	}
}

// Add the GT Status column
function gt_column($array){
	$array['gt_column'] = _('Post Status');
	return $array;
}
// Action function arguments: column name, post ID.
// Print a button approve/reject for the current post

function gt_return_status($cname,$id){
	global $post_gt_aproved;
	if ($cname == 'gt_column'){
		// If current post is approved (see gt_post2status() function)
		if($post_gt_aproved[$id]){
			echo '&lt;a href=&quot;edit.php?gt_reject='.$id.'&amp;amp;'.$_SERVER['QUERY_STRING'].'&quot; class=&quot;edit&quot;&gt;'.__('Reject').'&lt;/a&gt;';
			// Note: I use also the query string for an easy redirect in the gt_redirect_after_change() function
		}
		else{
			echo '&lt;a href=&quot;edit.php?gt_approve='.$id.'&amp;amp;'.$_SERVER['QUERY_STRING'].'&quot; class=&quot;edit gtaprove&quot;&gt;'.__('Approve').'&lt;/a&gt;';

		}
	}
}

// Redirect after change GT Status
function gt_redirect_after_change(){
	header('Location: '.preg_replace(&quot;/gt_(?:reject|approve)=[0-9]+[&amp;]?/&quot;, '', $_SERVER['REQUEST_URI']));
	exit();
}

// CSS for admin area
function gt_emphasize_to_aprove(){
?&gt;
	&lt;style type='text/css'&gt;.gtaprove{background:#adf;font-weight:bold}&lt;/style&gt;
&lt;?php
}

// Auto approve a post if current user level is greater then X
function gt_auto_approve($post_id){
	global $wpdb;
	if($_POST['post_status'] == 'publish' &amp;&amp; $_POST['prev_status'] != $_POST['post_status']){
		$level = get_option('gt_opt');
		$level = $level['gt-level'];
		if($level &gt; 0)
			if(current_user_can(&quot;level_$level&quot;))
				$wpdb-&gt;query(&quot;UPDATE $wpdb-&gt;posts SET gt_status = 1 WHERE ID = $post_id&quot;);
	}
}

//
// Options
//

function gt_add_options_page(){
	add_options_page('GT Post Approval', 'Approval', 10, 'gt-post-approval.php', 'gt_options_page');
}

add_filter('admin_menu','gt_add_options_page');

function gt_options_page(){

	// On submit save options
	gt_save_options();

	$options = get_option('gt_opt');

	// Options checked are here
	$checked =&amp; $options['is_'];

	$registered_inputs = gt_get_registered_options();

?&gt;
	&lt;div class=&quot;wrap&quot;&gt;
		&lt;h2&gt;GT Post Approval&lt;/h2&gt;
		&lt;form method='post' action='?&lt;?php echo $_SERVER['QUERY_STRING']?&gt;'&gt;
		&lt;fieldset class=&quot;options&quot;&gt;

			&lt;legend&gt;Not approved posts are visible just in: &lt;/legend&gt;

			&lt;?php foreach($registered_inputs as $input_name =&gt; $description){

				$checked[$input_name] = ($checked[$input_name]) ? 'checked=&quot;checked&quot;' : null;

				echo &lt;&lt;&lt;CODE
					&lt;p&gt;
						&lt;label for=&quot;is_[$input_name]&quot;&gt;
							&lt;input type='checkbox' id=&quot;is_[$input_name]&quot; name=&quot;is_[$input_name]&quot; $checked[$input_name] /&gt; $description
						&lt;/label&gt;
					&lt;/p&gt;
CODE;
			} ?&gt;

		&lt;/fieldset&gt;

		&lt;fieldset class=&quot;options&quot;&gt;

			&lt;legend&gt;Auto approve posts if current user level is: &lt;/legend&gt;

			&lt;p&gt;&lt;label for='gt-level'&gt;Range 0-10:
				&lt;input type=&quot;text&quot; size='2' id='gt-level' name='gt-level' value='&lt;?php echo $options['gt-level'] ?&gt;' /&gt;&lt;/label&gt;
				&lt;br /&gt;&lt;em&gt;0 or empty value to reject every post by default.&lt;/em&gt;&lt;/p&gt;

			&lt;p class='submit'&gt;
				&lt;input type='submit' name='gt-form' value='Update Options &amp;raquo;' /&gt;
				&lt;input type='hidden' name='gt-form' value='1' /&gt;
			&lt;/p&gt;

		&lt;/fieldset&gt;

		&lt;/form&gt;
	&lt;/div&gt;

&lt;?php
}

function gt_save_options(){

	if(isset($_POST['gt-form'])){

		$registered_callbacks = gt_get_registered_options();

		if(is_array($_POST['is_']))
			foreach($_POST['is_'] as $is_what =&gt; $on)
				if($on &amp;&amp; $registered_callbacks[$is_what])
					// I will run this functions in is_custom_defined()
					$callback[] = $is_what;

		update_option( 'gt_opt_callback', $callback );
		update_option( 'gt_opt', array( 'is_' =&gt; $_POST['is_'], 'gt-level' =&gt; gt_get_option_level() ) );
	}
}

function gt_get_registered_options(){
	return apply_filters('gt_areas', array ('is_author' =&gt; 'Author\'s archive', 'is_search' =&gt; 'Search results', 'is_feed' =&gt; 'Feeds', 'is_date' =&gt; 'Post per data archive', 'is_single' =&gt; 'Single post page'));
}

function gt_get_option_level(){
	if( is_numeric( $_POST['gt-level']) ){
		if ( $_POST['gt-level'] &gt; 10 )
			return 10;
		if ( $_POST['gt-level'] &lt; 0 )
			return 0;
		return $_POST['gt-level'];
	}
	return 0;
}
?&gt;
</pre><p>Here you will get a great discussion about managing custom column in post edit screen. <a rel="external nofollow" href="http://scompt.com/blog/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen" target="_blank">have a look please</a>.</p><p>Good news I am coming with my own plugin about this concept of custom column in diff edit screen like posts, pages, tags etc. I think my plugin will increase usability in those places.</p>Comment is open. You can participate in the discussion by visiting <a href='http://manchumahara.com/2009/12/29/fix-wordpress-plugin-gt-post-approval/'>here</a> ]]></content:encoded> <wfw:commentRss>http://manchumahara.com/2009/12/29/fix-wordpress-plugin-gt-post-approval/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Fix wp plugin &#8220;Post and Page Excerpt Widgets&#8221; not to break conditional tag</title><link>http://manchumahara.com/2009/12/25/fix-wp-plugin-post-and-page-excerpt-widgets-not-to-break-conditional-tag/</link> <comments>http://manchumahara.com/2009/12/25/fix-wp-plugin-post-and-page-excerpt-widgets-not-to-break-conditional-tag/#comments</comments> <pubDate>Fri, 25 Dec 2009 07:53:52 +0000</pubDate> <dc:creator>Manchumahara(Sabuj Kundu)</dc:creator> <category><![CDATA[Tips and Tricks]]></category> <category><![CDATA[wordpress]]></category> <category><![CDATA[Wordpress Plugin]]></category> <category><![CDATA[query_posts]]></category> <category><![CDATA[widget]]></category><guid isPermaLink="false">http://manchumahara.com/2009/12/25/fix-wp-plugin-post-and-page-excerpt-widgets-not-to-break-conditional-tag/</guid> <description><![CDATA[Post and Page Excerpt Widgets is a nice plugin to show post/page excerpt as as widget in sidebar position. You can download it from wp code from here. One I thing I noticed about this plugin is it has a &#8230; <a href="http://manchumahara.com/2009/12/25/fix-wp-plugin-post-and-page-excerpt-widgets-not-to-break-conditional-tag/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p><a rel="external nofollow" href="http://sillybean.net/code/wordpress/post-and-page-excerpt-widgets/" target="_blank">Post and Page Excerpt Widgets</a> is a nice plugin to show post/page excerpt as as widget in sidebar position. You can download it from wp code from <a rel="external nofollow" href="http://wordpress.org/extend/plugins/post-and-page-excerpt-widgets/" target="_blank">here</a>. One I thing I noticed about this plugin is it has a common bug that I faced many times while using <a rel="external nofollow" href="http://codex.wordpress.org/Template_Tags/query_posts" target="_blank">query_posts</a>. When I use this query_posts it&#8217;s break some conditional loop like is_home(), is_category() etc but there is another function <a rel="external nofollow" href="http://codex.wordpress.org/Template_Tags/get_posts" target="_blank">get_posts</a> in wordpress that does the same thing but don&#8217;t have similar problem. Once I discussed about this problem in one of my old posts. Please check that posts for better sense from here <a rel="internal follow" href="http://manchumahara.com/2009/03/15/is_home-is_single-is_category-is-not-working-in-wp/" target="_blank">is_home-is_single-is_category-is-not-working-in-wp!</a>.</p><p>Let me focus to this writing again <img src='http://manchumahara.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br /> As Post and Page Excerpt Widgets is using the query_posts function for custom query it make&#8217;s problem for conditional tags. Let me show u solution and it&#8217;s like my that posts.<br /> In you theme functions.php add a new function if not exists yet</p><p><span id="more-405"></span></p><pre class="brush: php; title: ; notranslate">
 function php4_clone($object) {
  	if (version_compare(phpversion(), '5.0') &lt; 0) {
   		return $object;
  	} else {
   		return @clone($object);
  	}
 }
</pre><p></p><p>Now open the plugin file page-and-post-excerpt-widgets.php  and search for string &#8220;query_posts&#8221;. I think you should find matching in two places. Let&#8217;s take care of them now.<br /> before that line 		query_posts(&#8216;page_id=&#8217;.$page_ID);<br /> add this line</p><pre class="brush: php; title: ; notranslate">
$query_backup = php4_clone($GLOBALS['wp_query']);
</pre><p>and after the while look that means<br /> after this line endwhile;  add</p><pre class="brush: php; title: ; notranslate">
$GLOBALS['wp_query'] = $query_backup;
</pre><p>Do same thing for both matching. That will save u for not breaking any conditional tags like is_home() etc in your theme. I think wordpress should include such seucurity in core query_posts function so that it does not break the default wordpress&#8217;s <a rel="external nofollow" href="http://codex.wordpress.org/The_Loop" target="_blank"><strong>The Loop</strong></a>.</p><p>Sometimes I can not find that why <a rel="external nofollow" href="http://codex.wordpress.org/Conditional_Tags" target="_blank">wordpress conditional tag</a> is not working in my theme and that makes me really crazy !</p><p>Guys if you find this post help full then please take care the large social bookmark icon bellow <img src='http://manchumahara.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /></p>Comment is open. You can participate in the discussion by visiting <a href='http://manchumahara.com/2009/12/25/fix-wp-plugin-post-and-page-excerpt-widgets-not-to-break-conditional-tag/'>here</a> ]]></content:encoded> <wfw:commentRss>http://manchumahara.com/2009/12/25/fix-wp-plugin-post-and-page-excerpt-widgets-not-to-break-conditional-tag/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>ওয়ার্ড প্রেস টিপ্স২</title><link>http://manchumahara.com/2009/09/06/wordpresstips2/</link> <comments>http://manchumahara.com/2009/09/06/wordpresstips2/#comments</comments> <pubDate>Sun, 06 Sep 2009 03:22:26 +0000</pubDate> <dc:creator>Manchumahara(Sabuj Kundu)</dc:creator> <category><![CDATA[Bangla Blogs]]></category> <category><![CDATA[Tips and Tricks]]></category> <category><![CDATA[wordpress]]></category> <category><![CDATA[Wordpress Plugin]]></category> <category><![CDATA[Wordpress Themes]]></category> <category><![CDATA[wp tips]]></category><guid isPermaLink="false">http://manchumahara.com/2009/09/06/%e0%a6%93%e0%a7%9f%e0%a6%be%e0%a6%b0%e0%a7%8d%e0%a6%a1-%e0%a6%aa%e0%a7%8d%e0%a6%b0%e0%a7%87%e0%a6%b8-%e0%a6%9f%e0%a6%bf%e0%a6%aa%e0%a7%8d%e0%a6%b8%e0%a7%a8-2/</guid> <description><![CDATA[গতকাল ওয়ার্ড প্রেস নিয়ে লিখেছিলাম এই টপিকে এবং আমার ব্লগে এখানে। আজকে আবার নতুন কিছু নিয়ে লিখবো ,সাথে সাথে গতকালের ধারবাহিকতা চলবে। আমরা এই সিরিজের মূল উদ্দেশ্য ওয়ার্ড প্রেসের নরমাল ইউজার থেকে শুরু করা ওয়ার্ড প্রেস বেসড ওয়েব ডেভেলপার সবার &#8230; <a href="http://manchumahara.com/2009/09/06/wordpresstips2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>গতকাল ওয়ার্ড প্রেস নিয়ে লিখেছিলাম এই <a href="http://forum.amaderprojukti.com/viewtopic.php?f=60&amp;t=4264">টপিকে</a> এবং আমার ব্লগে <a href="http://manchumahara.com/2009/09/05/wordpresstips1/">এখানে</a>। আজকে আবার নতুন কিছু নিয়ে লিখবো ,সাথে সাথে গতকালের ধারবাহিকতা চলবে। আমরা এই সিরিজের মূল উদ্দেশ্য ওয়ার্ড প্রেসের নরমাল ইউজার থেকে শুরু করা ওয়ার্ড প্রেস বেসড ওয়েব ডেভেলপার সবার জন্য আমার জানা ট্রিক্স ও তথ্যগুলো শেয়ার করাঃ<br /> তিনঃ &#8216;থীমে সাব থীম ফাইল যুক্ত করা&#8217;</p><p>আগের দিন বলেছিলাম কিভাবে নতুন হেডার ফাইল যুক্ত করা যায়। চাইলে নিচের মতো করেও আমরা নতুন ফাইল থীমের যে কোন জায়গায় যুক্ত করতে পারি। কারণ একই ফাইলে অনেক কিছু লিখলে ট্রাক রাখা সমস্যা হয়।</p><pre class="brush: php; title: ; notranslate">&lt; ?php include (TEMPLATEPATH . '/yourfilename.php'); ?&gt;</pre><p>yourfilename.php নামের ফাইলটি আপনার বর্তমান এক্টিভ বা যে থীম নিয়ে কাজ করছেন তার ভেতর রাখুন। আর অন্য থীম ফাইলের যেখানে দরকার সেখানে ব্যবহার করুন। TEMPLATEPATH আপনার বর্তমান থীমের ডিরেক্টরী। প্রশ্ন করতে পারেন এমন ঝামেলা কেন করবো বা এটার সুবিধা কি তাই তো ? হুম&#8230; ওয়ার্ড প্রেস দিয়েই আপনি চাইলে জুমলার মতো সাইটে বানিয়ে ফেলতে পারেন। জুমলাতে আমরা মডুল প্লেস হিসাবে যা বলে থাকি ওয়ার্ড প্রেসে তাকে বলা হয় সাইডবার(sidebar) আর মডুল গুলোকে ওয়ার্ড প্রেসের ভাষায়(বলা যেতে পারে) উইজেস(widget). আপনি চাইলে ওয়ার্ড প্রেসে যত ইচ্ছা সাইড বার ব্যবহার করতে পারেন তবে আপনার থীমে সেই সাপোর্ট থাকতে হবে। এই বিষয়টা নিয়ে পরের পোস্টে লিখি তাহলে।</p><p>চারঃ &#8216;ওয়ার্ড প্রেসে যত ইচ্ছা সাইড বার যুক্ত করা&#8217;</p><p>প্রথমেই বলে রাখি নতুন কিছু জানার আগ্রহ না থাকলে বা এক্সপেরিমেন্ট করার ইচ্ছা না থাকলে এখনই মানে মানে কেটে পড়তে পারেন না হলে পরে পস্তাবেন। :ttt:</p><p>&#8216;তিন&#8217; নং টিপ্সের কিছু বলা দরকার। ওয়ার্ডপ্রেসে আমরা নিচের কোড টুকু দিয়ে সাইডবার ফাইলটি লোড করি।</p><pre class="brush: php; title: ; notranslate">&lt; ?php get_sidebar(); ?&gt;</pre><p>এটা যা করে তা হলো থীমের ভেতর sidebar.php ফাইলটা include  করে। এখন যদি আপনার বিশেষ পাতায় বিশেষ কোড লেখা সাইড বার দরকার হয় তাহলে কি করবেন  সেটা যদি এখনও না ভেবে থাকেন তাহলে আপনার উপর আমি এখনি কিন্তু খেপে গেছি। &gt;:D&lt; হ্যাঁ সেই আগের ট্রিক্স এখন যে সাইড বার ফাইলটা আছে সেটা কপি করে নতুন ফাইলে হিসাবে সেইভ করুন আর নাম দিন আগের সেই ফরম্যাটে যেমন sidebar-mycustomsidebar.php  আর এই ফাইলে নিজের ইচ্ছা মতো পরিবর্তন করুন। আর এটা লোড করুন এই ভাবে</p><pre class="brush: php; title: ; notranslate">&lt;?php get_sidebar('mycustomsidebar'); ?&gt;</pre><p>। মজা ?</p><p><span id="more-376"></span></p><p>ওহ এখন সাইডবার যত ইচ্ছা বা মডুল পজিশন কিভাবে বানাবো সেটা বলি। যদি আপনি এডমিন প্যানেল থেকে ওয়ার্ড প্রেসের ডিফল্ট থীম পছন্দ করেন কিংবা ক্লাসিক থীম পছন্দ করেন তাহলে দেখবেন সাইডবার মাত্র একটা যা ফ্রন্ট এন্ডে ডান দিকে বা বাম দিকে দেখানো হয়। একটা সাইডবারের কারণ এই একটা সাইড বারই থীমে যুক্ত করা যা থীমের ভেতর functions.php ফাইলটা দেখলে বুঝতে পারবেন। কোড default থীমে এই রকমঃ</p><pre class="brush: php; title: ; notranslate">
if ( function_exists('register_sidebar') )
    register_sidebar(array(
        'before_widget' =&gt; '&lt;li id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&gt;',
        'after_widget' =&gt; '&lt;/li&gt;',
        'before_title' =&gt; '&lt;h2 class=&quot;widgettitle&quot;&gt;',
        'after_title' =&gt; '&lt;/h2&gt;',
    ));
</pre><p>আর ক্লাসিকে এ এই রকমঃ</p><pre class="brush: php; title: ; notranslate">
if ( function_exists('register_sidebar') )
	register_sidebar(array(
		'before_widget' =&gt; '&lt;li id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&gt;',
		'after_widget' =&gt; '&lt;/li&gt;',
		'before_title' =&gt; '',
		'after_title' =&gt; '',
	));

?&gt;
</pre><p>এখন দেখুন আমার নিজের বানানো একটা থীমে আমি কতগুলোস সাইডবার ব্যবহার করেছিঃ</p><pre class="brush: php; title: ; notranslate">// sidebar stuff
if ( function_exists('register_sidebar') )
{
	register_sidebar(array('name' =&gt; 'Sidebar Left1','before_widget' =&gt; '&lt;div class=&quot;widget&quot;&gt;','after_widget' =&gt; '&lt;/div&gt;','before_title' =&gt; '&lt;h4&gt;','after_title' =&gt; '&lt;/h4&gt;'));
	register_sidebar(array('name' =&gt; 'Sidebar Left2','before_widget' =&gt; '&lt;div class=&quot;widget&quot;&gt;','after_widget' =&gt; '&lt;/div&gt;','before_title' =&gt; '&lt;h4&gt;','after_title' =&gt; '&lt;/h4&gt;'));
	register_sidebar(array('name' =&gt; 'Sidebar Bottom','before_widget' =&gt; '&lt;div class=&quot;widget&quot;&gt;','after_widget' =&gt; '&lt;/div&gt;','before_title' =&gt; '&lt;h4&gt;','after_title' =&gt; '&lt;/h4&gt;'));
	register_sidebar(array('name' =&gt; 'Sidebar Popular','before_widget' =&gt; '','after_widget' =&gt; '','before_title' =&gt; '&lt;h4 class=&quot;expandable&quot;&gt;','after_title' =&gt; '&lt;/h4&gt;'));
	register_sidebar(array('name' =&gt; 'Sidebar Poll','before_widget' =&gt; '&lt;div class=&quot;widget&quot;&gt;','after_widget' =&gt; '&lt;/div&gt;','before_title' =&gt; '&lt;h4&gt;','after_title' =&gt; '&lt;/h4&gt;'));
	register_sidebar(array('name' =&gt; 'Sidebar Quotes','before_widget' =&gt; '&lt;div class=&quot;widget&quot;&gt;','after_widget' =&gt; '&lt;/div&gt;','before_title' =&gt; '&lt;h4&gt;','after_title' =&gt; '&lt;/h4&gt;'));
	register_sidebar(array('name' =&gt; 'Sidebar Newsletter','before_widget' =&gt; '&lt;div class=&quot;widget_letter&quot;&gt;','after_widget' =&gt; '&lt;/div&gt;','before_title' =&gt; '&lt;h4&gt;','after_title' =&gt; '&lt;/h4&gt;'));
	register_sidebar(array('name' =&gt; 'Sidebar BlogPage','before_widget' =&gt; '&lt;div class=&quot;widget&quot;&gt;','after_widget' =&gt; '&lt;/div&gt;','before_title' =&gt; '&lt;h4&gt;','after_title' =&gt; '&lt;/h4&gt;'));
	register_sidebar(array('name' =&gt; 'Sidebar Bloggeronline','before_widget' =&gt; '&lt;div class=&quot;widget&quot;&gt;','after_widget' =&gt; '&lt;/div&gt;','before_title' =&gt; '&lt;h4&gt;','after_title' =&gt; '&lt;/h4&gt;'));
	register_sidebar(array('name' =&gt; 'Sidebar Frontadvertise','before_widget' =&gt; '&lt;div class=&quot;widget&quot;&gt;','after_widget' =&gt; '&lt;/div&gt;','before_title' =&gt; '&lt;h4&gt;','after_title' =&gt; '&lt;/h4&gt;'));
	register_sidebar(array('name' =&gt; 'Sidebar Blogadvertise','before_widget' =&gt; '&lt;div class=&quot;widget&quot;&gt;','after_widget' =&gt; '&lt;/div&gt;','before_title' =&gt; '&lt;h4&gt;','after_title' =&gt; '&lt;/h4&gt;'));
	register_sidebar(array('name' =&gt; 'Sidebar Readsubscribe','before_widget' =&gt; '&lt;div class=&quot;widget&quot;&gt;','after_widget' =&gt; '&lt;/div&gt;','before_title' =&gt; '&lt;h4&gt;','after_title' =&gt; '&lt;/h4&gt;'));
}</pre><p>যদি নিচের লাইন খেয়াল করুন</p><pre class="brush: php; title: ; notranslate">register_sidebar(array('name' =&gt; 'Sidebar Left2','before_widget' =&gt; '&lt;div class=&quot;widget&quot;&gt;','after_widget' =&gt; '&lt;/div&gt;','before_title' =&gt; '&lt;h4&gt;','after_title' =&gt; '&lt;/h4&gt;')); </pre><p>এখানে register_sidebar ফাংশন ইনপুট হিসাবে একটি এসোসিয়েটিভ array। যদি name হিসাবে কিছু না দেওয়া হয় তাহলে এডমিন থেকে সাইড বারগুলো Sidebar(1), Sidebar(2) এই ভাবে দেখাবে। কিন্তু এডভান্সড থীম বানানর জন্য এবং সাইট ওনারকে সম্পূর্ণ সিএমএসের স্বাদ দিতে sidebar এর নাম দেওয়া জরুরী। এখন যদি আপনি উপরের &#8216;Sidebar Left2&#8242; নামে সাইডবারটি থীমে কোথাও লোড করতে চান তাহলে অর্গানাইজড ভাবে লিখতে পারেন এই রূপঃ<br /> আগে একটা ফাইল তৈরি করুন sidebar-sidebarleft2.php  এই ফাইলের ভেতর লিখুন</p><pre class="brush: php; title: ; notranslate">&lt; ?php if ( function_exists('dynamic_sidebar') &amp;amp;amp;&amp;amp;amp; dynamic_sidebar('Sidebar Left2') ) : else :
//write something here if u want but see the 'if' condition pls
?&gt;
	&lt; ?php endif; ?&gt;</pre><p>sidebar-sidebarleft2.php ফাইলটা থীমের যেখানে দরকার যুক্ত করুন এই ভাবে</p><pre class="brush: php; title: ; notranslate">&lt; ?php get_sidebar('sidebarleft2'); ?&gt;</pre><p>এখন আপনি এডমিন থেকে widgets গিয়ে Sidebar Left2 সাইডবারে যে যে উইজেস গুলো রাখবেন সেইগুলো শো করবে এই sidebar-sidebarleft2.php  এই ফাইলটা। আশা এখন পর্যন্ত ধৈর্য হারা হয়ে যাননি&#8230; হা হা হা</p><p>আজকের বোনাস টপ্সঃ ধরুন আপনি চাইছেন একটা নির্দিষ্ট ক্যাটাগরীর পাতা অন্য রকম ভাবে দেখাতে। অহ আচ্ছা আপনি কি জানেন যখন আমরা ওয়ার্ড প্রেসে কোন ক্যাটাগরীতে ক্লিক করি তখন ওয়ার্ড প্রেসে টেমপ্লেট ইঞ্জিন প্রথমে category.php(কিছুটা ভুল বলছি এখনো) নামের ফাইল খুঁজে। কিন্তু তার আগে খুঁজে দেখে যে আইডির ক্যাটাগরীতে ক্লিক করা হয়েছে সেই আইডির ফরম্যাটে কোন ফাইল আছে নাকি। যেমন- ধরুন আপনি 6 আইডির ক্যাটাগরীতে ক্লিক করলাম  তাহলে category-6.php  এই ফাইলটা আগে খুঁজবে। তো আপনি যা করবেন তা হলো আপনার থীমের category.php ফাইলটা কপি করে  নাম দিন category-6.php আর  নিজের দরকার মতো পরিবর্তন করে নিন। মু হা হা</p><p>তো নেমে পড়ুন টেস্ট করতে !</p>Comment is open. You can participate in the discussion by visiting <a href='http://manchumahara.com/2009/09/06/wordpresstips2/'>here</a> ]]></content:encoded> <wfw:commentRss>http://manchumahara.com/2009/09/06/wordpresstips2/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>A poor or faster way to add wptinybn support to wp TinyMCEComments plugin</title><link>http://manchumahara.com/2009/09/02/a-poor-or-faster-way-to-add-wptinybn-support-to-wp-tinymcecomments-plugin/</link> <comments>http://manchumahara.com/2009/09/02/a-poor-or-faster-way-to-add-wptinybn-support-to-wp-tinymcecomments-plugin/#comments</comments> <pubDate>Wed, 02 Sep 2009 22:37:17 +0000</pubDate> <dc:creator>Manchumahara(Sabuj Kundu)</dc:creator> <category><![CDATA[wordpress]]></category> <category><![CDATA[Wordpress Plugin]]></category> <category><![CDATA[tinymcecomments]]></category> <category><![CDATA[wordpres plugin]]></category> <category><![CDATA[wptinybn]]></category><guid isPermaLink="false">http://manchumahara.com/2009/09/02/a-poor-or-faster-way-to-add-wptinybn-support-to-wp-tinymcecomments-plugin/</guid> <description><![CDATA[http://manchumahara.com/wp-admin/post-new.php <a href="http://manchumahara.com/2009/09/02/a-poor-or-faster-way-to-add-wptinybn-support-to-wp-tinymcecomments-plugin/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p><a href="http://manchumahara.com/wp-content/uploads/2009/09/3.JPG"><img class="alignleft size-medium wp-image-367" title="3" src="http://manchumahara.com/wp-content/uploads/2009/09/3-300x172.jpg" alt="3" width="300" height="172" /></a>Ok let me at first tell why this post ?<br /> I have a <a href="http://manchumahara.com/2009/07/22/tinybn-for-wordpress/">wp plugin named wptinybn </a>which enables users to write in unicode bangla for different types of bengali keyboard in wp visual editor which is based on tinymce. Actually my wp plugin is based on my tinymce plugin tinybn.  That means besides the wptinybn the tinybn plugin is a standalone tinymce plugin. So it should work with  everywhere with tinymce. ok.. I am 25% done <img src='http://manchumahara.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><p>There is another wp plugin named <a rel="external nofollow" href="http://wordpress.org/extend/plugins/tinymcecomments/" target="_blank">TinyMCEComments</a> which enables wp users to write comments through tinymce editor. I am 50% done. Cool na ?</p><p>One of my reader asked me how to add the tinybn support to TinyMCEComments. I just check that plugin&#8217;s code and I have that plugin installed in my own blog too though not enabled! Yes my answer is yes &#8230; that means it&#8217;s possible. It can be done in different ways. As a quick thinking I am giving a poor or faster (whatever u think) way to do that. I am 75% done&#8230; wait a bit man.</p><p>Download the wptinybn and TinyMCEComments plugin and install them. (if u want not to install wptinybn to do that then it&#8217;s ok, I mean no dependency). Check wptinybn(unzip first!) folder and you should find a folder in it named &#8220;banglafkb&#8221;.Copy this and paste in <strong>wp-includes/js/tinymce/plugins</strong> folders in your blog wp installation.  Done ? ok now &#8230;</p><p>hmm now you have to be more brave to edit the TinyMCEComments plugin&#8230; not much in deed. Open file tinyMCEComments.php and find the word &#8220;pls&#8221;. Stop to it&#8217;s first occurance the word will be like $pls and it&#8217;s a array and here parts of code is like</p><pre class="brush: php; title: ; notranslate">$pls = array('separator','bold','italic','underline','strikethrough','justifyleft','justifycenter','justifyright','justifyfull','bullist','numlist','outdent','indent','cut','copy','paste','undo','redo','link','unlink','cleanup','help','code','hr','removeformat','sub','sup','forecolor','backcolor','charmap','visualaid','blockquote','spellchecker','fullscreen');</pre><p>now place // before this line and it will be like bellow</p><pre class="brush: php; title: ; notranslate">
//$pls = array('separator','bold','italic','underline','strikethrough','justifyleft','justifycenter','justifyright','justifyfull','bullist','numlist','outdent','indent','cut','copy','paste','undo','redo','link','unlink','cleanup','help','code','hr','removeformat','sub','sup','forecolor','backcolor','charmap','visualaid','blockquote','spellchecker','fullscreen');</pre><p>we just kept the old code .<br /> now in new line put this bellow code</p><pre class="brush: php; title: ; notranslate">
$pls = array('separator','bold','italic','underline','strikethrough','justifyleft','justifycenter','justifyright','justifyfull','bullist','numlist','outdent','indent','cut','copy','paste','undo','redo','link','unlink','cleanup','help','code','hr','removeformat','sub','sup','forecolor','backcolor','charmap','visualaid','blockquote','spellchecker','fullscreen','banglafkb');
</pre><p>If you check the above code what I have added new here ? just that <strong>,&#8217;banglafkb&#8217;</strong></p><p>I am 90% done. Now to to your admin panel activate tinymcecomments plugin then from menu Settings go to it&#8217;s(that plugin&#8217;s) setting page and check (if you done above copy pase and code editing) &#8216;banglafkb&#8217; is in the button list and in the available plugin list. Just click both banglafkb to add from button list and plugin list. For button list click seperator before banglafkb that will be make a | seperator in editor. Now save this new option and check your comment form.</p><p>Angry one me ? You have done every thing properly but nothing new in the editor and u don&#8217;t see any change in the preview editor int the plugin options page. Don&#8217;t worry. The plugin keeps the setting in cache for 10 days. So to get the changes within one sec just open the tinyMCEComments.php file and pls check from top few liens code</p><p>there is a line like<br /> $mcecomment_expiresOffset = 3600 * 24 * 10; // Cache for 10 days in browser cache<br /> make this line comment I mean like<br /> //$mcecomment_expiresOffset = 3600 * 24 * 10; // Cache for 10 days in browser cache<br /> and now put a new line bellow it like<br /> $mcecomment_expiresOffset = 1; // Cache for 1 sec in browser cache</p><p>now save this file and check the option&#8217;s page&#8217;s preview editor.</p><p>I think I am 100% done now. mu ha ha.</p><p>Oh I forgot to say currently I am working on a joomla plugin to make the dates in bangla for front end for articles, actually it will work with com_content &#8230;hope to release this on the eid-durga puja vacation.</p><p>Again here is some screenshot(one is above) of this post&#8217;s summary.<a href="http://manchumahara.com/wp-content/uploads/2009/09/MCEComments-Options-‹-Let’s-start-again…-—-WordPress_1251930556673.png"><img class="alignleft size-medium wp-image-368" title="MCEComments Options ‹ Let’s start again… — WordPress_1251930556673" src="http://manchumahara.com/wp-content/uploads/2009/09/MCEComments-Options-‹-Let’s-start-again…-—-WordPress_1251930556673-300x123.png" alt="MCEComments Options ‹ Let’s start again… — WordPress_1251930556673" width="300" height="123" /></a><a href="http://manchumahara.com/wp-content/uploads/2009/09/MCEComments-Options-‹-Let’s-start-again…-—-WordPress_1251930589424.png"><img class="alignleft size-medium wp-image-369" title="MCEComments Options ‹ Let’s start again… — WordPress_1251930589424" src="http://manchumahara.com/wp-content/uploads/2009/09/MCEComments-Options-‹-Let’s-start-again…-—-WordPress_1251930589424-300x57.png" alt="MCEComments Options ‹ Let’s start again… — WordPress_1251930589424" width="300" height="57" /></a><a href="http://manchumahara.com/wp-content/uploads/2009/09/MCEComments-Options-‹-Let’s-start-again…-—-WordPress_1251930628482.png"><img class="alignleft size-medium wp-image-370" title="MCEComments Options ‹ Let’s start again… — WordPress_1251930628482" src="http://manchumahara.com/wp-content/uploads/2009/09/MCEComments-Options-‹-Let’s-start-again…-—-WordPress_1251930628482-300x105.png" alt="MCEComments Options ‹ Let’s start again… — WordPress_1251930628482" width="300" height="105" /></a></p>Comment is open. You can participate in the discussion by visiting <a href='http://manchumahara.com/2009/09/02/a-poor-or-faster-way-to-add-wptinybn-support-to-wp-tinymcecomments-plugin/'>here</a> ]]></content:encoded> <wfw:commentRss>http://manchumahara.com/2009/09/02/a-poor-or-faster-way-to-add-wptinybn-support-to-wp-tinymcecomments-plugin/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Adding no follow for links in wp comments</title><link>http://manchumahara.com/2009/07/23/adding-no-follow-for-links-in-comment-in-wp/</link> <comments>http://manchumahara.com/2009/07/23/adding-no-follow-for-links-in-comment-in-wp/#comments</comments> <pubDate>Thu, 23 Jul 2009 08:38:51 +0000</pubDate> <dc:creator>Manchumahara(Sabuj Kundu)</dc:creator> <category><![CDATA[wordpress]]></category> <category><![CDATA[Wordpress Plugin]]></category> <category><![CDATA[Wordpress Themes]]></category> <category><![CDATA[nofollow]]></category> <category><![CDATA[wpfilter]]></category><guid isPermaLink="false">http://manchumahara.com/2009/07/23/adding-no-follow-for-links-in-comment-in-wp/</guid> <description><![CDATA[One of my senior brother just asked me, how to add no follow rel for comments in wordpress. May be there is plugin for this. Look to my code How to use: 1.Open the functions.php file in ur current theme &#8230; <a href="http://manchumahara.com/2009/07/23/adding-no-follow-for-links-in-comment-in-wp/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p><img src="http://manchumahara.com/wp-content/uploads/2009/07/Dont-Follow-Me.jpg" alt="Don&#039;t Follow Me" title="Don&#039;t Follow Me" width="310" height="310" class="alignleft size-full wp-image-363" />One of my senior brother just asked me, how to add no follow rel for comments in wordpress. May be there is plugin for this. Look to my code <img src='http://manchumahara.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br /> <strong>How to use:</strong><br /> 1.Open the functions.php file in ur current theme and put these code within php tags.<br /> <br /> <strong>What it will do:</strong><br /> 1. Will add &#8216;no follow&#8217; as rel in url , if comment contains any url.<br /> 2. Will ad &#8216;external&#8217; as rel in url , if comment contains any url.<br /> 3. Will add target=&#8221;_blank&#8221; in comment author&#8217;s url so that their web url open&#8217;s in new window/new tab as in browser settings<br /> 4. Will add target=&#8221;_blank&#8221; to url, if comment contains any url<br /> 5. Wp adds &#8216;no follow&#8217;, &#8216;external&#8217; rel in comment author&#8217;s url by default. So we don&#8217;t need to add this <img src='http://manchumahara.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /><br /> <br /> <strong>Tips:</strong><br /> 1.If possible upgrade to wp2.8.2<br /></p><pre class="brush: php; title: ; notranslate">
      function nofollow($text) {
	        $text = preg_replace('/&lt;a /i','&lt;a rel=&quot;nofollow external&quot; ',$text);
	        $text = preg_replace('/&lt;a /i','&lt;a target=&quot;_blank&quot; ',$text);
	        return $text;
    }
    function targetblank($text){
    		$text = preg_replace('/&lt;a /i','&lt;a target=&quot;_blank&quot; ',$text);
	        return $text;
    }

    add_filter('comment_text', 'nofollow');
    add_filter('get_comment_author_link','targetblank');
</pre><p>any question ask me <img src='http://manchumahara.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br /> p.s.: post image is just for fun <img src='http://manchumahara.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /></p><p>BTW, are you afraid of editing your functions.php ? Ok, no problem you can add the above piece of code using the bellow wp plugin.<br /> Note: There is a file embedded within this post, please visit this post to download the file.</p><p>Duh, you are totally unhappy with this post, na ? You can to treat your commentors with &#8220;cake and cook&#8221;, ok no problem.Just  forget my post  and read this blog post &#8230;<a href="http://dmiracle.com/tools/the-single-most-profound-way-to-thank-your-commenters/" rel="nofollow external" target="_blank">&#8220;The Single, Most Profound Way To Thank Your Commenters&#8221;</a>.<br /> Happy now ?</p>Comment is open. You can participate in the discussion by visiting <a href='http://manchumahara.com/2009/07/23/adding-no-follow-for-links-in-comment-in-wp/'>here</a> ]]></content:encoded> <wfw:commentRss>http://manchumahara.com/2009/07/23/adding-no-follow-for-links-in-comment-in-wp/feed/</wfw:commentRss> <slash:comments>12</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 23/108 queries in 0.226 seconds using disk: basic
Object Caching 1138/1243 objects using disk: basic

Served from: manchumahara.com @ 2012-02-05 18:32:02 -->
