forum.coppermine-gallery.net

Support => cpg1.4 plugins => cpg1.4.x Support => Older/other versions => cpg1.4 plugin contributions => Topic started by: Paver on May 06, 2006, 03:29:24 am

Title: Add Pop-ups to DisplayImage.php
Post by: Paver 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 (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.
Title: Re: Add Pop-ups to DisplayImage.php
Post by: yakamoz01 on February 02, 2007, 02:43:26 pm
thanx i need it
Title: Re: Add Pop-ups to DisplayImage.php
Post by: top10ufo on October 02, 2009, 05:29:19 pm
Have you considered changing this to a popunder instead of a popup window?
Title: Re: Add Pop-ups to DisplayImage.php
Post by: top10ufo 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 (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.
Title: Re: Add Pop-ups to DisplayImage.php
Post by: DigitalMind 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!