After adding custom header, some JS functions stops working. After adding custom header, some JS functions stops working.
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

After adding custom header, some JS functions stops working.

Started by linuxhata, July 26, 2005, 06:19:01 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

linuxhata

I've added a counter to the template.html, after that, in the gallery, clicking on image doesn't opens it in new window. I've tried to move counter to the different places of template, but still doesn't works.

here you can see it:

http://www.hangebi.com/uzrdeli [edit GauGau]Link contains mild nudity, not worksafe[/edit]

Any ideas?

Joachim Müller

then the other script uses the same function names as coppermine's config script. Either adjust one of them to use different names (if you know enough JavaScript), or use another counter.

linuxhata

<!-- TOP.HOST.GE COUNTER CODE -->
<script language=JavaScript src="http://top.host.ge/cgi-bin/cod?100+1789"></script>
<noscript>
<a target=_top href="http://top.host.ge/cgi-bin/showtop?1789">
<img src="http://top.host.ge/cgi-bin/count?ID:1789+JS:false" border=0 alt="TOP.HOST.GE"></a>
</noscript>   
<!-- / END OF COUNTER CODE --></p>

I think that there may be some error in code? (don't know HTML so good)

The problem is that I can't remove this counter, because it is counter for top-100 sites, and most visitors came from there.

Joachim Müller

the code you posted is just the command to make the page load the actual JavaScript, so you can't see anything from those lines. I already had a look at them, but as you can't mess with the code from the counter, you'll have to mess with coppermine's file script.js (if you know your way around). If you can't, then either live with the current situation or hire someone to fix this for you. There are often issues when using two different JavaScript codes. After all, JS sucks. As a workaround, I recommend changing the code that actually opens the full-size pop-up: edit displayimage.php, find            $pic_html = "<a href=\"javascript:;\" onClick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=yes,status=yes,resizable=yes,width=$winsizeX,height=$winsizeY')\">";and replace with            $pic_html = "<a href=\"displayimage.php?pid=$pid&fullsize=1\" target="$pid">";Not as pretty, but should do the trick.

linuxhata

Thanks for reply, I've modified it as you've said but:

Parse error: parse error, unexpected T_VARIABLE in /home/janigs/public_html/uzrdeli/displayimage.php on line 188

I'm getting this

kegobeer

            $pic_html = "<a href=\"displayimage.php?pid=$pid&fullsize=1\" target=\"$pid\">";

Try that.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

linuxhata