I stumbled upon a hack for wordpress that replaces the actual post time with a 'time of day' verbiage and ported it over to b2evolution. The modification is rather easy.
First place this function in your conf/_hacks.php:
PHP:
-
<?php
-
// inputs must be unix timestamp (seconds)
-
function time_of_day($pdate){
-
switch($hour)
-
{
-
case 0:
-
case 1:
-
case 2:
-
$tod = 'the wee hours';
-
break;
-
case 3:
-
case 4:
-
case 5:
-
case 6:
-
$tod = 'terribly early in the morning';
-
break;
-
case 7:
-
case 8:
-
case 9:
-
$tod = 'early morning';
-
break;
-
case 10:
-
$tod = 'mid-morning';
-
break;
-
case 11:
-
$tod = 'late morning';
-
break;
-
case 12:
-
case 13:
-
$tod = 'lunch time';
-
break;
-
case 14:
-
$tod = 'early afternoon';
-
break;
-
case 15:
-
case 16:
-
$tod = 'mid-afternoon';
-
break;
-
case 17:
-
$tod = 'late afternoon';
-
break;
-
case 18:
-
case 19:
-
$tod = 'early evening';
-
break;
-
case 20:
-
case 21:
-
$tod = 'evening time';
-
break;
-
case 22:
-
$tod = 'late evening';
-
break;
-
case 23:
-
$tod = 'late at night';
-
break;
-
default:
-
$tod = '';
-
break;
-
}
-
//return $tod;
-
echo $tod;
-
}?>
Then in your skin's _main.php file, replace your post time section with this:
You can add some css to display this image right before the time:
clock image.
Preview here: http://brotherson.com/index.php?skin=simple
0 comments for this entry ↓
There are no comments yet for this entry.
Leave a Comment