I am using WP-DownloadManager plugin to manage downloads in my blog. It’s a very usefull plugin by Lester ‘GaMerZ’ Chan. I think , He made the most important plugins for wp . He already wrote 17 wordpress plugins ! I am a big fan of Lester Chan aka ‘GaMerZ’ Chan and sometimes I try to get help from his plugin .. I mean how to wrote such nice and clean plugins…
Ok, I just checked that WP-DownloadManager plugin can list category but with files in each. But I wanted something like a download category widgets and a list of download category (just list of download category). So I just wrote a plugin for WP-DownloadManager plugin . 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
Make sure that you installed the wp-downloadmanager plugin first !
Now, Install the plugin like any other plugin.
Shortcode/widget usage
You can use as short code as well as widget. After installing visit your widget area from admin panel and use “Download Categories” widget to place in sidebar. To use shortcode in post or pages, write in your post/pages editor in html mode page_download_cat and wrap this word in [] , you are done.
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 download page where you will get my other wordpress, joomla and phpbb plugins.
Thank you.
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 joomlaworks.gr. 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.
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 can add new coasdl in posts listing area. Check the bellow image of my post edit panel/listing(http://(yoursitename)/wp-admin/edit.php)
If you check the plugin there is an extra col named GT Status. It’s here because I have installed the plugin GT-post-approval. Check this in wordpress plugin repository from here. Cool na ? Let me show another screenshot after enabling another nice plugin named “Simply Show IDs”. Check that plugin wordpress plugin repository from here. This plugin will add another extra col to show any post id so that we(at least normal blog user who doesn’t know how to pick post id) can pick post id easily. Actually this plugin does
“Simply shows the ID of Posts, Pages, Media, Links, Categories, Tags and Users in the admin tables for easy access. Very lightweight.”
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 common bug that I faced many times while using query_posts. When I use this query_posts it’s break some conditional loop like is_home(), is_category() etc but there is another function get_posts in wordpress that does the same thing but don’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 is_home-is_single-is_category-is-not-working-in-wp!.
Let me focus to this writing again
As Post and Page Excerpt Widgets is using the query_posts function for custom query it make’s problem for conditional tags. Let me show u solution and it’s like my that posts.
In you theme functions.php add a new function if not exists yet
function php4_clone($object) {
if (version_compare(phpversion(), '5.0') < 0) {
return $object;
} else {
return @clone($object);
}
}
let’s send ajax request in wordpress using wpnonce
Hei, I am not going to discuss what is wpnonce and why you should use this in your plugin or how important to use this to secure your plugin
But here I am going to discuss how you can use wpnonce in ajax request, I mean if your plugin handles ajax request.
Steps that we need to follow are:
One: Create wpnonce value.
Two: Send wpnonce value as an extra parameter with ajax requestion
Three: Check ajax referrer with the wpnonce value that was created in step one and sent in step two.
Ok, how to create a wpnonce value ?
we need to use wordpress function wp_create_nonce() . See wordpress codex here.
< ?php $my_wpnonce= wp_create_nonce (‘you-look-nice’); ?> // “you-look-nice” is just a string, u can use whatever u want. here $my_wpnonce will get a hash from wp_create_nonce. Oh that is not direct hash of “you-look-nice” but based on user id, time and that string. To know more about this function please check pluggable.php in wp-includes folder
ওকে তাহলে আজকের টিপ্স শুরু করা যাক। এর আগে লিখেছিলাম কিভাবে ওয়ার্ডপ্রেস কাস্টম পেজ তৈরি করা যায় যা ছিলো কাস্টম টেমপ্লেট ব্যবহার করে। কিন্তু একত্রে যা হয় পাতাটা ওয়ার্ড প্রেসের ডাটাবেজ থেকে আসে, মানে পাতার কন্টেন্ট। কিন্তু যদি এমন চাই যে একটা স্ট্যাটিক পাতা হবে কিন্তু ওয়ার্ড প্রেসের ভেতরে থেকে এবং ঐ পাতায় ওয়ার্ড প্রেসের যাবতীয় টেমপ্লেট ট্যাগ ব্যবহার করা যাবে। ধরুন আপনি ওয়ার্ড প্রেস ইনস্টলেশনের রুট ডিরেক্টরীতে একটা ফোল্ডার বানালেন যার নাম myfolder. তাহলে এই ডিরেক্টরীর লিঙ্ক হবে http://yoursite.com/myfolder দেখুন এটা কিন্তু ওয়ার্ড প্রেসের ফোল্ডার নয়।
এখন এই ফোল্ডারে একটা php ফাইলে তৈরি করুন। ধরুন myfile.php।
ফাইলের শুরুতেই লিখুন এই রকমঃ
Ok let me at first tell why this post ?
I have a wp plugin named wptinybn 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
There is another wp plugin named TinyMCEComments which enables wp users to write comments through tinymce editor. I am 50% done. Cool na ?
One of my reader asked me how to add the tinybn support to TinyMCEComments. I just check that plugin’s code and I have that plugin installed in my own blog too though not enabled! Yes my answer is yes … that means it’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… wait a bit man.
Download the wptinybn and TinyMCEComments plugin and install them. (if u want not to install wptinybn to do that then it’s ok, I mean no dependency). Check wptinybn(unzip first!) folder and you should find a folder in it named “banglafkb”.Copy this and paste in wp-includes/js/tinymce/plugins folders in your blog wp installation. Done ? ok now …
hmm now you have to be more brave to edit the TinyMCEComments plugin… not much in deed. Open file tinyMCEComments.php and find the word “pls”. Stop to it’s first occurance the word will be like $pls and it’s a array and here parts of code is like
If you check the above code what I have added new here ? just that ,’banglafkb’
I am 90% done. Now to to your admin panel activate tinymcecomments plugin then from menu Settings go to it’s(that plugin’s) setting page and check (if you done above copy pase and code editing) ‘banglafkb’ 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.
Angry one me ? You have done every thing properly but nothing new in the editor and u don’t see any change in the preview editor int the plugin options page. Don’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
there is a line like
$mcecomment_expiresOffset = 3600 * 24 * 10; // Cache for 10 days in browser cache
make this line comment I mean like
//$mcecomment_expiresOffset = 3600 * 24 * 10; // Cache for 10 days in browser cache
and now put a new line bellow it like
$mcecomment_expiresOffset = 1; // Cache for 1 sec in browser cache
now save this file and check the option’s page’s preview editor.
I think I am 100% done now. mu ha ha.
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 …hope to release this on the eid-durga puja vacation.
Again here is some screenshot(one is above) of this post’s summary.
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 and put these code within php tags.
What it will do:
1. Will add ‘no follow’ as rel in url , if comment contains any url.
2. Will ad ‘external’ as rel in url , if comment contains any url.
3. Will add target=”_blank” in comment author’s url so that their web url open’s in new window/new tab as in browser settings
4. Will add target=”_blank” to url, if comment contains any url
5. Wp adds ‘no follow’, ‘external’ rel in comment author’s url by default. So we don’t need to add this
Duh, you are totally unhappy with this post, na ? You can to treat your commentors with “cake and cook”, ok no problem.Just forget my post and read this blog post …“The Single, Most Profound Way To Thank Your Commenters”.
Happy now ?
I think to show the first image as thumb in wp front page or blog layout is very common for any theme. But to use it in wordpress mu version is not direct or need to do some hack or modify the normall process of adding timthub. Normally we upload images from wp media manager and use those in posts. In normal wordpress the upload dir is wp-content/uploads and files and images are uploaded to that directory. In wordpress mu version files are uploaded by user basis folder and for this wp-content/blogs.dir/userid is the uploaded dir for any image. here user id is named as folder name for each user. then wp-content/blogs.dir/userid/files. But when u browse the site the image link format is like http://yoursitename/files/year/month/image name but format is reshaped by the wp mu htacces which real physical path is like wp-content/blogs.dir/userid/files/year/month/image name. …continue reading How to use timthumb in WP MU
Now a days I am a great fan of wordpress. Recently I have done some projects on wordpress and getting expert day by day heh heh.
This post about how can we make menu in wordpress like news.bbc.co.uk. Now a days some clients want clone sites. They don’t think about all the functionality but the look and feel clone .
So to clone the menu like news.bbc.co.uk we what we need:
1. wp function wp_list_categories(args)
2. CSS to give look and feel like news.bbc.co.uk
Before we start let’s check what we are going to do:
here is the image that we are going to make or the menu that we are doing to make using wp_list_categories function and css. Look this menu is 2 level deep. To keep the theme clean u can make a function in functions.php file like bellow and just call the function in theme where u want to place the menu.
Look here we are using echo= 0 as want to just return the output from this function. and depth =2 as we want to make two level hirarachy… check others params that I have used. To know details about the template tag wp_list_categories pls check this page in wp codex.
Now what we need is to apply the css to style the menu like news.bbc.co.uk… one thing to keep in mind. When u will browse through the category I mean u click the any category from the menu and posts will be shown using category.php template then active category will get an extra class automatic which is helpfull to highlight using css but if u browse any single.
function get_leftcatmenu(){
$excludecats = array();
$excludecats = array(1,2,3); //categories to exlclude
//or
//$includecats = array ();
//$includecats = array(1,2,3); //categories to include
/*
// same thing can be done using a simple plugin and saving the categories in option table , bellow code is for comma seperated cat list
$excludecats = explode(',', get_option('bbcnews_leftmenucid'));
$excludecats = implode( ",",$excludecats);
*/
/*
$includecats = explode(',', get_option('bbcnews_leftmenuscid'));
$includecats = implode( ",",$seccats);
//sample code to exclude
return wp_list_categories('orderby=name&amp;amp;style=list&amp;amp;hide_empty=0&amp;amp;show_count=0&amp;amp;title_li=&amp;amp;exclude='.$excludecats.'&amp;amp;hierarchical=true&amp;amp;depth=2&amp;amp;echo=0');
// sample code to inlclude
return wp_list_categories('orderby=id&amp;amp;style=list&amp;amp;hide_empty=0&amp;amp;show_count=0&amp;amp;title_li=&amp;amp;include='.$includecats.'&amp;amp;hierarchical=true&amp;amp;depth=2&amp;amp;echo=0');
*/
}
post we need the hightlight the category in the menu to which the single post belongs to. But to make this happen that adding an extra class to the menu to make active while browsing any single posts I have used a plugin named “Show Active Category (while browsing a post)“. Note if any post belongs to more one category then it will add extra active class to each category.
Uff….now check the css code that I used:
Note: this css code works fine in ff3 and ie6 and I have no interest with other browser at this moment.
Code to use in theme:
<ul class="catmenu">
<li class="<?php if (is_home()){ echo"> home"><a href="<?php echo get_option('home'); ?>">News Front Page</a></li>
</ul>
and code to add in style.css
ul.catmenu li{ background-color:#E5E5E5; margin-bottom:2px;}
ul.catmenu li a{ text-decoration:none; line-height:19px; font-size:11px; font-weight:bold; padding:2px 0 2px 5px; color:#1F527B; vertical-align:middle; }
ul.catmenu li ul.children li a{ text-decoration:none; line-height:19px; font-family:9px; font-weight:normal; padding:2px 0 2px 5px; vertical-align:middle;}
ul.catmenu li:hover{ background-color:#D8D8D8;}
ul.catmenu li.current-cat{ background:#665F6E url(images/v3_square_rb.gif) repeat-y scroll right top;}
ul.catmenu li.current-cat:hover{ background-color:#665F6E;}
ul.catmenu li.current-cat a{ color:#FFFFFF;}
ul.catmenu li a:hover{ text-decoration:underline;}
ul.catmenu li ul.children{ background-color:#D3D3D3; display:none;}
ul.catmenu li ul.children li{ margin-bottom:0px;}
ul.catmenu li.current-cat-parent{ background:#665F6E;}
ul.catmenu li.current-cat-parent a{ color:#FFFFFF;}
ul.catmenu li.current-cat-parent ul li a,ul.catmenu li.current-cat ul li a{ color:#1F527B;}
ul.catmenu li.current-cat-parent ul li.current-cat{ background:#C0BFBF url(images/v3_square_rb.gif) repeat-y scroll right top;}
ul.catmenu li.current-cat ul.children,ul.catmenu li.current-cat-parent ul.children { display:block; background-color:#D3D3D3; }
ul.catmenu li.current-cat-parent ul li.current-cat a{ font-weight:bold; color:#1F527B;}
have not enogh time to discuss what the above css code do but it took me more than 1 hr to write the above css perfectly . If u are familiar with the abc of css then u will get the css code easily.
BTW, u need one image in the images folder and here is link for that image . Copy and paste the image in images folder. Pls keep in mind about the copy right of the image. Here the main thing that I wanted to highlight that how to make clone of any “look and feel” with own creativity that is what I actually did here.
A poor or faster way to add wptinybn support to wp TinyMCEComments plugin
I have a wp plugin named wptinybn 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
There is another wp plugin named TinyMCEComments which enables wp users to write comments through tinymce editor. I am 50% done. Cool na ?
One of my reader asked me how to add the tinybn support to TinyMCEComments. I just check that plugin’s code and I have that plugin installed in my own blog too though not enabled! Yes my answer is yes … that means it’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… wait a bit man.
Download the wptinybn and TinyMCEComments plugin and install them. (if u want not to install wptinybn to do that then it’s ok, I mean no dependency). Check wptinybn(unzip first!) folder and you should find a folder in it named “banglafkb”.Copy this and paste in wp-includes/js/tinymce/plugins folders in your blog wp installation. Done ? ok now …
hmm now you have to be more brave to edit the TinyMCEComments plugin… not much in deed. Open file tinyMCEComments.php and find the word “pls”. Stop to it’s first occurance the word will be like $pls and it’s a array and here parts of code is like
$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');now place // before this line and it will be like bellow
//$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');we just kept the old code .
now in new line put this bellow code
$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');If you check the above code what I have added new here ? just that ,’banglafkb’
I am 90% done. Now to to your admin panel activate tinymcecomments plugin then from menu Settings go to it’s(that plugin’s) setting page and check (if you done above copy pase and code editing) ‘banglafkb’ 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.
Angry one me ? You have done every thing properly but nothing new in the editor and u don’t see any change in the preview editor int the plugin options page. Don’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
there is a line like
$mcecomment_expiresOffset = 3600 * 24 * 10; // Cache for 10 days in browser cache
make this line comment I mean like
//$mcecomment_expiresOffset = 3600 * 24 * 10; // Cache for 10 days in browser cache
and now put a new line bellow it like
$mcecomment_expiresOffset = 1; // Cache for 1 sec in browser cache
now save this file and check the option’s page’s preview editor.
I think I am 100% done now. mu ha ha.
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 …hope to release this on the eid-durga puja vacation.
Again here is some screenshot(one is above) of this post’s summary.


Tags: tinymcecomments, wordpres plugin, wordpress, wptinybn
Category: wordpress, wordpress plugin