new theme us
November 11th, 2003
the new theme “us” is released. if you don’t yet see it, click here. what took the longest was the css writing (yes this layout is made with tableless css) and the navigation coding. i coded all the navigations now with php arrays. that way i will only need to change one file when i update the navigations for the four sections index and the left menus. i will briefly talk about my php code.
each section has an array file that contains php code like:
$section_name = “Domain”;
$section_link[] = “/domain/intro.php”;
$section_link_name[] = “intro”;
$section_link_desc[] = “tells you why, when did I start pure-essence.net and other related information.”;
$section_link[] = “/domain/themes.php”;
$section_link_name[] = “themes”;
$section_link_desc[] = “find out what are the themes for this domain and how to change them.”;
…
When I make the actual index file i.e. /domain/index.php, I just put
<?
include_once(”/home/pure/www/index/domain_index.php”);
?>
<div class=”rings”><?=$section_name?></div>
<div class=”just”>
<?
for($i = 0; $i < count($section_link); $i++) {
echo “· <a href=”$section_link[$i]“>$section_link_name[$i]</a> - $section_link_desc[$i]<br /><br />\n”;
}
?>
</div>
If I ever need the index to be listed in a different way due to theme change, I can do something like:
<?
include_once(”/home/pure/www/index/domain_index.php”);
for($i = 0; $i < count($section_link); $i++) {
$section_link_desc[$i] = strip_tags($section_link_desc[$i]);
echo “<a href=”$section_link[$i]” title=”$section_link_desc[$i]“>$section_link_name[$i]</a> \n”;
}
?>
This is used for my left side menu for each section. Of course the left side menu can not be done without path testing. Thus stuff like:
if(strstr($_SERVER[PATH_TRANSLATED], “public_html/domain”)) {
$this_section = “domain”;
} elseif(strstr($_SERVER[PATH_TRANSLATED], “public_html/mistress”)) {
$this_section = “mistress”;
}…
are very helpful
Don’t worry if you don’t understand my code. I just feel geeky so I explained it a little bit to those who are interested in coding. Cheer for php arrays!
14 Comments Leave a Comment
November 11th, 2003 at 11:24 am November 11th, 2003 at 11:31 amhey sis, I really like this!!! The colors are bold…. very easy to read, and clean!
Good job. ^_^
oh yea, I like arrays too. hehe I was avoiding them for a while but now they’re so much fun to play with. ^_^
wow~ the colors are really pretty and it looks both cute and professional. ^^ *admires*
I posted a responce at tabulas, but i’ll go here too
It’s very nice, I love how it looks, it looks excellent!
great layout dodo!!
Looks a tad funkay in mozilla firebird though (thought you would like to know)… the style for your entries cut short. So like after your first entry you see the “html css credit copyright” bar.. but with the rest of your entries under… or following.
But still, the layout is really nice, simple, and clean 


this is absolutely lovely.