forum.coppermine-gallery.net

Support => Looking for Freelancers / Paid help => Topic started by: opulence on March 16, 2006, 09:29:19 am

Title: Add popup to gallery / $50
Post by: opulence 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.
Title: Re: Add popup to gallery / $
Post by: opulence on May 02, 2006, 07:02:53 pm
Come on... anyone?
Title: Re: Add popup to gallery / $50
Post by: opulence on May 05, 2006, 07:22:53 pm
50 dolla make ya holla!
Title: Re: Add popup to gallery / $50
Post by: Paver 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.)
Title: Re: Add popup to gallery / $50
Post by: Paver on May 06, 2006, 03:30:45 am
See if this does what you want: Plugin: Add Pop-ups to Displayimage.php (http://forum.coppermine-gallery.net/index.php?topic=31166.0).

If so, private message me to discuss payment.   :)
Title: Re: Add popup to gallery / $50
Post by: Paver 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.