Advanced search  

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]

Pages: [1]   Go Down

Author Topic: After adding custom header, some JS functions stops working.  (Read 3718 times)

0 Members and 1 Guest are viewing this topic.

linuxhata

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50

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?
« Last Edit: July 27, 2005, 11:39:49 pm by kegobeer »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: After adding custom header, some JS functions stops working.
« Reply #1 on: July 26, 2005, 07:41:44 am »

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.
Logged

linuxhata

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: After adding custom header, some JS functions stops working.
« Reply #2 on: July 26, 2005, 08:00:19 am »

<!-- 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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: After adding custom header, some JS functions stops working.
« Reply #3 on: July 26, 2005, 08:12:25 am »

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
Code: [Select]
            $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
Code: [Select]
            $pic_html = "<a href=\"displayimage.php?pid=$pid&fullsize=1\" target="$pid">";Not as pretty, but should do the trick.
Logged

linuxhata

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: After adding custom header, some JS functions stops working.
« Reply #4 on: July 26, 2005, 09:04:09 am »

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
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: After adding custom header, some JS functions stops working.
« Reply #5 on: July 26, 2005, 12:50:08 pm »

Code: [Select]
            $pic_html = "<a href=\"displayimage.php?pid=$pid&fullsize=1\" target=\"$pid\">";
Try that.
Logged
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

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: After adding custom header, some JS functions stops working.
« Reply #6 on: July 27, 2005, 11:37:19 pm »

That worked, thank you!
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 20 queries.