LifeStream作者为 David Cramer | 访问插件主页
俺这是9时区设置,8时区的话,请自行修改
修改lifestream\themes\default\main.inc.php
主要需要修改5个地方, today yesterday 以及下面3个timestamp
[code lang="php"]
<?php
$day = '';
if (count($events))
{
$today = date('m d Y', time() - 54000);
$yesterday = date('m d Y', time() -140400);
if ($has_paging)
{
if ($has_prev_page) {
echo '<p><a href="' . $lifestream->get_previous_page_url($page) .
'">Newer Entries</a></p>';
}
}
?>
<table>
<?php
foreach ($events as $event)
{
$timestamp = $event->get_date();
if ($today == date('m d Y', $timestamp -32400)) $this_day = $lifestream->__('Today');
else if ($yesterday == date('m d Y', $timestamp-32400)) $this_day = $lifestream->__('Yesterday');
else $this_day = $lifestream->__(ucfirst(htmlentities(date($lifestream->get_option('day_format'),
$timestamp-82400))));
if ($day != $this_day)
{
?>
<tr>
<th colspan="2">
<h2><?php echo $this_day; ?></h2>
</th>
</tr>
<?php
$day = $this_day;
}
..............
[/code]



Post comment