Advanced search  

News:

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

Pages: [1]   Go Down

Author Topic: Add Pop-ups to DisplayImage.php  (Read 29834 times)

0 Members and 1 Guest are viewing this topic.

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1608
  • Paul Van Rompay
Add Pop-ups to DisplayImage.php
« on: May 06, 2006, 03:29:24 am »

Although I do not like ad popups myself, this plugin was so similar to my "delete control" plugin that it was simple to implement.  If you want to do this, here's a plugin to do it.

The proposal thread is here: http://forum.coppermine-gallery.net/index.php?topic=29218.0

Basically you set 6 links in codebase.php and a "popup every X clicks" in the configuration option in codebase.php.  Then every X clicks on displayimage.php, a popup window appears, with the link being one of the 6 you set.  The 6 links are cycled through.

There's a README with information.  Admins in "admin mode" will not see the popups.  Change to "user mode" if you want to test things out.  In general, you should also log in as a non-admin user to check things out.
« Last Edit: May 06, 2006, 05:40:45 am by Paver »
Logged

yakamoz01

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
  • www.unluler.info
    • Gizemli ünlüler
Re: Add Pop-ups to DisplayImage.php
« Reply #1 on: February 02, 2007, 02:43:26 pm »

thanx i need it
Logged

top10ufo

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
  • www.top10ufo.com
    • Best UFO Videos
Re: Add Pop-ups to DisplayImage.php
« Reply #2 on: October 02, 2009, 05:29:19 pm »

Have you considered changing this to a popunder instead of a popup window?
Logged

top10ufo

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
  • www.top10ufo.com
    • Best UFO Videos
Re: Add Pop-ups to DisplayImage.php
« Reply #3 on: October 02, 2009, 07:07:26 pm »

Messing around trying to get the popup to be a popunder instead, I figured it out:

In codebase.php add the following in bold to your code:


$a_link[0] = "window.open('http://www.yourdomain.com/'); window.focus";
$a_link[1] = "window.open('http://www.yourdomain.com/'); window.focus";
$a_link[2] = "window.open('http://www.yourdomain.com/'); window.focus";
$a_link[3] = "window.open('http://www.yourdomain.com/'); window.focus";
$a_link[4] = "window.open('http://www.yourdomain.com/'); window.focus";
$a_link[5] = "window.open('http://www.yourdomain.com/'); window.focus";

You can see it in action here: http://www.top10ufo.com/photos/displayimage.php?album=toprated&cat=0&pos=0

I have it set for 5 clicks.

Hope this helps anyone who needed it as well.
Logged

DigitalMind

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 36
Re: Add Pop-ups to DisplayImage.php
« Reply #4 on: November 04, 2009, 05:34:03 pm »

Thanks, it's been very handy on demotivationalpics.com ... I changed it ever so slightly so that members of the VIP USER group do not get the pop-ups.  It's great! 
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 23 queries.