How to Insert custom Quicktags into the WordPress Editor

WordPress has two type of editor, one is visual/wysiwyw that is tinymce or replace with other such editors and another is HTML editor that is we call quick tag editor. Today, I want to write something about how to add custom quick tags or custom buttons. I search about it in google and most guides to edit core quick tag javascript file. But I don’t like that and I made my own hack in my own way, though experts may think it’s childish 😛

So let come to point, I wanted to add some buttons that will give me option to add custom class name so that I can format the text well. Same thing can be done via Visual editor but you have to use a plugin named “Tinymce Advanced” which helps to add more advance buttons like styles(class lists) and so on. But for HTML mode or for quick tags editor I didn’t such plugins.
Continue reading

WP Photo Album Plus Plus: WordPress Image Gallery

Most of the wordpress image gallery plugins can not make me happy. NExtgen is too much heavy, then I got another wordpress plugin “WP Photo Album Plus” developed by J.N. Breetvelt, a.k.a. (OpaJaap). 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’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. Though my modification is not done yet! But why not I share my last modification and explain what I have done upto now 🙂
Continue reading

Adding vertical fixed feedback button

update: 06.09.2010
Wana use as wordpress or joomla plugin ? then buy from my official website

Downloads

For Joomla
For WordPress

The Story

If you still didn’t notice, please check again there is a vertical feedback button in my blog , right side. So, sometimes people asks me how to do that ,,, any one can read the source code or having debug tool like firebug for firefox can see the source code and add in his own site. But max time, it’s true that we don’t want to learn by reading or google about any problem, we just ask other to get ready made solution. Even we don’t write in forums about our problems …. grr…

So here is answer of the those question, “How I added the vertical feedback button?”

I know how html works and how css works , I know where to edit in wordpress theme. So many days ago I saw that in a site and copied the source code and image and added in my site 😛
I am showing for default wordpress theme tweentyten and all paths shown bellow are windows style as windows is my primary os.

Step1: Copy this image to your wp-contentthemestwentytenimages folder first.

Step2: Open style.css file from wp-contentthemestwentyten dir and ready to add some css code 🙂
Step3: In the file style.css file at last line add the following css codes
Continue reading

Adding My posts sub menu for posts section in wordpress

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
[code language=”php”]edit.php?post_type=post&all_posts=1[/code] 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.
[code language=”php”]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&author=’.get_current_user_id());
}
}[/code]
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.
myposts
it’s just a easy way to make personal posts link for any user have access at leas contributor. Access level 1 belongs to contributor..

Update: 15-09-2011

While working on a project I got a tips from stackoverflow wordpress site about showing only specific author’s posts in author mode.
[code language=”php”]
function cb_posts_for_current_author($query) {
global $pagenow;

if( ‘edit.php’ != $pagenow || !$query->is_admin )
return $query;

if( !current_user_can( ‘manage_options’ ) ) {
global $user_ID;
$query->set(‘author’, $user_ID );
}
return $query;
}
add_filter(‘pre_get_posts’, ‘cb_posts_for_current_author’);
[/code]

thank you

Stuck in wordpress Maintenance Mode?

Are you Stuck in wordpress Maintenance Mode?  I was in that situation and thought to write about my pain and findings so that it may be help to reduce pain in the ass when u are crazy to do some upgrade for plugins and themes and you are stuck  in maintenance mode for “something wrong” in upgrade/upadte process .

This tip is for wordpress3.0+, don’t  know what to do for lower version.  The thing is when wordpress takes the site maintenace mode it creates a file in the site root dir named .maintenance  and when done remove that… 🙂

So, now you know what to do if u are stuck in maintenance mode. I wish I am going to sleep well tonight.

note: check the dicussion in wordpress forum about this issue.

btw, let me show you a sample screenshot about how the error msg look for upgrade failure

failure

Facebook fanbox wordpress plugin

It’s just a simple fanbox widget as wordpress plugin, nothing to explain. But I made my own version ?

Features

  • iframe method
  • auto detect ie(internet explorer), because sometimes it’s make problem for ie and option to use as iframe only for ie !
  • jquery based document ready facebook load ! Not clear ? see bellow

One thing to note that I used a way to load the facebook js script after loading jquery as normally in wordpress site front end we use jquery and many plugin uses this… so we can take that jquery is using default. So I loaded the fb js using wp_enqueue function and then called the fb init function after the document is loaded using jquery dom ready function 😛 … It’s just an experiment about slow loading of facebook fanbox widget in wordpress 😀

Download

  Facebook Fanbox wordpress widget (2.9 KiB, 1,823 hits)

If you just download with no comment and no recommendation to others, then I am planning to hate you 😛
Man at least share in social network and give me traffic so that I can have more money from ads 🙁

Good morning. It’s just morning after working whole night and I am feeling too hungry 🙂
Continue reading

Using wordpress native thickbox

To know about what is thickbox please check this link. WordPress use this a main popup window or modal view. Thickbox is a jquery plugin and it’s available with wordpress with jquery. So my tips is how to use that in front end , using the thickbox available with it, no need to use externally.

ThickBox is a webpage UI dialog widget written in JavaScript on top of the jQuery library. Its function is to show a single image, multiple images, inline content, iframed content, or content served through AJAX in a hybrid modal.

At first let me tell you where you can get it if u search wordpress directory manually. Just check in wp-includes\js where you will get all the js library and plugins used with wordpress or available for use with plugin and theme. And here is every thing you need for thickbox
wp-includes\js\thickbox
Continue reading

WP Plugin: webmasterkey

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

how to collect meta tags

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 Google Webmaster, 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)
Continue reading

Download Category widget for WP-DownloadManager plugin

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 :D. 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 :D. 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 😀
[page_download_cat] Continue reading