Support Forum Project Downloads FAQ Documentation About Demo Tutorials Blog Plugins
November 21, 2009, 02:12:46 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Maintenance release cpg1.4.25 - upgrade recommended
The Coppermine development team is releasing an update for Coppermine in order to fix an issue with http uploads that could occur in particular versions of PHP.The fix is not security-critical, so if your gallery is running fine with cpg1.4.23 or cpg1.4.24 you don't need to upgrade. If you are running an older version than cpg1.4.23, you must update to this latest version as soon as possible because of the security impact (the past few maintenance releases before cpg1.4.24 all were security-related).
[more]
   Home   Help Search Board rules Login Register  
Pages: [1]   Go Down
  Send this topic  |  Print  
Author Topic: Add Pop-ups to DisplayImage.php  (Read 5809 times)
0 Members and 1 Guest are viewing this topic.
Paver Topic starter
Dev Team member
****
Gender: Male
United States United States

Posts: 1604


Paul Van Rompay


« on: May 06, 2006, 02: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.

* cpg1.4_plugin_popup_control_1.0.zip (2.08 KB - downloaded 423 times.)
« Last Edit: May 06, 2006, 04:40:45 am by Paver » Logged
yakamoz01
Coppermine newbie

Posts: 10

www.unluler.info


WWW
« Reply #1 on: February 02, 2007, 01:43:26 pm »

thanx i need it
Logged
top10ufo
Coppermine newbie

United States United States

Posts: 7

www.top10ufo.com


WWW
« Reply #2 on: October 02, 2009, 04:29:19 pm »

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

United States United States

Posts: 7

www.top10ufo.com


WWW
« Reply #3 on: October 02, 2009, 06: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 newbie

Canada Canada

Posts: 7


« Reply #4 on: November 04, 2009, 04: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
  Send this topic  |  Print  
 
Jump to:  

Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC
Page created in 0.037 seconds with 18 queries.