View Full Version : Providing different tour options
terry
2004-07-08, 08:33 AM
Hi All,
I have a paysite that I would like to offer different tours for my affiliates, 1 with a popup and the other without.
Is there a script or code somewhere that I could use to do this?
Im using CCBill for billing.
Thanks for your help,
Terry
Greenguy
2004-07-08, 08:36 AM
Basically just copy the tour into a different directory & remove the pop-up. Then make sure the multiple URL/page thing is turned on in the CCBill admin so that the webmaster can send traffic to any page on the site using the &HTML=http://www.whatever.com/ part on the end of the URL.
terry
2004-07-08, 08:58 AM
Excellent Greenguy.. THANKS!
Terry
terry
2004-07-08, 10:43 AM
Ok the above works.. now lets go to the next step...
Lets say I wanted to offer hosted galleries, using the above I would have to make double galleries, one for each link.
I am sure with php I can use just one gallery and forward it to one tour or another just adding a variable to the URL... am I wrong?
Thanks,
Terry
Thiago Dickman
2004-07-08, 11:33 AM
You're right, that's possible... you can do it with PHP using a querystring on your URL. You'll need to add something like this somewhere on your gallery:
<?php
// this checks if the "pop" querystring is available on the URL code. If if it, use it to determine if it should redirect or not; if it's not available, use no pop as default.
//If you want to use pop as default just change $pop = 0 to $pop =1
if (isset($_GET['pop'])) { $pop = $_GET['pop']; } else { $pop = 0; }
// edit the urls here...
if ($pop == 0) $gotourl = "http://www.yourdomain.com/nopop.html";
if ($pop == 1) $gotourl = "http://www.yourdomain.com/pop.html";
?>
Then on your link you will have something like this:
<a href="<?=$gotourl?>">Text</a>
All webmasters will need to do is adding a ?pop=0 suffix on the url if they don't want popups or 1 otherwise. Let's say your gallery is named gallery.php, so the two alternatives would be:
http://www.yourdomain.com/gallery.php?pop=0 (no popups)
http://www.yourdomain.com/gallery.php?pop=1 (with popups)
I'm pretty sure that will work even though I haven't tested the code above :)
Best Regards,
Thiago Dickman
terry
2004-07-08, 01:03 PM
Awesome Thiago.
I will give it a try.. and let you know.
Thanks,
Terry
vBulletin® v3.8.1, Copyright ©2000-2026, Jelsoft Enterprises Ltd.