You are required to register before you can post. This is via a custom verification system. Please post any problems you are encountering here and I`ll do my best to respond as soon as I can. Please note that a reply WILL be posted to all queries, so do not double post. There are no guarantees
when a reply will appear but I do my best to answer all within 3/4 days max. Bumping topics won`t make the slightest difference.
IMPORTANT: Posts in English ONLY please, thank you! Any other languages will be ignored and your message deleted.
SEARCH: Use the search option to see if your question has been answered on the forum before. Or check the relevant script docs.
CUSTOMER: If you have purchased a commercial version of any of my software, using the contact option at the licence centre ensures a faster response.
AUTO DELETION: Accounts older than 5 days, with no posts or topics, are automatically deleted. Only register if you are thinking of posting.
PRIVATE MESSAGES: Private messages are currently disabled.
LINKS: Any links posted are 'NOFOLLOW' and will not be picked up by search engines.
You are not logged in.
Pages: 1
we use javascript to call our old tellafriend scrpt, but have too many links to change them all.
Our Javascript looks like this
Link Script:
<a href="javascript:;" onClick="m3_openBrWindow('http://x.domain.com/siterefer/sr_form.php?referring_url=' + window.location.href,'','scrollbars=yes,resizable=yes,width=530,height=520')" class="blut1">Friend</a>
Popup javascript:
function m3_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
How can we make this script pick up the referrer URL?
Will register and/or pay if we can make this work!
Last edited by markosjal (31-03-2010 00:28:49)
Offline
Not sure I can be much help with javascript, sorry. I`m patchy with js, so not sure how you get the referer.
Offline
Here is an example of the landing page from the javascript
http://x.DOMAIN.com/siterefer/sr_form.php?referring_url=http://www.OTHERDOMAIN.com/FILE.htmmaybe it is then easier to look at the output of the JS so that the PHP can be conformed to it?
the part of the landing URL
?referring_url=http://www.OTHERDOMAIN.com/FILE.htmindicates the referring page
I suppose under the current scenario we might simply pass this variable on to the REFERER variable in your script , if we only knew how.
Last edited by markosjal (01-04-2010 07:59:35)
Offline
<a href="javascript:;" onClick="m3_openBrWindow('http://x.domain.com/siterefer /sr_form.php?referring_url='<?php echo $_SERVER['HTTP_REFERER']; ?>','','scrollbars=yes,resizable=yes,width= 530,height=520')" class="blut1">Friend</a>
Wouldn`t that work?
Offline
we have the Javascipt that produces the output as identified in my previous post. How can we pass the variable after the "?" to the REFERER variable in the PHP. It is difficult to change the links in over 30.000 pages that link to it!
If that URL variable can be translated to the REFERER variable,. we have it made.
Offline
RESOLVED:
Here is the fix to pass the referring_url variable to the tell a friend script
original code:
<div id="comments">
<label><?php echo $this->COMMENTS; ?>:</label>
<textarea rows="4" cols="20" name="comments"><?php echo $this->COMMENTS_VALUE;
</div>New code
<div id="comments">
<label><?php echo $this->COMMENTS; ?>:</label>
<textarea rows="4" cols="20" name="comments"><?php echo $this->COMMENTS_VALUE;
// 2 lines below are what echo the URL variable to the script
$val = $_GET['referring_url'];
echo "the link is: $val";?></textarea>
</div>Offline
Glad you got it sorted. ![]()
Offline
Please note that this post relates to anyone trying to pass a URL variable to the friend script.
Offline
Pages: 1