new theme us

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 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

<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”;

If I ever need the index to be listed in a different way due to theme change, I can do something like:

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 thoughts on “new theme us

  1. 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 πŸ˜‰

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s