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

krisa [ Quote ]

this is absolutely lovely.

November 11th, 2003 at 11:24 am
dodo [ Quote ]

thanks :)

November 11th, 2003 at 11:31 am
Daynah [ Quote ]

hey sis, I really like this!!! The colors are bold…. very easy to read, and clean! :) Good job. ^_^

November 11th, 2003 at 11:40 am
Daynah [ Quote ]

oh yea, I like arrays too. hehe I was avoiding them for a while but now they’re so much fun to play with. ^_^

November 11th, 2003 at 11:42 am
donny [ Quote ]

very attractive. Nice use of colors. Quite organized. 2 thumps up!

November 11th, 2003 at 12:27 pm
hannah [ Quote ]

wow~ the colors are really pretty and it looks both cute and professional. ^^ *admires*

November 11th, 2003 at 2:03 pm
jon [ Quote ]

I posted a responce at tabulas, but i’ll go here too :) It’s very nice, I love how it looks, it looks excellent!

November 11th, 2003 at 2:28 pm
mtwib [ Quote ]

It is very lovely and neat :) You guys look so adorable!

November 11th, 2003 at 3:21 pm
kir [ Quote ]

hey it´s lovely! I´m impressed. Congrats Dodo!

November 11th, 2003 at 3:35 pm
ecila [ Quote ]

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

November 11th, 2003 at 4:31 pm
dodo [ Quote ]

fixed.

November 11th, 2003 at 4:50 pm
Wendy [ Quote ]

I really like this! I like the colors and the simplicity of it. Great job!

November 11th, 2003 at 5:18 pm
Lele [ Quote ]

DROOL.. it looks GREAT!!!!!!!!! I LOVE IT! One of your best definitely!

November 12th, 2003 at 1:01 am
linda [ Quote ]

wow it’s really cool!! just love it!!

November 12th, 2003 at 8:28 pm

Leave a Comment Name, email and comment are required.
Email will never be displayed.

Leave a Comment
  1. :biggrin: :blank: :blush: :bored: :confused: :cool: :down: :evil: :frown: :grin: :grr: :laidback: :left: :mad: :right: :sad: :secret: :shock: :smile: :stress: :tongue: :up: :wink: :yawn: :cute: :dead: :film: :floppy: :glasses: :grumpy: :headphones: :heart: :lightbulb: :ouch: :tv: :upsidedown: :vodka: :yell: :yuck: :yummy: