Golden_Eagle
10-03-2002, 12:57 PM
I don't know how much information your going to need for my little problem. But here goes!
This might get a little confusing! It did for me. But hopefully not for anyone who knows PHP. (Sadly, I don't!) :(
I am currently setting up a new toplist and would like to change the code that is sent out to the new sign up's. I believe I have found the coding which does this and would like to ask someone here why my new code which I have added is creating parsing errors. And if there is a solution to it.
Here is what the original code looks like -
include("data/".$ID."info.php");
$URLcode=$topURL."in.php?ID=".$ID;
$GetCodeMail='<A HREF="'.$URLcode.'"><IMG SRC="'.$voteURL.'" border="0"></A>';
And this is what I have changed it to -
include("data/".$ID."info.php");
$URLcode=$topURL."in.php?ID=".$ID;
$GetCodeMail='<A HREF="'.$URLcode.'" target="MyWindow" onClick="w=200;h=300;posx=screen.availWidth/2)-(w/2);posy=(screen.availHeight/2)-(h/2);win=window.open(this.href,this.target,'location=0,toolbar=0,resizable=1,
scrollbars=1,width='+w+',height='+h+',left='+posx+',top='+posy+',screenX='+posx+',screenY='+posy); win.focus(); return false;"><IMG SRC="'.$voteURL.'" border="0"></A>';
Code is all on the same line!
Effectively, all I have done is changed the link to have a controlled popup window and added some extra javascripting. What I'm asking I guess is - is this compatible?
If not, can anything be modified to allow for this to hapen?
Example.
All I need is this to show as the linking code
<a href="refererals link" target="MyWindow" onClick="w=200;h=300;posx = (screen.availWidth/2)-(w/2);posy = (screen.availHeight/2)-(h/2);win = window.open(this.href,this. target,'location=0,toolbar=0,resizable=1,scrollbars=1,width='+w+',height='+h+',left='+posx+',top='+p osy+',screenX='+posx+',screenY='+posy); win.focus(); return false;">;"><IMG SRC="'Vote Image Src'" border="0"></A>
Instead of this
<a href="referals link" target="_blank"><img src="Vote Image Src" border="0"></a>
Shown once sign up is completed and the user copy&pastes the code.
This might get a little confusing! It did for me. But hopefully not for anyone who knows PHP. (Sadly, I don't!) :(
I am currently setting up a new toplist and would like to change the code that is sent out to the new sign up's. I believe I have found the coding which does this and would like to ask someone here why my new code which I have added is creating parsing errors. And if there is a solution to it.
Here is what the original code looks like -
include("data/".$ID."info.php");
$URLcode=$topURL."in.php?ID=".$ID;
$GetCodeMail='<A HREF="'.$URLcode.'"><IMG SRC="'.$voteURL.'" border="0"></A>';
And this is what I have changed it to -
include("data/".$ID."info.php");
$URLcode=$topURL."in.php?ID=".$ID;
$GetCodeMail='<A HREF="'.$URLcode.'" target="MyWindow" onClick="w=200;h=300;posx=screen.availWidth/2)-(w/2);posy=(screen.availHeight/2)-(h/2);win=window.open(this.href,this.target,'location=0,toolbar=0,resizable=1,
scrollbars=1,width='+w+',height='+h+',left='+posx+',top='+posy+',screenX='+posx+',screenY='+posy); win.focus(); return false;"><IMG SRC="'.$voteURL.'" border="0"></A>';
Code is all on the same line!
Effectively, all I have done is changed the link to have a controlled popup window and added some extra javascripting. What I'm asking I guess is - is this compatible?
If not, can anything be modified to allow for this to hapen?
Example.
All I need is this to show as the linking code
<a href="refererals link" target="MyWindow" onClick="w=200;h=300;posx = (screen.availWidth/2)-(w/2);posy = (screen.availHeight/2)-(h/2);win = window.open(this.href,this. target,'location=0,toolbar=0,resizable=1,scrollbars=1,width='+w+',height='+h+',left='+posx+',top='+p osy+',screenX='+posx+',screenY='+posy); win.focus(); return false;">;"><IMG SRC="'Vote Image Src'" border="0"></A>
Instead of this
<a href="referals link" target="_blank"><img src="Vote Image Src" border="0"></a>
Shown once sign up is completed and the user copy&pastes the code.