Removing @ 'popup lines' from Igames theme Removing @ 'popup lines' from Igames theme
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Removing @ 'popup lines' from Igames theme

Started by Hercules24, April 21, 2007, 04:55:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Hercules24

I've got a modified Igames theme in my gallery.
Since I don't want any more spammers to register I've already killed the @ button completely.
There is still a bunch of javascript code in the template.html, which I think I can delete now, but I can better be safe than sorry later on....
I already deleted all the ''Mouseover lines" in theme.php to hide the @ text (If not I got an 'error on page' when deleting this javascript code)
I know nothing about javascript, but can I now safely remove the following code in the head section of template.html?
(I tried it and it looked fine too me, but maybe I destroy something else I don't want to find out later on, so I restored the file)
My gallery can be found here: http://www.kuikens.com/pictures

<script language="JavaScript" 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>


Only this line of JS code will still be present in the head file or is that code obsolete too? (I still like to see the mousover stuff when you move your mouse across the menu buttons in CPG)

<script type="text/javascript" src="scripts.js"></script>

Thanks for taking a look.

Hercules24

Without wanting to be inpolite, it occurs that my question maybe was not very clear zo I'll try to rephrase it a bit shorter:

Does that big block of javascript in my first posting do anything besides hiding and showing the menu to register/login/logout etc. and can it be safely removed without disabling other functions tot the gallery?

Nibbler

It's code that is specific to the theme, so it can't affect core functions. If you don't want people to register then just disable registration in config.

scripts.js is mandatory however.

Hercules24

Thanks Nibbler, I will remove the java text for these purposes:
-Code & search engine optimalisation. Less code = more emphasis on the rest and faster loading time.
-Less bot and spider activity.
-Less chance of people trying to hack or start asking questions how to login because they can still see the login button.

Problem solved.