Sunday, November 21, 2010

Disable the admin bar in WordPress 3.1

One of the new features in WordPress 3.1 is the Admin Bar. It will automatically on by default.



To disable the admin bar, append the following code into functions.php file.
 <?php  
 /* Disable the Admin Bar. */  
 remove_action( 'init', 'wp_admin_bar_init' );  
 ?>  
The functions.php file is located inside the theme directory. You need to create one, if it does not exists yet.

Friday, November 19, 2010

Adobe Reader XI full standalone installation

Adobe Reader XI (version 11.0.08) is free, and freely distributable software that lets you view and print Portable Document Format (PDF) files.

Click here to download the standalone offline installer.
(http://ardownload.adobe.com/pub/adobe/reader/win/11.x/11.0.08/en_US/AdbeRdr11008_en_US.exe)

Last Edited on August 14, 2014

Saturday, October 2, 2010

Show File Extensions in Windows 7

Windows 7 hides file extensions information by default.

To see the file extension, please follow the following steps.
  1. Click the Start button (or, press the Windows key on keyboard).
  2. Type folder options in the Search Box. Hit Enter.
  3. Choose the View tab. Scroll down until you see the option Hide extensions for known file types.
  4. Uncheck it, and hit OK.


Now you can see file extensions for all your files.

Tuesday, August 3, 2010

Integrate Vim and IPython in Windows

Ipython and Vim is a great combination that make an IDE for Python.



By default, the IPython will use Windows default editor (Notepad), when %edit command is invoked.

To make Vim as the default editor, please follow the following steps:


Step 1.
Open file ipythonrc.ini which is located at “C:Usersyour username_ipython” in Windows 7 with any editor.


Step 2.
Search for line “editor 0”.


Step 3.
Replace that line to
editor vim
for Vim, or,
editor gvim –f
if  you prefer to use gVim.


Step 4.
Restart IPython and type %edit to start Vim.

Sunday, July 25, 2010

WordPress: Add Facebook Like Button using functions.php

The Facebook Like button lets a user share contents with friends on Facebook. When the user clicks the Facebook Like button, a story appears in the user's friends' News Feed, with a link back to the original website.

[caption id="" align="alignnone" caption="Facebook Like Button"][/caption]

Append this code snippet to functions.php file in theme or child theme folder to add the Facebook Like Button.
function add_fb($content) {
$fb = ''; // display only on single page.
if (is_single()) {
$fb = '<iframe src="http://www.facebook.com/plugins/like.php?href=';
$fb .= urlencode(get_permalink(get_the_ID()));
$fb .= '&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;';
$fb .= 'action=like&amp;colorscheme=light"';
$fb .= ' style="border:none; overflow:hidden; width:450px; ';
$fb .= 'height:60px"></iframe>';
}

// display before the content.
return $fb . $content;

// display after the content.
// return $content . $fb;
}

add_filter('the_content', 'add_fb');

Please visit http://developers.facebook.com/docs/reference/plugins/like for more information on how to customize the Like Button.