Home > Archive > PHP Smarty Templates > July 2004 > RE: [SMARTY] including a browser sniffer's output into my templates
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
RE: [SMARTY] including a browser sniffer's output into my templates
|
|
| Erich Beyrent 2004-07-29, 3:58 pm |
| Why not use javascript?
<!-- This code sets up platform specific CSS ->>
<SCRIPT language = "JavaScript">
if (navigator.appVersion.toLowerCase().indexOf("win")!=-1)
{
<!-- This sets up the Windows-specific CSS code -->
document.writeln("<link REL=stylesheet HREF=\"stylesheet_win.css\">")
}
else {
<!-- This sets up the Mac-specific CSS code -->
document.writeln("<link REL=stylesheet HREF=\"stylesheet_mac.css\">")
}
</SCRIPT>
-Erich-
-----Original Message-----
From: Thorsten [mailto:shockie@gmx.net]
Sent: Thursday, July 29, 2004 5:47 AM
To: smarty-general@lists.php.net
Subject: [SMARTY] including a browser sniffer's output into my templates
hi,
NB: this may be indirectly related to an earlier question of mine
regarding inserting an obfuscated mailto-link into pages. if it resolves
to the same solution (use "fetch"), i was unable to get the other thing
working thusfar.
i'd like to include a browser sniffer into my pages which is written in
php, so i can put the correct, browser-specific css path into my pages.
i cannot get this to work at all as of yet, because i can't figure out
how to place the sniffer code into my template/php file. the sniffer
requires me to include a php file (which does the work and finally echos
the respective css path) into my xhtml, but whatever i've tried so far,
the include statement is only literally printed into my xhtml output.
is there a way to "catch" the include's output and insert it? i tried
the fetch method, but to no avail here.
help is appreciated,
- Thorsten
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
| |
| Thorsten 2004-07-29, 3:58 pm |
| Erich Beyrent wrote:
> Why not use javascript?
i'd rather not use it because it's client-side and the user can disable
javascript, other than that it's a totally valid approach of course, thx.
- Thorsten
|
|
|
|
|