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: Add popup to gallery / $50  (Read 10470 times)

0 Members and 1 Guest are viewing this topic.

opulence

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 46
Add popup to gallery / $50
« on: March 16, 2006, 09:29:19 am »

I'd like for displayimage.php to issue a popup every 'x' amount of clicks to 'x' popup - I guess by means of a cookie / counter.

I want to be able to define x both for both the amount of clicks before a user gets a popup, (every 3rd click, every 4th click, etc) and I also want to be able to define the amount of popups they get, and obviously, want to be able to define the links of the popups.

I previously had this working with cpg 1.3.x programmed by George_CC but it doesn't seem to be working with cpg 1.4.4 that I just upgraded to

Here is the previous code:

Code: [Select]
session_start();


$a_link[0] = "window.open('http://www.link1.com');";
$a_link[1] = "window.open('http://www.secondlink.com');";
$a_link[2] = "window.open('http://www.anotherlink.com');";
$a_link[3] = "window.open('http://www.andanother.com');";
$a_link[4] = "window.open('http://www.example.com');";
$a_link[5] = "window.open('http://www.lastone.com');";



if (strstr($_SERVER['PHP_SELF'], "displayimage.php")) {
if(!isset($_SESSION['c_count']) || !is_numeric($_SESSION['c_count']) || $_SESSION['c_count']>(count($a_link)-1)){
$_SESSION['c_count'] = 0;
}
if(!isset($_SESSION['c_cpg']) || !is_numeric($_SESSION['c_cpg'])){
$_SESSION['c_cpg'] = 0;
}
if(!isset($_SESSION['c_link']) or $_SESSION['c_link']==""){
$_SESSION['c_link'] = $a_link[0];
$_SESSION['c_count'] = 0;
}
if(++$_SESSION['c_cpg']==3) {
$showpopup = true;
$_SESSION['c_link'] = $a_link[$_SESSION['c_count']];
$_SESSION['c_cpg'] = 0;
$_SESSION['c_count']++;
}
}

George did this for 30$, I'll pay another 30$ if someone can edit/get this working for me with the latest ver of CPG.
« Last Edit: May 24, 2006, 02:09:02 pm by Paver »
Logged

opulence

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 46
Re: Add popup to gallery / $
« Reply #1 on: May 02, 2006, 07:02:53 pm »

Come on... anyone?
Logged

opulence

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 46
Re: Add popup to gallery / $50
« Reply #2 on: May 05, 2006, 07:22:53 pm »

50 dolla make ya holla!
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Add popup to gallery / $50
« Reply #3 on: May 06, 2006, 02:04:59 am »

Don't cross-post on unrelated threads.  It's fine to increase your offering price, but don't poison unrelated threads with want ads.

(note to admins: I screwed up and deleted the cross-post instead of archiving it.  It was attached to a 8-month-old thread.)
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Add popup to gallery / $50
« Reply #4 on: May 06, 2006, 03:30:45 am »

See if this does what you want: Plugin: Add Pop-ups to Displayimage.php.

If so, private message me to discuss payment.   :)
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Add popup to gallery / $50
« Reply #5 on: May 24, 2006, 02:08:47 pm »

Well I guess providing things up-front is probably not a good idea for paid work.  I haven't heard a thing but oh well, maybe someone will find the plugin useful as an educational example of how to store a session variable and attach something to a particular Coppermine page.

Marking this thread as "Closed" since the plugin provides the functionality requested.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 20 queries.