Template Help Needed: How do I add Browser Conditional Codes Correctly?

rvalen1

Joined: 2007-10-19
Posts: 3
Posted: Wed, 2009-11-18 02:26

I am helping a friend add Gallery2 to her current website since she moved to a new hosting provider.

The URL of the site is www.kayadance.com
The URL for the gallery in question is: http://www.kayadance.com/gallery

Gallery version: 2.3
Module / Theme name & version: Matrix v1.1.6
PHP version (e.g. 5.1.6): PHP 5.2.11
Webserver (e.g. Apache 1.3.33): 2.2.14 (unix)
Database (e.g. MySql 5.0.32): MySQL 5.0.81
Operating system (e.g. Linux): Linux
Browser (e.g. Firefox 2.0): IE8

I basically copied my header code of the original site into the theme.tpl file.

My issue is:

I had the following conditional codes on my html but when I add it to the theme.tpl, the gallery doesn't load at all. As you can see I placed comments on it below since I had to comment it out on my original theme.tpl file.

{* <!--[if lte IE 6]>
* <style>.p7PMMh08 ul ul li {float:left; clear: both; width: 100%;}.p7PMMh08 {text-align: left;}.p7PMMh08, .p7PMMh08 ul ul a {zoom: 1;}</style>
* <![endif]-->
* <!--[if IE 5]>
* <style>.p7PMMh08, .p7PMMh08 ul ul a {height: 1%; overflow: visible !important;} .p7PMMh08 {width: 100%;}</style>
* <![endif]-->
* <!--[if IE 7]>
* <style>.p7PMMh08, .p7PMMh08 a{zoom:1;}.p7PMMh08 ul ul li{float:left;clear:both;width:100%;}</style>
* <![endif]-->
*}

However when I place the code above, the site just loads a white screen.

Can someone help me and tell me how this should be added to code correctly??

AttachmentSize
theme.txt8.77 KB
 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2009-11-18 03:12

So the above code is commented out?
You could try:

{literal}
<!--[if lte IE 6]>
<style>.p7PMMh08 ul ul li {float:left; clear: both; width: 100%;}.p7PMMh08 {text-align: left;}.p7PMMh08, .p7PMMh08 ul ul a {zoom: 1;}</style>
<![endif]-->
<!--[if IE 5]>
<style>.p7PMMh08, .p7PMMh08 ul ul a {height: 1%; overflow: visible !important;} .p7PMMh08 {width: 100%;}</style>
<![endif]-->
<!--[if IE 7]>
<style>.p7PMMh08, .p7PMMh08 a{zoom:1;}.p7PMMh08 ul ul li{float:left;clear:both;width:100%;}</style>
<![endif]-->
{/literal}

http://www.smarty.net/manual/en/language.function.literal.php

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
rvalen1

Joined: 2007-10-19
Posts: 3
Posted: Wed, 2009-11-18 03:24

Thanks. It looks like that fixed it since the pages are loading faster now and not giving me errors.