Add Pop-ups to DisplayImage.php Add Pop-ups to DisplayImage.php
 

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

Add Pop-ups to DisplayImage.php

Started by Paver, May 06, 2006, 03:29:24 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Paver

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.

yakamoz01


top10ufo

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

top10ufo

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.

DigitalMind

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!