coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: rlhenson on February 27, 2007, 11:55:50 PM

Title: Error in Terra theme
Post by: rlhenson on February 27, 2007, 11:55:50 PM
I really like the Terra theme but noticed a minor error when using IE.
If you to to the demo In IE, right here at http://coppermine-gallery.net/demo/cpg14x/index.php?theme=terra (http://coppermine-gallery.net/demo/cpg14x/index.php?theme=terra) you will see 

Coppermine Photo Gallery (Stable)
Demo for cpg1.4.x
-->

But if you use Firefox the --> is not there. I have looked all through the theme and can't find an extra --> with out an associated <!--

Does anyone know haw to fix this. I wish that everyone would just use Firefox but unfortunately IE is still the predominant browser.

Thanks in advance for any help,

Rick
Title: Re: Error in Terra theme
Post by: Nibbler on February 28, 2007, 12:01:51 AM
The script section at the top is not correct; the starting <script> tag is missing.


<script type="text/javascript" src="scripts.js"></script>
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->
</script>
Title: Re: Error in Terra theme
Post by: Joachim Müller on March 01, 2007, 07:50:45 AM
Just for clarification: the code posted by Nibbler needs to be changed to<script type="text/javascript" src="scripts.js"></script>
<script type="text/javascript">
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->
</script>
Title: Re: Error in Terra theme
Post by: rlhenson on March 01, 2007, 07:05:18 PM
Thank you very much for both responses. that did the trick.

Rick