1 lexagon Jul 02, 2006 10:54
3 yabba Jul 02, 2006 12:53
skins/<skin name>/_main.php
if( !defined('DB_USER') ) die( 'Please, do not access this page directly.' );
$season = '';
if( $Blog->ID == ## )
{
$month = date( 'm' );
switch( true )
{
case ( $month < 3 ) :
$season = 'Winter ';
break;
case ( $month < 6 ) :
$season = 'Spring ';
break;
case ( $month < 9 ) :
$season = 'Summer ';
break;
case ( $month < 12 ):
$season = 'Autumn ';
break;
default :
$season = 'Winter ';
}
}?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php locale_lang() ?>" lang="<?php locale_lang() ?>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php locale_charset() ?>" />
<title><?php
echo $season;
<h1 id="pageTitle"><?php
echo $season;
$Blog->disp( 'name', 'htmlbody' ) ?></h1>
Change the ## to the ID of the blog you want.
¥
4 lexagon Jul 02, 2006 16:51
5 edb Jul 03, 2006 00:21
I live in Phoenix so for me it's much easier.
$season = 'summer';
if( hell_froze_over )
{
$season = 'mild summer ';
}
6 yabba Jul 03, 2006 02:19
Would that be Phoenix alpha? In which case it'd be if( $season <= 'hell_froze_over'). Or Phoenix beta? In which case that'd be if( $greenpeace == 'complaining at the melt rate of hell'). Or Phoenix? In which case yer original if() is correct ? :p
¥
7 balupton Jul 03, 2006 06:26
Offtopic:
¥åßßå, that is one awesome switch statement :D
Edit:
Back on topic, what about the people on the other hemisphere.... As the seasons are reversed....
8 yabba Jul 06, 2006 11:10
balupton wrote:
Back on topic, what about the people on the other hemisphere.... As the seasons are reversed....
I'm guessing that you can work that one out .... if not then the simplest solution is to move to america ;)
¥
Since the blogtitle is grabbed from what you put in in the backoffice, you can yourself change the title of your blog the first of november.
You can change the title of your blog as often as you want...
Wouldn't that solf your needs ?