Tell a friend tag - need help with $pageURL
Posted: Sun Jun 17, 2007 4:39 am
I'm using the Tell a friend tag and modified the function to open the form in a new window with the help of this post: http://forum.cmsmadesimple.org/index.php/topic,8698.msg54035.html#msg54035.
It works, but the one problem I can't figure out is how to fix the way the url displays in the email message. Instead of being http://www.website.com/page, it displays: http://www.website.comhttp://www.website.com/page/
I'm assuming it has something to do with this code:
Unfortunately I suck at PHP and can't figure out what to modify to make the referring URL display correctly in the email message. I tried playing around with it, but no luck.
Can someone please help?
Thanks!
It works, but the one problem I can't figure out is how to fix the way the url displays in the email message. Instead of being http://www.website.com/page, it displays: http://www.website.comhttp://www.website.com/page/
I'm assuming it has something to do with this code:
Code: Select all
$pageURL = "\r\n\r\nhttp";
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["HTTP_REFERER"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["HTTP_REFERER"];
}Can someone please help?
Thanks!