Introducing WP-Chat :: XMPP Chat plugin for WordPress

WP-Chat plugin embeds Jaxl IM (Instant Messenger for the web) for wordpress blogs. It runs across all major browsers and built upon XMPP protocol. It is a hosted solution from Jaxl.im empowering real time communication between you and your site visitors. It expects no software or hardware pre-requisites from your site servers or users. Above all it’s free!

Overview:

  • Supports for all major browser including Firefox, Chrome, Safari and IE
  • Embeddable on all blogs, forums, personal, social and enterprise sites
  • Built using XMPP protocol (backbone for facebook and google chats)
  • Hosted dashboard for site admins and IM users
  • Pluggable and Skinnable using developer api
  • Connect with you desktop IM clients (e.g. Pidgin, PSI, …)

History:
In two of my previous post (Introducing MemChat and Jaxl BOSH Demo), I discussed and demoed a very early version of WP Chat plugin. In past 3 months, work has been done to make WP Chat generic enough so that it can be embedded across all kind of blogs, forums, social, personal and enterprise level websites. As of today, the product is named as “Jaxl IM (Instant Messenger for the web)” and made available as “WP-Chat” for the wordpress users.

WordPress Toolbar v 2.2 : Custom toolbar url, Support for WPMU and bug fixes

download-wordpress-plugin

WordPress toolbar plugin provide a facebook, digg style toolbar for all outgoing links from your blog posts. The toolbar url defaults to http://yourblog/wp-content/plugins/wordpress-toolbar/toolbar.php. However with version 2.2, blog admin can customize toolbar url to http://yourblog/wordpress-toolbar/ through the admin panel. A lot of other enhancements have been added like cross-plugin compatibility and support for WPMU hosted blogs. Check full feature list below.

What’s New?
Listed below is list of new features and bug fixes released with v 2.2:

  1. Support for customizing toolbar url through admin panel
  2. Support for WPMU hosted blogs
  3. Support for removing “Get this Plugin” widget from the toolbar through admin panel
  4. Security fix for possible XSS attack. Fix done by passing encoded hash string instead of plain text parameters. Also added various security checks on toolbar page to avoid possible XSS attacks.
  5. Bug fix where plugin didn’t work as expected because of cross plugin compatibility issues. Fix done by replacing server side toolbar logic with client side (using jquery) logic.
  6. Bug fix to show sociable share icons and tinyurl share link only for single posts and pages
  7. Bug fix for unrecognizable code in the toolbar when the encoding of hosted blog is different from utf-8. Fix done by using hosted blog settings instead of hardcoded utf-8.

Also core plugin code has been restructured (OOPS oriented now) so that maintainability and support becomes easier and quicker.

Steps to customize the default toolbar URL
Enable WordPress Toolbar v 2.2 plugin. Assuming you want to change default toolbar url from /wp-content/plugins/wordpress-toolbar/toolbar.php to /wordpress-toolbar, follow these steps:

  1. Enable apache mod_rewrite
  2. Add AllowOverride All in your blog virtual host config file and restart apache
  3. Add following apache rewrite rule by editing your blog .htaccess file
    RewriteRule ^wordpress-toolbar$ wp-content/plugins/wordpress-toolbar/toolbar.php
    RewriteRule ^wordpress-toolbar/$ wp-content/plugins/wordpress-toolbar/toolbar.php
  4. If you have blogs hosted using WPMU, add following apache rewrite rules in .htaccess file
    RewriteRule ^wordpress-toolbar$ wp-content/plugins/wordpress-toolbar/toolbar.php
    RewriteRule ^wordpress-toolbar/$ wp-content/plugins/wordpress-toolbar/toolbar.php
    RewriteRule ^([0-9a-zA-Z-]+)/wordpress-toolbar$ $1/wp-content/plugins/wordpress-toolbar/toolbar.php
    RewriteRule ^([0-9a-zA-Z-]+)/wordpress-toolbar/$ $1/wp-content/plugins/wordpress-toolbar/toolbar.php
  5. Manually check if rewrite rules are working. Open your custom toolbar url and you should see a result similar to this http://abhinavsingh.com/blog/wordpress-toolbar
  6. If for some reasons you DO NOT see “Working! Though required parameters are missing.” on toolbar page, it means rewrite rules didn’t worked as expected. Before you proceed with the setup, you SHOULD fix rewrite rules
  7. Go to wordpress admin and click "Wordpress Toolbar" under Settings tab
  8. Update your new custom toolbar url as shown: wordpress-toolbar-v-2.2-custom-toolbar-url-demo
  9. Clear cache and verify your toolbar

Enjoy and kindly let me know if you have issues installing plugin on your host.

JAXL BOSH Demo: IM chat client for all WordPress blogs

Have you ever wished of a wordpress plugin capable of providing a facebook style chat bar on your blog post. In this blog post, I will lay down the details of how Jaxl‘s bosh support comes in handy for building such browser based real time application. Specifically, I will explain how I achieved building a plugin for my wordpress blog. If everything goes perfect over next few weeks, this plugin might be submitted in wordpress plugin’s directory.

Jaxl BOSH Support Framework
Jaxl BOSH support comprise of three main parts:

  • jaxl.jquery.js: JQuery extension written for Jaxl bosh support
  • jaxl4bosh.class.php: Connection manager in PHP
  • jaxl UI: Integrated UI framework for changing your application skin on the fly. Your application skin can be a simple facebook style chat bar (as on this page) or chesspark style whole html page

jaxl.jquery.js is responsible for initiating and maintaining a connection between the browser and the PHP connection manager. While jaxl4bosh.class.php implements the BOSH protocol and maintain a persistent connection with the jabber server.

jaxl.jquery.js provide a few basic methods like:

  • jaxl.connect: Call for initiating the connection
  • jaxl.sendMessage: Call for sending a message to other jid’s
  • jaxl.ping: Call to maintain the connection and gather any incoming data
  • jaxl.disconnect: Call for disconnecting

jaxl4bosh.class.php provide wordpress style filter/hooks which can be used to modify every incoming and outgoing messages.

  • jaxl_pre_connect: Call to perform initialization before jaxl connects to jabber server
  • jaxl_post_connect: Call to perform shutdown after jaxl is connected to jabber server
  • jaxl_send_message: Call to perform actions on outgoing messages from jaxl
  • jaxl_recv_message: Call to perform actions on incoming messages to jaxl
  • jaxl_send_presence: Call to perform actions on outgoing presence from jaxl
  • jaxl_recv_presence: Call to perform actions on incoming presence from jaxl
  • jaxl_pre_disconnect: Call to perform initialization before jaxl disconnects to jabber server
  • jaxl_post_disconnect: Call to perform shutdown after jaxl is disconnected to jabber server

Jaxl and WordPress
Using Jaxl bosh support require you to only edit the configuration file. Here are the config variables:

        // JAXL config
        define('JAXL_BOSH_HOST', 'localhost');
        define('JAXL_BOSH_SERVER', 'localhost');
        define('JAXL_BOSH_URL', 'http://localhost:7070/http-bind/');
        define('JAXL_ADMIN_JID', '[email protected]');

You can configure Jaxl to use any of the available public xmpp services. However, I choose to host my own jabber server for my blog.

JAXL_ADMIN_JID is the admin jid to which Jaxl should route all incoming messages, added specifically for wordpress related requirement. PHP connection manager can be extended to route different chat sessions to different admins.

jaxl_recv_message handler is used to embed smiley’s and youtube videos by parsing the incoming chat messages.
jaxl-bosh-support-hook-demo-youtube-smiley

A few other hooks like jaxl_post_connect are used to notify JAXL_ADMIN_JID about the newly connected user.

Admin Screen
Below is a screen shot of how an admin desktop will look like while chatting with his site visitors:
Admin-screenshot-jaxl-bosh-support

Let me know if you are having any issues chatting using the chat bar at the bottom of the page. Code and installation might be buggy at times, and would appreciate any help from you on it.

My learnings while building “WP-Jazzed” – A new Jazzed up wordpress theme

Welcome the new wordpress theme “WPJazzed” for my blog. Seeing a plethora of jazzed up wordpress themes on web, I decided to start working on this new theme. In this blog post I will list my various findings while building “WPJazzed”.

Why a new theme?
I decided to move on with a new theme mainly because of the following reasons:

  • Helpful Feedbacks: I received feedbacks complaining about the unorganized structure of my previous theme and I do agree with them. 90% of my blog posts were under “Web Tutorial” category, leaving tags the only way to reach posts of interest.
  • Deciding the Niche: Many feedbacks pointed towards “What’s the targeted developer group of my blog?”. And indeed with no proper categorization and structure in place, its tough for a new user to identify the niche of my blog. Mainly because I have been blogging from javascript css fixes to memcached and libevent hacks
  • Boring googlish interfaces: As the world is coming out of the boring googlish interfaces and moving towards more jazzed up user interfaces, I decided to move on too.

So what’s the niche now?
Depending upon my blog archive and blogging interests, I finally came up with 7 categories as mentioned below:

  • PHP: Find all PHP related stuff (frameworking, PHP internals etc) under this category with a few exceptions (see below)
  • XMPP: All posts related to XMPP+Jabber technologies go under this category
  • WordPress: Find all wordpress hacks and How-To’s here. In case a post is related both to PHP and WordPress, it will be categorized under WordPress
  • Web Development: All posts related to HTML, Javascript, CSS, jQuery, Adobe AIR, Openlaszlo goes under this category
  • Open Source Projects: This category is dedicated to various open source project releases.
  • Memcached: This can be renamed to something like “High Scalability” in future as I plan to write more on memcached, mongodb, couchdb and related technologies
  • Tech News: All posts related to Google, Yahoo, Microsoft and other biggies fall under tech news

What’s new in WPJazzed?
Apart from the new look and feel, WPJazzed come in with:

  • Threaded Comments: I have utilized WordPress Threaded Comment plugin to enable replies on comments too.
  • Widgetized Sidebars: WPJazzed provide 2 type of custom sidebar widget layout. First one being a tabbed version and second one being a classic single column version.
  • Widgetized Footers: This is something which I explored recently. Allows you to update the footer section through the theme option panel with no HTML or CSS changes required
  • Open Source Project Download Plugin: Developed a custom plugin for showing my open source project download count. It is still in alpha mode.
  • New logo: Finally I have a logo for my blog. A very basic one built using using pixlr online photo editing and building tool

Lessons learnt while building WPJazzed
Below are a learnings from the whole process of building WPJazzed:

  • Resizing Post Images: I decided to shrink the post content column width and that’s where the real trouble starts. I saw my older post images were overflowing the column. Below is the jQuery hack for resizing post images:
     /* Image width in the posts can be max 550px */
    $(window).load(function() {
    	$('div.singleEntry img').each(function() {
    		$(this).removeAttr('width');
    		$(this).removeAttr('height');
    		current_width = $(this).width();
    		current_height = $(this).height();
    		aspect_ratio = current_width/current_height;
    		if(current_width > 540) {
    			new_height = 540/aspect_ratio;
    			$(this).width('540px');
    			$(this).height(new_height);
    		}
    	});
    });
  • Threaded comment hack: I also had to customize the threaded comment plugin javascript file since I wanted to change the default behavior of the plugin, which also copies the comment form heading. Here is the small hack done at the end of movecfm function:
    	if(jQuery('#commentform').children('h6').css('display') == 'none') {
    		jQuery('#commentform').children('h6').css('display', 'block');
    	}
    	else {
    		jQuery('#commentform').children('h6').css('display','none');
    	}
           return true;

Is WPJazzed released for public domain?
Not yet but YES will be released soon. There are still a few issues and optimization that I want to make before releasing WPJazzed for public domain. Also I wanted to test it against a real traffic before public release.

Do report any layout or functionality bug which you might encounter.
Leave your feedbacks and suggestions for the new theme.

PS: WP-Jazzed is not tested on IE6 (since I don’t have one) and will not be.

How to generate random password like WordPress using PHP?

WordPress Blogging Engine is a champion in a lot of way. One of the unique thing which you might have noticed is the random password generated by the wordpress, in case you try to generate a new password. Here are a few examples:

  • j0LH(WM9b_-q
  • wr^sqct1cmff
  • )P4-e531#-aL

Lets have a look at the code which can generate such random passwords for us. Later on we will dig deep into the code to understand each and every bit of it:

<?php

  class utility {

    static $random = '';

    // generates a random password
    // By default of length 12 having special characters
    static function generate_password($length = 12, $special_chars=true) {
      $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
      if($special_chars) $chars .= '[email protected]#$%^&*_-()';

      $password = '';
      for($i=0; $i<$length; $i++)
        $password .= substr($chars, self::generate_random_number(0, strlen($chars)-1), 1);
      return $password;
    }

    // generates a random number between $min and $max
    static function generate_random_number($min=0, $max=0) {
      // generate seed. TO-DO: Look for a better seed value everytime
      $seed = mt_rand();

      // generate $random
      // special thing about random is that it is 32(md5) + 40(sha1) + 40(sha1) = 112 long
      // hence if we cut the 1st 8 characters everytime, we can get upto 14 random numbers
      // each time the length of $random decreases and when it is less than 8, new 112 long $random is generated
      if(strlen(self::$random) < 8 ) {
        self::$random = md5(uniqid(microtime().mt_rand(), true).$seed);
        self::$random .= sha1(self::$random);
        self::$random .= sha1(self::$random.$seed);
      }

      // take first 8 characters
      $value = substr(self::$random, 0, 8);

      // strip first 8 character, leaving remainder for next call
      self::$random = substr(self::$random, 8);

      $value = abs(hexdec($value));
      // Reduce the value to be within the min - max range. 4294967295 = 0xffffffff = max random number
      if($max != 0) $value = $min + (($max - $min + 1) * ($value / (4294967295 + 1)));
      return abs(intval($value));
    }

  }

  // print new random password
  echo utility::generate_password();

?>

Lets dig into the code
static function generate_password($length=12, $special_chars=true) is a static method of our utility class. It accepts two parameters. $length who’s default value is 12 and $special_chars who’s default value is true. By turning on $special_chars, our random generated password will include characters like [email protected]#$%^&*_-()

static function generate_random_number($min=0, $max=0) is yet another static function of the utility class. It generates random number between $min and $max, the two parameters which can be passed. Default value for both is 0. However internally, generate_random_number() do a lot of trick to get us some really random numbers.

Algorithm
generate_random_number() works with following variables:

  1. $seed: which is equal to mt_rand()
  2. self::$random is a static variable. To start with this variable equals to ” (nothing). generate_random_number() checks for the length of self::$random. If its length is < 8, it generates a new 112 character long random value (see the code above) and assign it to self::$random. From here on, every time a random number is requested, it uses a chunks of 8 characters from the starting of self::$random, which is then used to generate a random number (see the code above). After each iteration length of self::$random decreases by 8. Because self::$random is 112 characters long, we can use it 14 times to get a random number (14×8 = 112).
  3. $value is the actual 8 digit character extracted from the starting of self::$random, which is later on processed to generate a random number between $min and $max values.

Further these methods can also be used to generate short url’s like tinyurl.com or bit.ly.

How to add wordpress like add_filter hooks in your PHP framework

I simply love wordpress mainly because of the architectural design it follows to deliver the good. WordPress provide a hook or filter functionality to almost everything that appears on your blog. If you are a wordpress plugin developer you surely must have used one of them, specially add_filter() hook.

add_filter functionality provides plugin developer a way to apply custom hooks on various page sections. For instance add_filter('the_content', 'HelloWorld') will force the content to be passed through the function HelloWorld($content) before being displayed to your blog users.

In this blog post I will show you how can you achieve doing the same thing for your custom PHP frameworks. Otherwise you can also use this in your day to day projects. We will start with a simple directory structure, assuming this is all we have in our framework to start with:

Files/Folder structure of our framework
— addHooks
    — index.php
    — applyHooks.php
    — hooks
          — Subscribe.php
          — Signature.php

addHooks: Our framework root directory.
index.php: Homepage for our framework.
applyHooks.php: Responsible for including and implementing various hooks.
hooks: Our hooks directory. We will put all our hooks here.
Subscribe.php: A simple hook which will add a subscribe my feed link.
Signature.php: Another simple hook which adds my signature.

Source code
Download the complete source code from here.

index.php

  // define some content
  // in this demo i will show to how to apply hook to $content, similar to wordpress blog $content
  $content = "In this blog post I will show you how to add wordpress like add_filter hooks in your PHP framework.";

  // Include our hook management file
  require_once("applyHooks.php");
  

Subscribe.php

  function Subscribe($content) {
    $subscribe = '';
    $subscribe .= 'Subscribe to my RSS feed';
    $subscribe .= '

'; return $subscribe.$content; } add_filter('the_content', 'Subscribe');

Signature.php

  function Signature($content) {
    $signature = '

'; $signature .= 'Abhinav Singh
'; $signature .= 'Follow on twitter @imoracle
'; return $content.$signature; } add_filter('the_content', 'Signature');

applyHooks.php

  /* plugin directory */
  $hook_dir = "hooks/";

  /* get all plugin files */
  $hook_files = glob($hook_dir."*.php");

  /* array saving all our hooks on the_content */
  $hooks['the_content'] = array();

  /* add_filter functionality */
  function add_filter($on, $func) {
    global $hooks;
    array_push($hooks[$on], $func);
  }

  /* include plugin files */
  foreach($hook_files as $hook_file) {
    require_once($hook_file);
  }

  /* implement the hooks */
  foreach($hooks['the_content'] as $hook) {
    $content = call_user_func($hook, $content);
  }

  echo $content;
  

Final Result
When you try to visit your framework opening page on your browser, i.e. index.php. You will see your $content being filtered/modified and displayed as:
add_filter_output

How does applyHooks.php works
So what allows us adding such hooks in our framework. call_user_func is a PHP function which allows you to call a user defined function. Here is in short how applyHooks.php work:

  1. applyHooks.php adds a method called add_filter($on, $func) before including the hook files
  2. add_filter() essentially takes input as $on = the element on which you want to apply the hook and $func = the hook you want to apply $on element.
  3. If you see our Signature.php code, you will find add_filter('the_content', 'Signature');. Which essentially means, apply the filter called $func=’Signature’, $on=’the_content’
  4. The applyHooks.php file keep registering these hooks and save them in $hooks array
  5. Finally it implement all hook one by one by calling the call_user_func function (PS: You may also want to use call_user_func_array)

Extending applyHooks.php
In this blog post I have shown a demo, how you can create a add_filter type functionality. You may want to extend this to include hooks like:

  • remove_filter
  • add_shortcode

and others.

Hope this will help you making your web apps more expendable and manageable. 😀

WordPress Toolbar v 2.1 – Adding support for tinyurl, sociable and a lot more

download-wordpress-plugin

WordPress Toolbar Version 2.0 allowed bloggers to catch their viewers on the go. It modifies all the internal/external links in the blog post (except those specified for exception), to open them with an attractive toolbar. Since wordpress toolbar used javascript to enable this functionality, your SEO always remain intact.

Moving forward, I accumulated all the suggestions posted in more than a 100 comments on the introductory blog post, and tried to include as many features as possible in version 2.1. A few features worth talking about are:

New in Version 2.1:

  • Plugin Size: Inspite of adding new features in version 2.1, plugin size has decreased from 100+ Kb to 50+ Kb. This is mainly because, plugin now uses site favicons fetched using Google S2 web service. It will allows for parallelization as your blog loads.
  • Tinyurl: Version 2.1 introduces support for tinyurl. If you are wondering what does that mean, scroll down to the bottom of this blog post and you will see tinyurl corresponding to this post. Enabling this feature inside admin panel will automatically submit your post to tinyurl and display it at the end of the blog post.
  • Sociable: Version 2.1 also introduces sociable. Enabling it inside the admin panel will put the social icons at the end of every blog post. You can choose icons from the admin panel. For an example scroll down to the bottom of this post.
  • target=”_blank”, was one of the most wished feature in all the posted comments. Enabling it from admin panel, will force open the url’s in your post into a new window.
  • New Toolbar Skin: Version 2.1 adds facebook toolbar skin into its kitty. From admin panel you can choose dark shade stumble upon skin or light blue facebook skin.
  • Add More Custom Skin: Yes, you read it right. I found a lot of bloggers using this plugin, wish to have their own custom toolbar skins. However, they just don’t want to tweak the code directly. Version 2.1 allows blog publishers to add their own custom skins without having to tweak the code manually. Read through to know how to add your custom skins
  • PHP4 Support: Last but not the least, support for PHP version 4.

Installation Guide:

  1. If you are trying to upgrade from version 2.0, you can either go for manual upgrade or automatic up using wordpress admin panel.
  2. Manual Upgrade: Deactivate version 2.0, Delete wordpress-toolbar folder from plugins directory, Download version 2.1, Copy wordpress-toolbar directory to plugins folder, Activate version 2.1, Visit wordpress toolbar administration panel
  3. Automatic Upgrade: Go to wordpress admin panel, click on plugins in left navigation bar, scroll down to wordpress-toolbar and click upgrade automatically

Version Change logs:

  1. Version 2.1.x : Enhancements added to version 2.0. Specifically it includes:
    • Support for tinyurl – url shortening service
    • Support for sociable – adding social share icons at the end of every post
    • Facebook skin added
    • target=”_blank” support added
    • Plugin is now PHP4 compatible
  2. Version 2.0 : Version was upgraded since 2.0 is a complete overhaul from 1.x series. Specifically it allows you to do the following:
    • You can now use auto upgrade for future releases without caring to move the plugin files everytime
    • Admin panel allows you to fully customize your toolbar
    • You can now ever choose social icons of your choice to be displayed on the toolbar
    • Choose domains for which you don’t want to activate this plugin
    • Unlike 1.x series, 2.0 do not change the href=”” urls. Instead now it uses javascript onclick event to activate toolbar and hence taking care of your SEO needs
  3. Version 1.1 : Include emergency CSS and HTML Validation fixes for IE browsers
  4. Version 1.0 : The first release of wordpress toolbar

How to add my own custom toolbar skin:
Before you go ahead and put in your custom skin, a little about various components populating that toolbar.

  1. home.gif: The left most home icon on the toolbar
  2. background.gif: The background image of your toolbar
  3. button_left.gif: The left cap image for “comment back” button
  4. button_right.gif: The right cap image for “comment back” button
  5. close.gif: The right most close icon on the toolbar

So by now you know, to add your custom skin to the toolbar all you need is 5 images. Lets see what all I did to add facebook skin in this release.

  1. First of all you must choose a short name and full name for your skin. I chose a shortname “fb” and fullname “facebook” for the facebook custom skin
  2. Go to plugins/wordpress-toolbar/extra/skins folder and create a folder. Name it “fb” (the shortname for your skin)
  3. Inside this folder drop your 5 images. (Remember names of the images must be same as above)
  4. Along with the images you need to drop a stylesheet named style.css to customize the font family, font sizes etc appearing on the toolbar. For reference see the style.css file inside “fb” folder bundled with this plugin
  5. Finally you need to create a “readme.txt” file inside “fb” folder. Open it and type in your skin’s fullname inside this file. This file will be used more extensively in future releases.

Now go to your admin panel and if you did it right you must see an option to choose your custom skin next to “choose a skin” option. Wasn’t that easy!

Planned Future Releases:

  1. The plugin is still not compatible with the Google Analytics and Shadow Box Plugin, mainly due to similar nature in which all the plugin’s operate. Need to work on that.
  2. Waiting for more suggestions and feedbacks from the plugin users on how we can evolve this plugin to serve the open source community

Do leave a comment or any suggestion for improvement and don’t forget to give a rating at http://wordpress.org/extend/plugins/wordpress-toolbar/.

WordPress Toolbar Plugin

Checkout WordPress Toolbar Version 2.2 Release Blog.

This plugin is a result of day to day observations of my wordpress blog stat. I analyzed that 75% of my blog’s visitors were leaving my blog posts by clicking one of the out going links either to my code.google project pages or to an external source of information. However, I doubt how many of them were coming back to leave a comment or to bookmark/share my blog post on one of the social bookmarking sites. I can say this because, even I too forget to press the browser back button and visit the blog again.

However I observed that I was clicking the link back on stumble floating toolbars and facebook external links toolbar. And hence came WordPress Toolbar Plugin (upgrade to 2.0 with Admin Panel). In short:

download-wordpress-plugin

WordPress Toolbar is a unique plugin which will automatically enable a toolbar for all outgoing links from your blog post, similar to stumbleupon and facebook. Often the visitors on your blog clicks one of the outgoing link for more information. However, s/he often forgets to comment back or social bookmark your blog. WordPress toolbar will float on the top of all these outgoing links from your blog post, showing options for either visit back your blog post from where s/he came from, comment back on your blog, social bookmark you blog in one of the famous bookmarking sites and finally an option to leave this toolbar.

This is my first wordpress plugin and I have just got my subversion repository access on wordpress.org. I have checked in this version of plugin and you can download the same from the download link above. You can experience the wordpress toolbar by clicking this link: http://abhinavsingh.com . As you click this, you will see a brownish black toolbar floating at the top of the yahoo.com page using which either the users can come back to comment on this blog post or they can use one of the social bookmarking images to share this blog post.

Introductory Features of WordPress Toolbar:

  1. A link back to your blog home
  2. A link back to your blog post from where he visited the external link
  3. A comment back link to originating blog post
  4. Various social bookmarking links to share, promote and bookmark your blog post
  5. Finally a close button, with which he will exit the wordpress toolbar
  6. An admin panel to configure and customize all of the above options

How to install WordPress Toolbar:

  1. Before proceeding with this version 2.x, you should DEACTIVATE any active 1.x series plugin
  2. Remove /blog/toolbar.php which you must have copied while activating 1.x version
  3. Remove /blog/wp-content/plugins/wp-toolbar directory fully. You will no longer need this
  4. Download the plugin
  5. Extract the plugin into `/wp-content/plugins/wordpress-toolbar` directory
  6. You will see one directory named `extra` which contains required images and css (DO-NOT-TOUCH-THIS-FOLDER)
  7. You will see 2 files named: wp-toolbar.php and toolbar.php (DONT MOVE THEM ANYWHERE)
  8. Activate the plugin
  9. Go to WPAdmin => settings => `wordpress toolbar` and customize the toolbar
  10. Bingo!

Version Change logs:

  1. Version 2.0 : Version was upgraded since 2.0 is a complete overhaul from 1.x series. Specifically it allows you to do the following:
    • You can now use auto upgrade for future releases without caring to move the plugin files everytime
    • Admin panel allows you to fully customize your toolbar
    • You can now ever choose social icons of your choice to be displayed on the toolbar
    • Choose domains for which you don’t want to activate this plugin
    • Unlike 1.x series, 2.0 do not change the href=”” urls. Instead now it uses javascript onclick event to activate toolbar and hence taking care of your SEO needs
  2. Version 1.1 : Include emergency CSS and HTML Validation fixes for IE browsers
  3. Version 1.0 : The first release of wordpress toolbar

Planned Future Releases:

  1. Include support for wordpress blogs hosted on PHP4, currently they are facing issues
  2. Include an options for inserting target=”_blank” for all outgoing links
  3. Club Socialble plugin into wordpress toolbar – Since wordpress toolbar already consists of all the social networking favicons, you may want to have a similar copy for a different plugin. Hence one of the next releases will include support for inserting social icons on your blog
  4. Club Google Analytics plugin into wordpress toolbar – Currently wordpress toolbar plugin inserts a onclick=”” event for all out going links which enables the toolbar for the link. However if you are a user of Google Analytics Plugin, then you might face a few issues. Mainly because Google Analytics Plugin too tries to insert an onclick=”” event for all outgoing links. Which finally clashes with wordpress toolbar onclick=”” event. Clubing both will allow you to enjoy plus points of both the plugins.

Do leave a comment or any suggestion for improvement.

New Year, New Server and a New Theme

Hello Everyone,

I wish I could have finished this task by 1st January, but nevertheless it’s finally done. Finally I have a new self designed wordpress theme named “Jhantu”. Also I have moved my blog from a shared hosting to my VPS due to increasing traffic.

Transition from one server to another is always painful. Here are the steps which I followed to make my server move smooth:

  • I took a dump of my blog last week and started developing new theme locally on my windows system
  • Yesterday before moving to VPS, I took the latest dump of wordpress blog (click export and download the xml file which guarantees for a smooth move)
  • However the database restoration wasn’t smooth. I found one of my previously published blog has been imported as a draft with no content inside and all comments lost. WTF
  • I had to republish it by extracting the blog content from the downloaded xml (If you are planning to move your blog, check out)
  • Then I changed the DNS settings in Godaddy, so that my domain now points to my VPS (something I discussed here before)
  • However it takes sometime before this new lookup (domain name => IP Address) is propagated worldwide. Infact even though you change the settings at Godaddy, you might continue seeing your old blog
  • I did 3 things, so that I can atleast setup the blog. Cleared browser cache, flushed my DNS lookups (run ipconfig /flushdns on command line), went to C:WINDOWSsystem32driversetchosts and made a new entry which reads: 74.86.123.245 abhinavsingh.com
  • This last entry will force your system to lookup at 74.86.123.245 for abhinavsingh.com

I guess these steps might help you if ever you plan to take the pain of server move.

Finally a bit about plugin’s powering “Jhantu”:

  • Akismet as always is guarding and saving us from spam
  • WP-Toolbar , a custom made plugin for showing a toolbar for outgoing links from my blogpost
  • My Adsense Manager a self written plug-in to embed adsense codes in between the blog posts. Will open source after some testing
  • Show your stats , yet another custom plugin to display my weekly stats on right tabs. Data derived from wordpress stats database using a cron job.
  • All in one SEO Pack, which automatically generates meta description and keyword for each blog post
  • With increasing number of visitors from european and south american citizens, I decided to have a language translator. Thanks to Global Translator for providing such an excellent plugin for translation
  • Google XML Sitemaps plugin for generating instant sitemaps as soon as I publish a new post
  • Thanks to MCEComments which will now allow you to format your comments 🙂
  • Sociable, which you will be using the most to share, print and email these posts if required. However I have customized it to also display tinyurl for the blog post and the RSS/Mail subscription links.
  • Subscribe To Comments will help you to keep upto date with an ongoing discussion
  • Get Recent Comments for keeping you in the know of latest discussions
  • WordPress Related Posts for feeding you with something similar to your taste 😉
  • WP-PageNavi for showing pagination instead of plain previous and next blog links
  • WP-Cache to handle increasing traffic
  • Syntax Highlighter making it easy for you to read through my code snippets
  • Finally WordPress.com Stats to keep a track of incoming traffic 🙂

In future “Jhantu” will be made open source, so that you can run your blog using it. Do let me know your feedbacks about the new theme inspired from Google Code.