Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
integrate an affiliate program
Hi,
I helped a friend redesign his site on TXP. He sells products (via Paypal) on his site, and in his old site he used to track referers for an affiliate program.
In the old site, he’d receive request such as www.hissite.com/index.php?referer=affiliatename
He’d like to integrate that capability with the new TXP site, but if in TXP you have the address as above, instead of ignoring the unknown variable or sending me to the error page, it sends me to an empty page based on the default page.
Is there a way we can make TXP ignore the referer variable? We’d just like to include a php file in the theme page to run the affiliate program.
Maybe something can be done to the htaccess file?
Thanks
Offline
#2 2007-02-24 02:24:26
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: integrate an affiliate program
…but if in TXP you have the address as above, instead of ignoring the unknown variable or sending me to the error page, it sends me to an empty page based on the default page.
That shouldn’t be. It should just ignore it. Any plugins installed? If you turn on debugging, do you get any error messages?
Offline
Re: integrate an affiliate program
When I turn on the debugging I don’t get any errors, just empty pages. In the diagnostics page I do get two error:
“Clean URLs are only supported by Apache, use at your own risk.”
and
“Your version of PHP has security related risks. Please turn register_globals off or update to a newer PHP version. “
I’m not sure what server they’re running, but the clean urls are working.
Here’s the link:
http://www.commodorebook.com/index.php
You can try something like the following to see what happens:
http://www.commodorebook.com/index.php?referer=someguy
I forgot. Plugins installed are:
hak_article_image
hak_tinymce
zem_contact_lang
zem_contact_reborn
Thanks
Last edited by coopersita (2007-02-24 03:26:20)
Offline
#4 2007-02-24 05:21:54
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: integrate an affiliate program
What is in your default page? Notice how this page does work: http://www.commodorebook.com/contact/?referer=someguy
Offline
Re: integrate an affiliate program
I now realize what was going on. I have one template for the while site, and to determine what goes in the home page I was using php:
<txp:php>
if ($_SERVER[‘REQUEST_URI’] "/" || $_SERVER['REQUEST_URI'] “/index.php”) {
…
I changed it to :
<txp:if_section name=“default”>
…
and now it works like a charm.
At the time when I made this template I wasn’t aware of the if_section tag with the default attribute to detect the home…
Thank you so much Mary!
Offline
Pages: 1