2012 in review

The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog.

Here’s an excerpt:

600 people reached the top of Mt. Everest in 2012. This blog got about 9,800 views in 2012. If every person who reached the top of Mt. Everest viewed this blog, it would have taken 16 years to get that many views.

Click here to see the complete report.

Joomla : Styling search box and search button

Step : 1

Create a style

.search input.button
{
text-align: right;
background:url(../images/search.jpg) no-repeat;
width:47px;
height:19px;
margin-left:3px;
vertical-align: bottom;
border:none;
}

Continue reading

Twenty Dollars


A well-known speaker started off his seminar by holding up a $20 bill. In the room of 200, he asked. “Who would like this $20 bill?”

Hands started going up. He said, “I am going to give this $20 to one of you – but first, let me do this.”

He proceeded to crumple the 20 dollar note up. He then asked. “Who still wants it?” Still the hands were up in the air.

“Well,” he replied, “what if I do this?” He dropped it on the ground and started to grind it into the floor with his shoe. He picked it up, now crumpled and dirty. “Now, who still wants it?”

Still the hands went into the air.

“My friends, you have all learned a very valuable lesson. No matter what I did to the money, you still wanted it because it did not decrease in value. It was still worth $20.

Many times in our lives, we are dropped, crumpled, and ground into the dirt by the decisions we make and the circumstances that come our way. We feel as though we are worthless; but no matter what happened or what will happen, you will never lose your value.

Dirty or clean, crumpled or finely creased, you are still priceless to those who love you. The worth of our lives comes, not in what we do or who we know, but by …WHO WE ARE.

You are special – don’t ever forget it.”

Cut the Branch

Once there was a king who received a gift of two magnificent falcons from Arabia. They were peregrine falcons, the most beautiful birds he had ever seen. He gave the precious birds to his head falconer to be trained.

Months passed and one day the head falconer informed the king that though one of the falcons was flying majestically, soaring high in the sky, the other bird had not moved from its branch since the day it had arrived.

The king summoned healers and sorcerers from all the land to tend to the falcon, but no one could make the bird fly. He presented the task to the member of his court, but the next day, the king saw through the palace window that the bird had still not moved from its perch. Having tried everything else, the king thought to himself, “May be I need someone more familiar with the countryside to understand the nature of this problem.” So he cried out to his court, “Go and get a farmer.”

In the morning, the king was thrilled to see the falcon soaring high above the palace gardens. He said to his court, “Bring me the doer of this miracle.”

The court quickly located the farmer, who came and stood before the king. The king asked him, “How did you make the falcon fly?”

With his head bowed, the farmer said to the king, ” It was very easy, your highness. I simply cut the branch where the bird was sitting.”

We are all made to fly – to realize our incredible potential as human beings. But instead of doing that, we sit on our branches, clinging to the things that are familiar to us. The possibilities are endless, but for most of us, they remain undiscovered. We conform to the familiar, the comfortable, the mundane. So for the most part, our lives are mediocre instead of exciting, thrilling and fulfilling.

So let us learn to destroy the branch of fear we cling to and free ourselves to the glory of flight.

JQuery : Don’t display last | sign (menu separator) in nav menu

When you want to remove / hide | sign (separator) after last menu item while loop, you can do it with jQuery.

$(".nav li:last").html($(".nav li:last").html().replace("|<a/>","<a/>"));


							

PHP / MySql – Export Data to Excel

A PHP Script to export MySql data to Excel.


<!--?php
$content=””;

if($_REQUEST['export'])
{


$select= "select user_id,email,fname,lname,bdate,fees from user order by fname";
$result = mysql_query($select);
$num_row = mysql_num_rows($result);
Continue reading

PHP : Resize embedded video

$video = stripslashes($embedded_video_code);

$video = preg_replace('~(]*width\s?=\s?["\'])[^"\']+(["\'])~i', '${1}300${2}', $video);

$video = preg_replace('~(]*height\s?=\s?["\'])[^"\']+(["\'])~i', '${1}200${2}', $video);

Paathshaala – Aye Khuda Mujhako Bataa – Lyrics

Movie : Paathshaala
Singer : Salim Merchant
Lyricist: Hanif Sheikh

Aye khuda mujhko bataa tu rehta kahan, kya tera pataa
Hum to yahan pe musafir hain, jo dhoondhe apni manzil ka pataa
Aye khuda mujhko bataa tu rehta kahan, kya tera pataa (pataa)
Hum to yahan pe musafir hain, jo dhoondhe apni manzil ka pataa

Continue reading

WordPress : Highlighting author comment and reply

In WordPress 2.7 and later, you are able to Highlight author comment and reply to differentiate from others with styling.

All you need to create a class in CSS. Put this to class at the end of CSS file as it does not get override by other styling parameter.

li.bypostauthor
{
background-color: #abcdef;
/* your additional styling */
}

Joomla : How to remove Phoca Gallery footer?

In Joomla, Phoca Gallery does not give the option in the administration, whether you want to keep Phoca Gallery copyright information in footer or not.
For this you have to edit the code as follows.

Open following PHP file.

SITE_URL\components\com_phocagallery\views\category\tmpl\default.php


Remove the last line

PhocaGalleryUtils::footer();


Very simple.. isn’t it..?