From: Adam M. <ad...@tu...> - 2002-10-14 13:58:30
|
I like the implementation. This way if you have 2 browsers who can share a style sheet you don't have to make one for "browser a" and one for "browser b". I have a question though...does it still relative link the style sheet or are you writing it to the {STYLE} variable as a <style></style>? If you relative link to the file, most browsers seem to read this file only once and cache it. But if it is included as a <style> tag, the browser is forced to get this on every page hit. Might be something to talk about? Adam > Greetings, > > There is new code in CVS to support multiple style sheets. Here is how > it works. > > There is a new file in the theme named browsers.txt. It contains a > listing of perl search strings and the appropiate style sheet to use. > For example: > > Opera::opera.css > MSIE 5.5::explorer.css > Netscape6::netscape.css > > The first part before the double colons is the perl search (pretty basic > in this example). Afterwards is the name of the style sheet to load > INSTEAD of style.css if the search is TRUE. > > Layout then: > 1) checks for the existance of the browser.txt file. > 2) if true, layout reads the file and parses the list > 3) if the browser is found AND if the style sheet exists, layout puts > the address of the style sheet in the {STYLE} tag > 4) if no conditions are met successfully and if style.css exists, the > {STYLE} tag is set to the style.css address. > 5) if none of the conditions are met, {STYLE} is never initialized. > > Note that I removed the <link> tag and it is now echoed along with the > address. > > I could also add a parameter to the browser.txt files so that {STYLE} > will echo the entire style sheet instead of merely linking to it. That > would allow for preprocessing of the style sheet before it hits the > theme. > > Let me know what you think and I will update the documentation if all is > kewl. > > Thanks, > Matt > > > > Matthew McNaney > Internet Systems Architect > Electronic Student Services > Email: ma...@tu... > URL: http://phpwebsite.appstate.edu > Phone: 828-262-6493 > ICQ: 141057403 > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers --------------------------------- Adam Morton Developer - Web Technology Group Appalachian State University http://phpwebsite.appstate.edu |