Post by Soul-Divider on Jan 19, 2006 12:57:04 GMT
NOTE: VERSION 2 OF THIS CODE IS AVAILABLE HERE
VERSION 3 OF THIS CODE NOW AVAILABLE HERE
Ok this is my biggest project.
Now for a runthrough. It''s an affiliate table that scrolls like most, now if you click on your minibanner, a popup asking for the user's url will appear and then be sent via pm to the admin (or whoever you set to recieve it) It will then copy your affiliate code and allow you to paste it if your using Internet Explorer. Now if your in Firefox or any other browser, it will popup exactly the same but instead of coping, it will inform the admin that they need the affiliate code via pm (since copy cannot be done outside of IE). Also since guest's can't pm. A popup telling the user they must be loged in to continue appears.
preview loggin as test (pass=tester) to see
edit where instructed.
Main Footer
Due to this script's quite large size, I have no objections to people remotely hosting it. However my copywright must be within the script tags and I bear no responsablilty if it screws up due to remote hosting.
Reason for edit: Remote hosting comment added
Reason for edit 2: Now allows user to set width of table
Reason for edit 3: Now works in Opera and Netscape
VERSION 3 OF THIS CODE NOW AVAILABLE HERE
Ok this is my biggest project.
Now for a runthrough. It''s an affiliate table that scrolls like most, now if you click on your minibanner, a popup asking for the user's url will appear and then be sent via pm to the admin (or whoever you set to recieve it) It will then copy your affiliate code and allow you to paste it if your using Internet Explorer. Now if your in Firefox or any other browser, it will popup exactly the same but instead of coping, it will inform the admin that they need the affiliate code via pm (since copy cannot be done outside of IE). Also since guest's can't pm. A popup telling the user they must be loged in to continue appears.
preview loggin as test (pass=tester) to see
edit where instructed.
Main Footer
<script>
<!--
/*Overlord Affiliate table by Soul-Divider (visit Xtreeme.Proboards22.com for assistance).
This code must not be reposted or modified in any way without my permission.
This Statement must not be removed.*/
var pmSubject='Affiliate Click'; //title of the pm
var pmMessage='Someone at the following link has clicked the affiliate pciture'; //what the message in the pm says
var pmReciever='admin'; //who recieves the pm
var boardURL='BOARD URL'; //your site url
var bannerURL='BANNER URL'; //your banner url
var boardName='BOARD NAME'; //You sites board name, dont have any ' (apostraphies)
var tWidth='700'; //Width of table
document.write('<table border="0" width="'+tWidth+'" cellspacing="1" cellpadding="1" class="bordercolor" align="center" style="position: relative; bottom: 16px;"><tr><td class="catbg" colspan="2"><table width="100%" height="100%" cellpadding="0" cellspacing="0"><tr><td width="100%" height="24"><font size="2" class="cattext"><b><center>Affiliates</center></b></font></td></tr><tr><td width="62%" class="windowbg2" valign="middle"><marquee onMouseOver="this.stop()" onMouseOut="this.start()" direction="left" scrollamount="3">')
//AFFILIATES HERE! start each with document.write(' and end each with ')
document.write('AFFILIATE HERE')
document.write('AFFILIATE 2 HERE')
//END AFFILIATES!
document.write('</marquee></td><td width="9%" valign="middle" class="windowbg2"><center></td><td class="windowbg2" style="padding: 4px; width=1%"><img src="'+bannerURL+'" border="0" onmouseover=this.style.cursor=\'pointer\'; onclick="clickBanner();" alt="Click to Affiliate with '+boardName+'"></td></tr></table></td></tr></td></tr></table><textarea style="height: 1px; width: 1px; filter:alpha(opacity=0);" id="copyArea"><a href="'+boardURL+' target="_blank""><img src="'+bannerURL+'" border="0" alt="'+boardName+'"/></a></textarea>')
function clickBanner(){
if(pb_username=="Guest"){
alert("Unfortunately you need to be logged in to send pm\'s, please login or register");
}
else
{
var browserName=navigator.appName;
if (browserName!=="Microsoft Internet Explorer")
{
alert('Because you are not using Internet Explorer to use this link, you are unable to use one of this code\'s functions, instead your PM will instruct the reciver to send their affiliate code to you. please be patient.');
var name = prompt("Please enter your site URL, this will be sent to the admin so we can check our affiliate is added, we will then contact you","http://");
if (name!=null && name!="");
var fox="This user is not using Internet Explorer, please reply to this PM with your affiliate code, as the copy function doesn't work outside of Internet Explorer.";
window.open("/index.cgi?action=pmsend&to="+pmReciever+"&subject="+ pmSubject +"&message="+pmMessage +" "+name+" "+fox);
}
else
{
var name = prompt("Please enter your site URL, this will be sent to the admin so we can check our affiliate is added, we will then contact you","http://");
if (name!=null && name!="");
var bannerClicked = document.getElementById("copyArea");
bannerClicked.select();
if(document.all);
{
var bannerClickedRange = bannerClicked.createTextRange();
bannerClickedRange.execCommand("Copy");
}
alert('Our affialite code has been copied. Paste in your code to affiliate');
window.open("/index.cgi?action=pmsend&to="+pmReciever+"&subject="+ pmSubject +"&message="+pmMessage +" "+name);
}
}
}
//-->
</script>
Due to this script's quite large size, I have no objections to people remotely hosting it. However my copywright must be within the script tags and I bear no responsablilty if it screws up due to remote hosting.
Reason for edit: Remote hosting comment added
Reason for edit 2: Now allows user to set width of table
Reason for edit 3: Now works in Opera and Netscape