Adsense
Translate it to ur language
Sunday, December 12, 2010
Management by consciousness
------------------------------------------------------------------------------------
Tamojyoti Bose
Mob: +91 9954030309
Res: +91-361-2607849
Sunday, November 14, 2010
Thursday, November 11, 2010
Monday, November 8, 2010
hacktivism
hacking into a Web site or computer system in order to communicate a
politically or socially motivated message. Unlike a malicious hacker,
who may disrupt a system for financial gain or out of a desire to
cause harm, the hacktivist performs the same kinds of disruptive
actions (such as a DoS attack) in order to draw attention to a cause.
For the hacktivist, it is an Internet-enabled way to practice civil
disobedience and protest.
Friday, November 5, 2010
CSS3 / HTML5
Friday, October 22, 2010
What I am?
Monday, August 30, 2010
New Title Background
Superannuation and Retirement
Tuesday, August 10, 2010
Cut cake after so many years
Cut cake after so many years, originally uploaded by Tamojyotihttp://www.flickr.com/people/tamojyoti/.
Had a gr8 time after so many years
Sunday, August 8, 2010
10 WordPress Dashboard Hacks
it allows you to control your posts, your blog design, and many more
things. When building a site for a client, it is especially important
to be able to control WP’s dashboard. In this article, let’s have a
look at 10 extremely useful hacks for WordPress’ dashboard.
Remove dashboard menus
When building a WordPress blog for a client, it can be a good idea to
remove access to some dashboard menus in order to avoid future
problems such as the client “accidentally” deleting the custom theme
they paid for.
****************************************************
Paste the following code in the functions.php file from your theme
directory. The following example will remove all menus named in the
$restricted array.
01.function remove_menus () {
02.global $menu;
03.$restricted = array(__('Dashboard'), __('Posts'), __('Media'),
__('Links'), __('Pages'), __('Appearance'), __('Tools'), __('Users'),
__('Settings'), __('Comments'), __('Plugins'));
04.end ($menu);
05.while (prev($menu)){
06.$value = explode(' ',$menu[key($menu)][0]);
07.if(in_array($value[0] != NULL?$value[0]:""
,$restricted)){unset($menu[key($menu)]);}
08.}
09.}
10.add_action('admin_menu', 'remove_menus');
» Source
Define your own login logo
Although it doesn’t have any importance for the blog performance or
usability, most clients will be very happy to see their own logo on
the dashboard login page, instead of the classic WordPress logo.
The Custom admin branding plugin can do that for you, as well as the
following hack that you just have to paste in your functions.php file.
1.function my_custom_login_logo() {
2.echo '
3.h1 a { background-image:url('.get_bloginfo('template_directory').'/images/custom-login-logo.gif)
!important; }
4.';
5.}
6.
7.add_action('login_head', 'my_custom_login_logo');
» Source
Replace dashboard logo with yours
Just as a client will love to see their own logo on WordPress login
page, there’s no doubt that they’ll enjoy viewing it on the dashboard
too.
Simply copy the code below and paste it to your functions.php file.
1.add_action('admin_head', 'my_custom_logo');
2.
3.function my_custom_logo() {
4.echo '
5.#header-logo { background-image:
url('.get_bloginfo('template_directory').'/images/custom-logo.gif)
!important; }';
6.}
» Source
Disable the “please upgrade now” message
WordPress constantly release new versions. Although for obvious
security concerns you should always upgrade; disabling the “Please
upgrade now” message on client sites can be a good idea because the
client doesn’t necessarily have to know about this, this is a
developer’s job.
One more time, nothing hard: paste the code in your functions.php,
save it, and it’s all good.
1.if ( !current_user_can( 'edit_users' ) ) {
2.add_action( 'init', create_function( '$a', "remove_action( 'init',
'wp_version_check' );" ), 2 );
3.add_filter( 'pre_option_update_core', create_function( '$a', "return
null;") );
4.}
» Source
Remove dashboard widgets
Introduced in WordPress 2.7, dashboard widgets can be pretty useful.
For example, some can display your Google Analytics stats. Though,
sometimes you don’t need it, or at least don’t need some of them.
The code below will allow you to remove WordPress’ dashboard widgets
once you paste it in yourfunctions.php file.
01.function example_remove_dashboard_widgets() {
02.// Globalize the metaboxes array, this holds all the widgets for wp-admin
03.global $wp_meta_boxes;
04.
05.// Remove the incomming links widget
06.unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
07.
08.// Remove right now
09.unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
10.unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
11.unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
12.}
13.
14.// Hoook into the 'wp_dashboard_setup' action to register our function
15.add_action('wp_dashboard_setup', 'example_remove_dashboard_widgets' );
» Source
Add custom widgets to WordPress dashboard
With the previous example, I showed you how easy it is to remove
unwanted dashboard widgets. The good news is that creating your own
widgets isn’t hard either.
The well-commented code below should be self explanatory. Just insert
it in your functions.php, as usual.
01.function example_dashboard_widget_function() {
02.// Display whatever it is you want to show
03.echo "Hello World, I'm a great Dashboard Widget";
04.}
05.
06.// Create the function use in the action hook
07.function example_add_dashboard_widgets() {
08.wp_add_dashboard_widget('example_dashboard_widget', 'Example
Dashboard Widget', 'example_dashboard_widget_function');
09.}
10.// Hoook into the 'wp_dashboard_setup' action to register our other functions
11.add_action('wp_dashboard_setup', 'example_add_dashboard_widgets' );
» Source
Change WordPress dashboard colors
If you ever wanted to be able to change WordPress dashboard colors (as
well as font or even display) without having to edit WordPress core
files, you’ll like this hack for sure.
The following example features a basic style change (grey header is
replaced by a blue one) but you can easily add as many styles as you
wish within the and tags.
1.function custom_colors() {
2.echo '#wphead{background:#069}';
3.}
4.
5.add_action('admin_head', 'custom_colors');
Provide help messages
If you’re building a site for a client and they have some problems
with some parts of the dashboard, a good idea is to provide contextual
help to the client.
The following hack will allow you to add a custom help messages for
the blog admin. As usual, you only have to paste the code into your
functions.php file.
01.function my_admin_help($text, $screen) {
02.// Check we're only on my Settings page
03.if (strcmp($screen, MY_PAGEHOOK) == 0 ) {
04.
05.$text = 'Here is some very useful information to help you use this
plugin...';
06.return $text;
07.}
08.// Let the default WP Dashboard help stuff through on other Admin pages
09.return $text;
10.}
11.
12.add_action( 'contextual_help', 'my_admin_help' );
» Source
Monitor your server in WordPress dashboard
WordPress dashboard API allow you to do many useful things using
dashboard widgets. I recently came across this very useful code: a
dashboard widget that allows you to monitor your server directly on
WordPress’ dashboard.
Paste the code in your functions.php file, and you’re done.
01.function slt_PHPErrorsWidget() {
02.$logfile = '/home/path/logs/php-errors.log'; // Enter the server
path to your logs file here
03.$displayErrorsLimit = 100; // The maximum number of errors to
display in the widget
04.$errorLengthLimit = 300; // The maximum number of characters to
display for each error
05.$fileCleared = false;
06.$userCanClearLog = current_user_can( 'manage_options' );
07.// Clear file?
08.if ( $userCanClearLog && isset( $_GET["slt-php-errors"] ) &&
$_GET["slt-php-errors"]=="clear" ) {
09.$handle = fopen( $logfile, "w" );
10.fclose( $handle );
11.$fileCleared = true;
12.}
13.// Read file
14.if ( file_exists( $logfile ) ) {
15.$errors = file( $logfile );
16.$errors = array_reverse( $errors );
17.if ( $fileCleared ) echo '
File cleared.
';18.if ( $errors ) {
19.echo '
'.count( $errors ).' error';
20.if ( $errors != 1 ) echo 's';
21.echo '.';
22.if ( $userCanClearLog ) echo ' [ CLEAR LOG FILE ]';
23.echo '
24.echo '
25.echo '
- ';
- ';
29.$errorOutput = preg_replace( '/\[([^\]]+)\]/', '[$1]',$error, 1 );
30.if ( strlen( $errorOutput ) > $errorLengthLimit ) {
31.echo substr( $errorOutput, 0, $errorLengthLimit ).' [...]';
32.} else {
33.echo $errorOutput;
34.}
35.echo ' '; - More than '.$displayErrorsLimit.' errors in
log... ';
26.$i = 0;
27.foreach ( $errors as $error ) {
28.echo '
36.$i++;
37.if ( $i > $displayErrorsLimit ) {
38.echo '
39.break;
40.}
41.}
42.echo '
43.} else {
44.echo '
No errors currently logged.
';45.}
46.} else {
47.echo '
There was a problem reading the error log file.
';48.}
49.}
50.
51.// Add widgets
52.function slt_dashboardWidgets() {
53.wp_add_dashboard_widget( 'slt-php-errors', 'PHP
errors','slt_PHPErrorsWidget' );
54.}
55.add_action( 'wp_dashboard_setup', 'slt_dashboardWidgets' );
» Source
Remove dashboard widgets according to user role
If you’re owning a multi-user blog, it may be useful to know how to
hide some dashboard widgets to keep confidential information in a safe
place.
The following code will remove the postcustom meta box for “author”
(role 2). To apply the hack on your own blog, just copy the code below
and paste it in your functions.php file.
01.function customize_meta_boxes() {
02.//retrieve current user info
03.global $current_user;
04.get_currentuserinfo();
05.
06.//if current user level is less than 3, remove the postcustom meta box
07.if ($current_user->user_level < 3)
08.remove_meta_box('postcustom','post','normal');
09.}
10.
11.add_action('admin_init','customize_meta_boxes');
10 WordPress Dashboard Hacks
it allows you to control your posts, your blog design, and many more
things. When building a site for a client, it is especially important
to be able to control WP’s dashboard. In this article, let’s have a
look at 10 extremely useful hacks for WordPress’ dashboard.
Remove dashboard menus
When building a WordPress blog for a client, it can be a good idea to
remove access to some dashboard menus in order to avoid future
problems such as the client “accidentally” deleting the custom theme
they paid for.
****************************************************
Paste the following code in the functions.php file from your theme
directory. The following example will remove all menus named in the
$restricted array.
01.function remove_menus () {
02.global $menu;
03.$restricted = array(__('Dashboard'), __('Posts'), __('Media'),
__('Links'), __('Pages'), __('Appearance'), __('Tools'), __('Users'),
__('Settings'), __('Comments'), __('Plugins'));
04.end ($menu);
05.while (prev($menu)){
06.$value = explode(' ',$menu[key($menu)][0]);
07.if(in_array($value[0] != NULL?$value[0]:""
,$restricted)){unset($menu[key($menu)]);}
08.}
09.}
10.add_action('admin_menu', 'remove_menus');
» Source
Define your own login logo
Although it doesn’t have any importance for the blog performance or
usability, most clients will be very happy to see their own logo on
the dashboard login page, instead of the classic WordPress logo.
The Custom admin branding plugin can do that for you, as well as the
following hack that you just have to paste in your functions.php file.
1.function my_custom_login_logo() {
2.echo '
3.h1 a { background-image:url('.get_bloginfo('template_directory').'/images/custom-login-logo.gif)
!important; }
4.';
5.}
6.
7.add_action('login_head', 'my_custom_login_logo');
» Source
Replace dashboard logo with yours
Just as a client will love to see their own logo on WordPress login
page, there’s no doubt that they’ll enjoy viewing it on the dashboard
too.
Simply copy the code below and paste it to your functions.php file.
1.add_action('admin_head', 'my_custom_logo');
2.
3.function my_custom_logo() {
4.echo '
5.#header-logo { background-image:
url('.get_bloginfo('template_directory').'/images/custom-logo.gif)
!important; }';
6.}
» Source
Disable the “please upgrade now” message
WordPress constantly release new versions. Although for obvious
security concerns you should always upgrade; disabling the “Please
upgrade now” message on client sites can be a good idea because the
client doesn’t necessarily have to know about this, this is a
developer’s job.
One more time, nothing hard: paste the code in your functions.php,
save it, and it’s all good.
1.if ( !current_user_can( 'edit_users' ) ) {
2.add_action( 'init', create_function( '$a', "remove_action( 'init',
'wp_version_check' );" ), 2 );
3.add_filter( 'pre_option_update_core', create_function( '$a', "return
null;") );
4.}
» Source
Remove dashboard widgets
Introduced in WordPress 2.7, dashboard widgets can be pretty useful.
For example, some can display your Google Analytics stats. Though,
sometimes you don’t need it, or at least don’t need some of them.
The code below will allow you to remove WordPress’ dashboard widgets
once you paste it in yourfunctions.php file.
01.function example_remove_dashboard_widgets() {
02.// Globalize the metaboxes array, this holds all the widgets for wp-admin
03.global $wp_meta_boxes;
04.
05.// Remove the incomming links widget
06.unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
07.
08.// Remove right now
09.unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
10.unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
11.unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
12.}
13.
14.// Hoook into the 'wp_dashboard_setup' action to register our function
15.add_action('wp_dashboard_setup', 'example_remove_dashboard_widgets' );
» Source
Add custom widgets to WordPress dashboard
With the previous example, I showed you how easy it is to remove
unwanted dashboard widgets. The good news is that creating your own
widgets isn’t hard either.
The well-commented code below should be self explanatory. Just insert
it in your functions.php, as usual.
01.function example_dashboard_widget_function() {
02.// Display whatever it is you want to show
03.echo "Hello World, I'm a great Dashboard Widget";
04.}
05.
06.// Create the function use in the action hook
07.function example_add_dashboard_widgets() {
08.wp_add_dashboard_widget('example_dashboard_widget', 'Example
Dashboard Widget', 'example_dashboard_widget_function');
09.}
10.// Hoook into the 'wp_dashboard_setup' action to register our other functions
11.add_action('wp_dashboard_setup', 'example_add_dashboard_widgets' );
» Source
Change WordPress dashboard colors
If you ever wanted to be able to change WordPress dashboard colors (as
well as font or even display) without having to edit WordPress core
files, you’ll like this hack for sure.
The following example features a basic style change (grey header is
replaced by a blue one) but you can easily add as many styles as you
wish within the and tags.
1.function custom_colors() {
2.echo '#wphead{background:#069}';
3.}
4.
5.add_action('admin_head', 'custom_colors');
Provide help messages
If you’re building a site for a client and they have some problems
with some parts of the dashboard, a good idea is to provide contextual
help to the client.
The following hack will allow you to add a custom help messages for
the blog admin. As usual, you only have to paste the code into your
functions.php file.
01.function my_admin_help($text, $screen) {
02.// Check we're only on my Settings page
03.if (strcmp($screen, MY_PAGEHOOK) == 0 ) {
04.
05.$text = 'Here is some very useful information to help you use this
plugin...';
06.return $text;
07.}
08.// Let the default WP Dashboard help stuff through on other Admin pages
09.return $text;
10.}
11.
12.add_action( 'contextual_help', 'my_admin_help' );
» Source
Monitor your server in WordPress dashboard
WordPress dashboard API allow you to do many useful things using
dashboard widgets. I recently came across this very useful code: a
dashboard widget that allows you to monitor your server directly on
WordPress’ dashboard.
Paste the code in your functions.php file, and you’re done.
01.function slt_PHPErrorsWidget() {
02.$logfile = '/home/path/logs/php-errors.log'; // Enter the server
path to your logs file here
03.$displayErrorsLimit = 100; // The maximum number of errors to
display in the widget
04.$errorLengthLimit = 300; // The maximum number of characters to
display for each error
05.$fileCleared = false;
06.$userCanClearLog = current_user_can( 'manage_options' );
07.// Clear file?
08.if ( $userCanClearLog && isset( $_GET["slt-php-errors"] ) &&
$_GET["slt-php-errors"]=="clear" ) {
09.$handle = fopen( $logfile, "w" );
10.fclose( $handle );
11.$fileCleared = true;
12.}
13.// Read file
14.if ( file_exists( $logfile ) ) {
15.$errors = file( $logfile );
16.$errors = array_reverse( $errors );
17.if ( $fileCleared ) echo '
File cleared.
';18.if ( $errors ) {
19.echo '
'.count( $errors ).' error';
20.if ( $errors != 1 ) echo 's';
21.echo '.';
22.if ( $userCanClearLog ) echo ' [ CLEAR LOG FILE ]';
23.echo '
24.echo '
25.echo '
- ';
- ';
29.$errorOutput = preg_replace( '/\[([^\]]+)\]/', '[$1]',$error, 1 );
30.if ( strlen( $errorOutput ) > $errorLengthLimit ) {
31.echo substr( $errorOutput, 0, $errorLengthLimit ).' [...]';
32.} else {
33.echo $errorOutput;
34.}
35.echo ' '; - More than '.$displayErrorsLimit.' errors in
log... ';
26.$i = 0;
27.foreach ( $errors as $error ) {
28.echo '
36.$i++;
37.if ( $i > $displayErrorsLimit ) {
38.echo '
39.break;
40.}
41.}
42.echo '
43.} else {
44.echo '
No errors currently logged.
';45.}
46.} else {
47.echo '
There was a problem reading the error log file.
';48.}
49.}
50.
51.// Add widgets
52.function slt_dashboardWidgets() {
53.wp_add_dashboard_widget( 'slt-php-errors', 'PHP
errors','slt_PHPErrorsWidget' );
54.}
55.add_action( 'wp_dashboard_setup', 'slt_dashboardWidgets' );
» Source
Remove dashboard widgets according to user role
If you’re owning a multi-user blog, it may be useful to know how to
hide some dashboard widgets to keep confidential information in a safe
place.
The following code will remove the postcustom meta box for “author”
(role 2). To apply the hack on your own blog, just copy the code below
and paste it in your functions.php file.
01.function customize_meta_boxes() {
02.//retrieve current user info
03.global $current_user;
04.get_currentuserinfo();
05.
06.//if current user level is less than 3, remove the postcustom meta box
07.if ($current_user->user_level < 3)
08.remove_meta_box('postcustom','post','normal');
09.}
10.
11.add_action('admin_init','customize_meta_boxes');
Wednesday, August 4, 2010
WORLD HISTORY FACTS ABOUT INDIA
Some
of the following
facts may be known to you. These facts were recently published in a German
magazine, which deals with WORLD HISTORY FACTS ABOUT INDIA.
1. India
never invaded any country in her last 1000 years of history.
2. India
invented the Number system. Zero was invented by Aryabhatta.
3. The
world's first University was established in Takshila in 700BC. More than
10,500 students from all over the world studied more than 60 subjects. The
University of Nalanda built in the 4 th century BC was one of the greatest
achievements of ancient India in the field of education.
4.
According to the Forbes magazine, Sanskrit is the most suitable language for
computer software.
5. Ayurveda
is the earliest school of medicine known to humans.
6. Although
western media portray modern images of India as poverty striken and
underdeveloped through political corruption, India was once the richest empire
on earth.
7. The art
of navigation was born in the river Sindh 5000 years ago. The very word
"Navigation" is derived from the Sanskrit word NAVGATIH.
8. The
value of pi was first calculated by Budhayana, and he explained the concept of
what is now known as the Pythagorean Theorem. British scholars have last year
(1999) officially published that Budhayan's works dates to the 6 th Century
which is long before the European mathematicians.
9. Algebra,
trigonometry and calculus came from India . Quadratic equations were by
Sridharacharya in the 11 th Century; the largest numbers the Greeks and the
Romans used were 106 whereas Indians used numbers as big as 10 53
10.
According to the Gemmological Institute of America, up until 1896, India was
the only source of diamonds to the world.
11. USA
based IEEE has proved what has been a century-old suspicion amongst academics
that the pioneer of wireless communication was Professor Jagdeesh Bose and not
Marconi.
12. The
earliest reservoir and dam for irrigation was built in Saurashtra
13. Chess
was invented in India
14.
Sushruta is the father of surgery. 2600 years ago he and health scientists of
his time conducted surgeries like cesareans, cataract, fractures and urinary
stones. Usage of anaesthesia was well known in ancient India .
15. When
many cultures in the world were only nomadic forest dwellers over 5000 years
ago, Indians established Harappan culture in Sindhu Valley ( Indus Valley India
in 100 BC.
Quotes about India
We owe a
lot to the Indians, who taught us how to count, without which no worthwhile
scientific discovery could have been made. Albert
Einstein.
India is
the cradle of the human race, the birthplace of human speech, the mother of
history, the grandmother of legend and the great grand mother of tradition. Mark Twain.
If there is
one place on the face of earth where all dreams of living men have found a home
from the very earliest days when man began the dream of existence, it is India French scholar Romain Rolland.
India
conquered and dominated China culturally for 20 centuries without ever having
to send a single soldier across her border. Hu Shih (former Chinese
ambassador to USA )
ALL OF THE ABOVE
IS JUST THE TIP OF THE ICEBERG, THE LIST COULD BE ENDLESS.
BUT, if we
don't see even a glimpse of that great India in the India that we see today, it
clearly means that we are not working up to our potential; and that if we do,
we could once again be an evershining and inspiring country setting a bright
path for rest of the world to follow.
I hope you
enjoyed it and work towards the welfare of INDIA
Say
proudly, I AM AN INDIAN.
Wednesday, July 28, 2010
Pearl Harbour
doppelblogger
another blogger.
Thursday, July 22, 2010
Adding Custom fields to Autor/ User profile
function my_new_contactmethods( $contactmethods ) {
// Add Twitter
$contactmethods['twitter'] = 'Twitter';
//add Facebook
$contactmethods['facebook'] = 'Facebook';
return $contactmethods;
}
add_filter('user_contactmethods','my_new_contactmethods',10,1);
Sunday, June 20, 2010
Rocket Singh
Memories of late 70's or early 80's, but these still hold good...
Youngsters then love to remember but Youngsters now will laugh..
1. Though you may not publicly own to this, at the age of 12-17
years,you were very proud of your first "Bellbottom" or your first
"Maxi"or your first Apache jeans.
2. Phantom & Mandrake were your only true
heroes. The brainy ones read"Competition Success Review".
3. Your "Camlin" geometry box & Natraj/Flora pencil was your prized possession.
4. The only "Holidays" you took were to go to your grandparents' or
your cousins' houses.
5. Ice-cream meant only - either an orange stick, a vanilla stick –
ora Choco Bar if you were better off than most.
6. You gave your neighbour’s phone number to others with a ‘c/o’
written against it because you had booked yours only 7 years ago and
were still waiting for your number to come.
7. Your first family car (and the only one) was a Fiat or an
Ambassador. This often had to be pushed by the entire family to get
going.
8. The glass windows in the back seats used to get stuck at the
two-thirds down level and used to irk the shit out of you! The window
went down only if your puny arm could manage the tacky rotary handle
to pull it down. Locking the door was easy. You just whacked the other
tacky, non-rotary handle downwards.
9. Your mom had stitched the weirdest lace curtains for all the
windows of the car. They were tied in the middle and if your dad was
the comfort-oriented kinds, you had a magnificent small fan upfront.
10. Your parents were proud owners of HMT watches. You "earned" yours
after SSC exams.
11. You have been to "Jumbo Circus"; have held your breath while the
pretty young thing in the glittery skirt did acrobatics, quite enjoyed
the
elephants hitting football, the motorcyclist vrooming in the "Mautka
Gola" and it was politically okay to laugh your guts out at
dwarfs hitting each others bottoms!
12. You have atleast once heard "Hawa Mahal" on the radio.
13. If you had a TV, it was normal to expect the neighborhood to
gather around to watch the Chitrahaar or the Sunday movie. If you
didn't have a TV, you just went to a house that did. It mattered
little if you knew the owners or not.
14. Sometimes the owners of these TVs got very creative and got a bi
or even a tri-coloured anti-glare screen which they attached with two
side clips onto their Weston TVs. That confused the hell out of you!
15. Black & White TVs weren't so bad after all because cricket was
played in whites.
16. You thought your Dad rocked because you got your own (the
family's; not your own own!) colour TV when the Asian Games started.
Everyone else got the same idea as well and ever since, no one came
over to your house and you didn't go to anyone else's.
17. You dreaded the death of any political leader because of the
mourning they would announce on the TV. After all how much "Shashtriya
Sangeet" can a kid take? Salma Sultana also didn't smile during the
mourning.
18. You knew that "Indira Gandhi" was somebody really powerful and
terribly important. And that's all you needed to know.
19. The only "Gadgets" in the house were the TV, the Fridge and
possibly a mixer.
20. All the gadgets had to be duly covered with a crochet covers and
sometimes even with ingenious, custom-fit plastic covers.
21. Movies meant Rajesh Khanna or Amitabh Bachchan. Before the start
of the movie you always had to watch the obligatory "Newsreel".
22. You thought you were so rocking because you knew almost all the
songs of Abba and Boney M.
23. Your hormones went crazy when you heard "Disco Deewane" by Naziya
Hassan & Zoheb Hassan.
24. School teachers, your parents and even your neighbours could whack
you and it was all okay.
25. Photograph taking was a big thing. You were lucky if your family
owned a camera. A reel of 36 exposures was valuable hence it justified
the half hour preparation & "setting" & the "posing" for each picture.
Therefore, you have atleast one family picture where everyone is
holding their breath and standing at attention!
And we were really happy then....see what the new technology has
brought you to...no peace of mind, only pressure and stress..
-
Read & Enjoy
>
>
> Read and enjoy
>
> Prince Charles & Sardarji were having dinner.
> Prince said, "Pass the wine you divine".
> Sardar thinks "how poetic?"
> Sardar says, "Pass the custard you bastard".
> ***********************************************
>
>
>
> Sardar at bar in New York .
> Man on his right says "Johnny Walker single."
> Man on his left says "Peter Scott single"
> Sardar says - "Baljith Singh Married!"
> ***********************************************
>
>
>
> Boss : am giving u job as a driver. STARTING salary Rs.2000/-, is it o.k.
> Sardar: U R great sir! Starting salary is o.k. ......but??
> How much is DRIVING salary...?
> ***********************************************
>
>
>
> Sardar's theory: Moon is more important than Sun; coz it gives light at night when light is needed & Sun gives light during the day when light is not needed!!!
> ***********************************************
>
>
>
> 2 sardars are driving a Car, one puts on the indicator and asks the other to check whether its working, he puts his head out and says
> YES...NO...YES...NO...YES...NO...
> ***********************************************
>
>
>
> Sardar shouting 2 his girl friend " u said v will do register marriage and cheated me, I was waiting 4 u yesterday whole day in the post office....
> ***********************************************
>
>
>
> Sardar is in a dissection class of cockroach. He cuts its 1 leg, and says, "Chal", it walks.
> He cuts 2nd and 3rd legs and said, "chal", it walks.
> He cuts all the legs and said, "Chal...." Finally he wrote the conclusion......
> ...... "After all the legs of a cockroach are cut - it becomes deaf......"
> ***********************************************
>
>
>
> A Sardar at an interview for the post of a detective.
> Interviewer: who killed Gandhi?
> Sardar: Thank u sir 4 giving me d job, I will start investigating.......
> ***********************************************
>
>
>
> A Sardar for an exam had studied only one essay 'FRIEND', but in the exam the essay which came was 'FATHER'. He replaced friend with father in the essay and it read: AM A VERY FATHERLY PERSON, I HAVE LOTS OF FATHERS,
> SOME OF MY FATHERS ARE MALE AND SOME ARE FEMALE. MY TRUE
> FATHER IS MY NEIGHBOUR.
> ***********************************************
>
>
>
> Interviewer: what s your qualification?
> Sardarji: Sir I am PhD.
> Interviewer: what do you mean by PhD?
> Sardarji: (smiling) PASSED HIGHSCHOOL with DIFFICULTY....
> ***********************************************
>
>
>
> Amitab: In which state Cauvery flows?
> Sardar: liquid state.....
> Audience clapped... Amitab stunned, looks behind, ALL WERE SARDARS.......
>
>
>
>
>
>
IT life!!!!!! Its interesting
I can make best use of a computer…
My wallpaper is my inspiration
I don't go to hostel.
There is enough space on my desk.
People in my home are asleep when I am free to call them.
So …..
I get 90mins. Of lunch break.
The only time my eyes can rest.
The chairs are so cozy.
I don't need a bed.
We wake together,
We SWIPE together,
We eat together,
We study together,
Hold it ………… we don't sleep together……..
We have separate hostels!!!
My best take-away from the last 3 months.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Adaptability.
Monday, May 24, 2010
Sunday, May 23, 2010
Simple Hook Tutorial
Hooks are one of the main building blocks of WordPress plug-ins. Almost every plug-in uses a hook to overwrite WordPress’ core functionality.
How to Use Hooks on Your WordPress Blog
Unless you’re writing a plug-in, you would write hooks in the functions.php file. This file is located in the wp-content/themes/yourtheme directory.
A hook, as you would expect, “hooks” one function to another. For example, you could write a custom function and attach it to one of WordPress’ core functions:
I will tell u a simple hook to understand the process:
Let whenever a post is done a mail alert should be sent to a mail:
first we need to name our function let it be mailalert
function mailalert()
{
mail('tamojyoti.bose@gmail.com','You got a post', 'Hello I am from ur blog we received a new post ');
}
add_action('publish_post','mailalert');
now what this thing did :
we all come across simple mail fn of php which i used to just drop a mail to me when a post is done.
add action is just hooking up core function publish_post with my one just created
Please comment:) This is my first writing so please pardon me if i m wrong
Friday, May 21, 2010
Blog protector
Features:
* Disable right click on your blog
* Disable selection of text on your blog
* Disable dragging of images on your blog so that images can’t be saved using.
* Disable Microsoft Image Toolbar to protect images from your blog.
Plugin url: http://wordpress.org/extend/plugins/blog-protector/
Thursday, May 20, 2010
Saturday, May 15, 2010
Best On WordPress From The Past Week N.5
Sent to you by Tamo, TJ, Tom, Bose via Google Reader:
All of these were tweeted on our twitter account during the past week, so don't forget to follow wpCanyon on twitter for awesome wordpress related links.
USING WORDPRESS "AS A CMS"
Joomla And WordPress: A Matter Of Mental Models
Working With MultiSite In WordPress 3.0
Quick Tip: A 4 Minute Crash-Course in WordPress Custom Fields
Add Private Content to Posts via Shortcode
Build a WordPress Plugin to Add Author Biographies to your Posts
8 Incredible Wordpress Plugins
Use More Flexibility In WordPress Templates
40 More Stylish, Minimal and Clean Free Wordpress Themes
Things you can do from here:
- Subscribe to wpCanyon using Google Reader
- Get started using Google Reader to easily keep up with all your favorite sites
Monday, May 10, 2010
10 sites developers should have in their bookmarks
Sent to you by Tamo, TJ, Tom, Bose via Google Reader:
Mysql Format Date
MySQL Format Date helps you to format your dates using the MySQL DATE_FORMAT function. Just select a common date format and then change it to your suit your needs. The MySQL DATE_FORMAT code will be generated at the bottom of the page which you can then copy into your query.
Visit site: http://www.mysqlformatdate.com
Script Src
Are you tired of hunting the Internet in order to find the script tag for the latest version of the Javascript library of your choice? ScriptSrc.net has compiled all the latest versions of jQuery, Mootools, Prototype and more in a single page which lets you copy it in your browser clipboard with a single click.
Visit site: http://scriptsrc.net
Em Chart
I never been a fan of ems in CSS files, but sometimes you have to deal with it. In that case, Em chart will translate ems to pixels so you'll save time and hassle.
Visit site: http://aloestudios.com/tools/emchart
Twitter API Explorer
If you're using the Twitter API in the site you build, you'll for sure enjoy this very handy website which allow you to search through the Twitter API. Even better, the website can generate ready-to-use code snippets. A real time gain for you and your clients!
Visit site: http://twitapi.com/explore
Browser Sandbox
Cross browser compatibility is definitely one of the biggest problems a web developer has to face in his daily job. The browser sandbox lets you run any Windows browser from the web. The only bad thing is that you must run a Windows machine: The app does not work on Macs and GNU/Linux.
Visit site: http://spoon.net/browsers
PHP Forms
Web forms are one of the most important part of a website, but creating them is also very time-consuming. So, what about using a website that can speed up your form development for free?
PHP forms allows you to create advanced forms that can fit the needs of most websites.
Visit site: http://www.phpform.org
.htaccess editor
A .htaccess file is a must have for any website. Don't know how to write one? No problem, just visit this site to create your .htaccess file using a wizard. It doesn't allow very advanced stuff, but the results are great for 95% of the websites you'll make.
Visit site: http://www.htaccesseditor.com/en.shtml
Smush it!
Images may be worth a thousand words, they're also well known to use a lot of bandwidth. Images can be optimized for the web using programs like Photoshop; but if you don't own a copy of this software or simply don't have a clue how to do it, smush.it is what you need.
Brought to you by Yahoo developers network, Smush.it is an online tool that will reduce your image size without reducing their quality. For WordPress users, a very handy plugin for your favorite blogging engine is available here.
Visit site: http://developer.yahoo.com/yslow/smushit/
CSS Compressor
Especially on site with many different page layouts, CSS files can become huge and use a lot of server bandwidth. This tool, named CSS Compressor, can consequently reduce the size of any CSS file by removing comments, indentation and more.
Even better, compression level can be configured to fit your needs.
Visit site: http://www.csscompressor.com
Test everything
This site is a definitive must-have for your bookmarks: As the name says, Test everything allows you to test lot of things such as XHTML and CSS markup, PageRank, back-links, and a lot more.
Visit site: http://tester.jonasjohn.de
Like CatsWhoCode? If yes, don't hesitate to check my other blog CatsWhoBlog: It's all about blogging!
10 sites developers should have in their bookmarks
Things you can do from here:
- Subscribe to CatsWhoCode.com using Google Reader
- Get started using Google Reader to easily keep up with all your favorite sites
Sunday, April 18, 2010
Executing PHP
echo $today;
?>
A simple date function in PHP. PHP exec helps in writing php code in page or post. The above date is dynamic one and written in PHP.
Optimized the Database
http://www.problogdesign.com/wordpress/how-to-optimize-a-wordpress-database/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ProBlogDesign+(Pro+Blog+Design)
Thematic Framework
Wednesday, March 17, 2010
Monday, March 1, 2010
Saturday, February 27, 2010
How to execute SQL queries
How to execute SQL queries
For those who don't know yet, SQL queries have to be executed within the MySQL command line interpreter or a web interface such as the popular PhpMyAdmin. Since we're going to work on WordPress, you should note that the SQL Executionner plugin provides an easy-to-use interface that allows you to run SQL queries directly on your WordPress blog dashboard.
Although all the queries from this article have been tested, don't forget that you shouldn't test any of those on a production blog. Also, make sure that you always have a working database backup.
Manually change your password
It may sound like the thing that only happens to others but forgetting a password can happen to any of us. In case you lost your blog admin password, the only solution is to create a new one directly in your MySQL database.
The following query will do it. Notice that we use the MD5() MySQL function to turn our password into an MD5 hash.
1.
UPDATE
'wp_users'
SET
'user_pass'
= MD5(
'PASSWORD'
)
WHERE
'user_login'
=
'admin'
LIMIT 1;
Source : http://www.wprecipes.com/how-to-manually-reset-your-wordpress-password
Transfer posts from one user to another
Most WordPress newcomers tend to use the good old "admin" account instead of creating an account with their real name. If you made that mistake and created another account later, you can easily transfer your old "admin" posts to your new account with the SQL query below.
You'll need the user id of both your old and new accounts.
1.
UPDATE
wp_posts
SET
post_author=NEW_AUTHOR_ID
WHERE
post_author=OLD_AUTHOR_ID;
Source : http://www.wprecipes.com/how-to-change-author-attribution-on-all-posts-at-once
Delete post revisions and meta associated to those revisions
Post revisions are very useful, especially in the case of a multi author blog. However, the problem of post revisions is definitely the number of database records it creates. For exemple, if your blog has 100 posts, which has 10 revisions each, you'll end up with 1000 records in the wp_posts tables, while only 100 of them are necessary.
Executing this query will delete all post revisions as well as all meta info (custom fields, etc) associated to it. The whole process will result in a consequent gain of database space.
1.
DELETE
a,b,c
FROM
wp_posts a
WHERE
a.post_type =
'revision'
LEFT
JOIN
wp_term_relationships b
ON
(a.ID = b.object_id)
LEFT
JOIN
wp_postmeta c
ON
(a.ID = c.post_id);
Source : http://www.onextrapixel.com/2010/01/30/13-useful-wordpress-sql-queries-you-wish-you-knew-earlier/
Batch delete spam comments
Imagine that you're coming back from holidays, where you haven't had any access to the Internet. If you haven't installed Akismet and depending on your blog popularity, you may end up with 1000, 2000 or even 10,000 comments to moderate.
You can spend a whole day to moderate the lot, or you can use this life-saving query to delete all unapproved comments. And for your next holidays, don't forget to install Akismet!
1.
DELETE
from
wp_comments
WHERE
comment_approved =
'0'
;
Source : http://www.wprecipes.com/mark-asked-how-to-batch-deleting-spam-comments-on-a-wordpress-blog
Find unused tags
Tags are recorded on the wp_terms table. If for some reason a tag has been created but is not used anymore, it stays in the table. This query will let you know which tags are on the wp_terms table without being used anywhere on your blog. You can delete those safely.
1.
SELECT
*
From
wp_terms wt
INNER
JOIN
wp_term_taxonomy wtt
ON
wt.term_id=wtt.term_id
WHERE
wtt.taxonomy=
'post_tag'
AND
wtt.
count
=0;
Source : http://www.onextrapixel.com/2010/01/30/13-useful-wordpress-sql-queries-you-wish-you-knew-earlier/
Find and replace data
This tip isn't specific to WordPress and is a must know for anyone who's working with MySQL databases. The MySQL function replace() lets you specify a field name, a string to find, and a replacement string. Once the query is executed, all occurrences of the string to replace will be replaced by the replacement string.
In case of a WordPress blog, this can be useful to batch replace a typo (For example people who repeatedly call the software Wordpress…) or an email address.
1.
UPDATE
table_name
SET
field_name =
replace
( field_name,
'string_to_find'
,
'string_to_replace'
) ;
Source : http://perishablepress.com/press/2007/07/25/mysql-magic-find-and-replace-data/
Get a list of your commentators emails
Have you ever received unsolicited emails from blogs you previously commented? I'm sure you did, just like me. The fact is that getting a list of emails from your commentators is extremely easy using the following query. The DISTINCT parameter will make sure that we'll only get each email once, even if the user commented more than once.
Please note that this is only a proof of concept: Don't send your users unwanted emails.
1.
SELECT
DISTINCT
comment_author_email
FROM
wp_comments;
Source : http://www.onextrapixel.com/2010/01/30/13-useful-wordpress-sql-queries-you-wish-you-knew-earlier/
Disable all your plugins at once
When things go wrong, especially on a production site, you have to be quick. Considering the fact that plugins are often the source of problems, disabling all your plugins in a second can prevent lots of problems.
Just run the following query:
1.
UPDATE
wp_options
SET
option_value =
''
WHERE
option_name =
'active_plugins'
;
Source : http://www.wprecipes.com/how-to-disable-all-your-plugins-in-a-second
Delete all tags
In WordPress, tags are recorded in the wp_terms tables, along with categories and taxonomies. If you wish to remove all tags, you can't simply empty or delete the wp_terms as you'll destroy categories at the same time!
If you want to get rid of your tags, run this query. It will remove all tags and relationships between tags and posts, while leaving categories and taxonomies intact.
01.
DELETE
a,b,c
02.
FROM
03.
database
.prefix_terms
AS
a
04.
LEFT
JOIN
database
.prefix_term_taxonomy
AS
c
ON
a.term_id = c.term_id
05.
LEFT
JOIN
database
.prefix_term_relationships
AS
b
ON
b.term_taxonomy_id = c.term_taxonomy_id
06.
WHERE
(
07.
c.taxonomy =
'post_tag'
AND
08.
c.
count
= 0
09.
);
Source : http://wordpress.org/support/topic/311665
List unused post meta
Post meta is created by plugins and custom fields. They are extremely useful, but they can quickly make your database grow in size. The following query will show you all the records in the postmeta table that doesn't have corresponding records in the post table.
1.
SELECT
*
FROM
wp_postmeta pm
LEFT
JOIN
wp_posts wp
ON
wp.ID = pm.post_id
WHERE
wp.ID
IS
NULL
;
Source : http://wordpress.org/support/topic/337412
Disable comments on older posts
Everyone who has been in blogging for more than one year will know: Even after some months, your old posts still receive interest from the public and lots of comments, mostly because they are indexed by search engines. This is a good thing of course, but the problem is for people like me who own technical blogs and have to answer lots of questions related to their old (and sometimes obsolete) posts.
The solution to this problem is to automatically close comments on posts which are too old. This SQL query will close comments on all posts published before January 1, 2009.
1.
UPDATE
wp_posts
SET
comment_status =
'closed'
WHERE
post_date <
'2009-01-01'
AND
post_status =
'publish'
;
Replace commentator url
Previously in this article, I talked about the very useful replace() MySQL function. Here is a good example of how useful it is : Let's say you previously own a site and used its url in your comments to generate backlinks to this site.
If you sell the site, you can easily replace the old url by your new site url. Simply run this query and you'll be done!
1.
UPDATE
wp_comments
SET
comment_author_url =
REPLACE
( comment_author_url,
'http://oldurl.com'
,
'http://newurl.com'
);
Source : http://perishablepress.com/press/2008/07/14/wordpress-link-author-comments-home-page/
Replace commentator email adress
Another good example of the replace() function. This query will replace the email adress provided in the comments field, by a new one.
1.
UPDATE
wp_comments
SET
comment_author_email =
REPLACE
( comment_author_email,
'old-email@address.com'
,
'new-email@address.com'
);
Delete all comments with a specific url
Lately, I've noticied that some clever spammers left some quite relevant comments, but with a link pointing to a viagra site. Unfortunely, when I noticied it the commentator already left lots of comments. The following query will delete all comments with a specific url. The "%" signs means that any url containing the string within the % signs will be deleted.
1.
DELETE
from
wp_comments
WHERE
comment_author_url
LIKE
"%wpbeginner%"
;
Source : http://perishablepress.com/press/2007/07/25/mysql-magic-find-and-replace-data/