Thursday, February 10, 2011

Love at first sight

A girl entered our office. I turned around and glanced at her.
She was the most beautiful girl in the world. I like traditional Indian dress.
And she was wearing a beautiful churidar looking like an angel from heaven. Still cant forget that day.

She went inside the interview room. After sometime, I went to drink water and the filter was nearer to the room
she was sitting. And she looked at me. And my heart jumped with delight. Love struck me like a lightning.

I went back to my sit and started listening to my favourite romantic songs thinking about her. After
her interview she was leaving the office and I again glanced at her...I fell in love then and there...
there was no saving me...an angel came and stole my heart away from me...

Friday, January 14, 2011

Three easy steps to customize logo and message in Site Offline Page in Drupal 5

1. In template.php create a function

function phptemplate_maintenance_page($content, $messages = TRUE, $partial = FALSE) {
$title = drupal_get_title();
$head_title = strip_tags($title);
$head = drupal_get_html_head();
$js = drupal_get_js();
$content = $content;
$message = ($messages ? theme('status_messages') : '');
return _phptemplate_callback('maintenance-page', array('content' => $content, 'title' => $title, 'head_title' => $head_title, 'head' => $head, 'js' => $js,'message' => $message));
}



2. Create maintenance-page.tpl.php and there you can print all the variables, that you passed through _phptemplate_callback in template.php.

e.g.
print $content; //prints the site-offline message that is entered in the site maintenance page in your site.
print $title;

3. Create a maintenance.css inside the theme you are using and include it in maintenance-page.tpl.php . In maintenance.css add your own css to customize your site offline page.

Thanks, hope I am clear and hope it helps to customize your site offline page with custom message and logos.

Ashraf