View Single Post
  #5   Spotlight this post!  
Unread 19-02-2005, 20:55
lookslikeapuma lookslikeapuma is offline
Team 1039 Member
#1039 (Chief Sealth Robotics)
Team Role: Webmaster
 
Join Date: Feb 2005
Rookie Year: 2003
Location: Seattle, Washington
Posts: 23
lookslikeapuma is on a distinguished road
Send a message via AIM to lookslikeapuma
Re: Team 1039's website

Quote:
Originally Posted by DarkJedi613
Why would you have the script be on the same page? Aren't you forcing either the download of more information or a more server intensive processing?
actually once i had the system down it was much simpler than creating two pages (and more flexible, since now i can add other modes easily) Here's a quick verbal script over view

Set variable M as User's Mode
Load Shared Style Sheet (style sheet that's shared with all modes)
Load M.css (right now there is Simple.css and Graphic.css, notice how no conditionals are used)
Get M_navigation.php (again, no conditionals such as if ($m=="graphic){})
Display page content (same in all modes, except for some pages, like in the front page, the sidebar has graphics, that uses the same method i did with the navigation and footer)
Get M_ footer.php

and bam, your page presented to you. If i wanted to add say the "Blue" mode, all i'd have to do is create Blue.css, Blue_navigation, and Blue_footer. And ofcourse add an option to select it in the mode selection page.

[Edit]
Plus! It saves a lot of disc space!
[End Edit]

Last edited by lookslikeapuma : 19-02-2005 at 21:06.