Revolution X

Coding Community => Coding Snippets => Topic started by: Agent Moose on May 09, 2009, 11:10:50 pm



Title: Affiliate Page
Post by: Agent Moose on May 09, 2009, 11:10:50 pm
Create a new webpage and set the URL and Name for it.  Then press the HTML button, then add this into it:
Code:
<script type="text/javascript"><!--
var OurAff = "YOUR IMAGE URL";

var affy = new Array(); var a = 0;
affy[a++] = ["NAME","DESCRIPTION","BOARD URL","IMAGE URL"];

document.write("<div class='tborder'><div class='catbg' style='padding: 6px; vertical-align: middle;' mce_style='padding: 6px; vertical-align: middle;'>Our Affiliate</div><div><table border='0' width='100%' cellspacing='1' cellpadding='4' class='bordercolor'><tr><td class='windowbg2' width='100%'><center><img src='" + OurAff + "' mce_src='" + OurAff + "' /> <textarea><a href='" + smf_scripturl + "' mce_href='" + smf_scripturl + "' target='_blank'><img src='" + OurAff + "' mce_src='" + OurAff + "' /></a></text" + "area></center></td></tr></table></div></div><br><br>");
for(q=0;q<affy.length;q++){
document.write("<div class='tborder'><div class='catbg' style='padding: 6px; vertical-align: middle; text-align: center;' mce_style='padding: 6px; vertical-align: middle; text-align: center;'>" + affy[q][0] + "</div><div><table border='0' width='100%' cellspacing='1' cellpadding='4' class='bordercolor'><tr><td class='windowbg2' width='100%'><center><a target='_blank' href='" + affy[q][2] + "' mce_href='" + affy[q][2] + "'><img src='" + affy[q][3] + "' mce_src='" + affy[q][3] + "' /></a><br>" + affy[q][1] + "</center></td></tr></table></div></div><br>");
};
// --></script>

Original Request: http://revolutionx.smfforfree3.com/index.php/topic,551.0.html (http://revolutionx.smfforfree3.com/index.php/topic,551.0.html)

If any of you remember the Old affiliate Page on SMC, this is it :)

Replace the information givin:
YOUR IMAGE URL: The Image URL of your Affiliate
NAME: The Name of the Affiliate
DESCRIPTION: A description of the Affiliate
BOARD URL = The Board's URL for that Affiliate
IMAGE URL = The Image URL for that boards Affiliate.

To add more affiliates, add more of these lines:
Code:
affy[a++] = ["NAME","DESCRIPTION","BOARD URL","IMAGE URL"];

Enjoy :)


Title: Re: Affiliate Page
Post by: Andrew on May 09, 2009, 11:28:17 pm
Loving it Agent! Simple, very simple...but yet, its so great :D

Great job!  O0


Title: Re: Affiliate Page
Post by: Andrew on May 28, 2009, 11:03:18 am
Hey Agent, if we had a topic where people could add their affiliate, where would we add it at in this code?


Title: Re: Affiliate Page
Post by: Agent Moose on May 28, 2009, 01:34:55 pm
:)

Code:
<script type="text/javascript"><!--
var OurAff = "YOUR IMAGE URL";
var TopicURL = "http://";

var affy = new Array(); var a = 0;
affy[a++] = ["NAME","DESCRIPTION","BOARD URL","IMAGE URL"];

document.write("<div class='tborder'><div class='catbg' style='padding: 6px; vertical-align: middle;' mce_style='padding: 6px; vertical-align: middle;'>Our Affiliate</div><div><table border='0' width='100%' cellspacing='1' cellpadding='4' class='bordercolor'><tr><td class='titlebg2'><a href='" + TopicURL + "'>Add Your Affiliate</a></td></tr><tr><td class='windowbg2' width='100%'><center><img src='" + OurAff + "' mce_src='" + OurAff + "' /> <textarea><a href='" + smf_scripturl + "' mce_href='" + smf_scripturl + "' target='_blank'><img src='" + OurAff + "' mce_src='" + OurAff + "' /></a></text" + "area></center></td></tr></table></div></div><br><br>");
for(q=0;q<affy.length;q++){
document.write("<div class='tborder'><div class='catbg' style='padding: 6px; vertical-align: middle; text-align: center;' mce_style='padding: 6px; vertical-align: middle; text-align: center;'>" + affy[q][0] + "</div><div><table border='0' width='100%' cellspacing='1' cellpadding='4' class='bordercolor'><tr><td class='windowbg2' width='100%'><center><a target='_blank' href='" + affy[q][2] + "' mce_href='" + affy[q][2] + "'><img src='" + affy[q][3] + "' mce_src='" + affy[q][3] + "' /></a><br>" + affy[q][1] + "</center></td></tr></table></div></div><br>");
};
// --></script>


Title: Re: Affiliate Page
Post by: Andrew on May 28, 2009, 07:56:07 pm
Sorry to say, now the page wont work at all

http://pic.smfforfree4.com/pages/pic/affiliates.php

Heres the code for it:
Code:
<p>
<script type="text/javascript"><!--
var OurAff = "http://i596.photobucket.com/albums/tt46/CadetAndrew/Affiliates/PICaffiliate.gif";
var TopicURL = "http://pic.smfforfree4.com/index.php/topic,1007.0.html";

var affy = new Array(); var a = 0;
affy[a++] = ["Revolution X","Where coding meets graphics","http://revolutionx.smfforfree3.com/index.php","http://i75.photobucket.com/albums/i288/deathwilldie/rX/Quarantine/aff1.png"];
affy[a++] = ["The Underground Forums","","http://theunderground.smfforfree.com/index.php","http://i44.tinypic.com/2zeb4p3.png"];
affy[a++] = ["Andrew's Everything Forums","","http://andrewseverything.smfforfree.com/index.php","http://i41.tinypic.com/v8pz4x.png"];
affy[a++] = ["Pirates Online Forums","Pirates Of The Carribean Online Fansite & Forums","http://piratesonlineforums.com/","http://i43.tinypic.com/wlxj7t.gif"];
affy[a++] = ["VMK Unleashed Insiders","","http://vmku.smfforfree.com/index.php","http://i41.tinypic.com/25ptse9.gif"];
affy[a++] = ["The Tent Dwellers","Friendship and Computer Help","http://tentdwellers.org/index.php","http://i40.tinypic.com/33wppip.gif"];
affy[a++] = ["Jargon","","http://thejargon.net/","http://i39.tinypic.com/9s3q8h.gif"];
affy[a++] = ["The Landing","Forum for overall talking","http://www.thelandingforum.com/index.php","http://www.imagelodge.net/imgs/jaggerjack/TLF0gx.png"];

document.write("<div class='tborder'><div class='catbg' style='padding: 6px; vertical-align: middle;' mce_style='padding: 6px; vertical-align: middle;'>Our Affiliate</div><div><table border='0' width='100%' cellspacing='1' cellpadding='4' class='bordercolor'><tr><td class='titlebg2'><a href="" + TopicURL + "" mce_href="&quot; + TopicURL + &quot;">Add Your Affiliate</a></td></tr><tr><td class='windowbg2' width='100%'><center><img src='" + OurAff + "' mce_src='" + OurAff + "' /> <textarea><a href='" + smf_scripturl + "' mce_href='" + smf_scripturl + "' target='_blank'><img src='" + OurAff + "' mce_src='" + OurAff + "' /></a></text" + "area></center></td></tr></table></div></div><br><br>");
for(q=0;q<affy.length;q++){
document.write("<div class='tborder'><div class='catbg' style='padding: 6px; vertical-align: middle; text-align: center;' mce_style='padding: 6px; vertical-align: middle; text-align: center;'>" + affy[q][0] + "</div><div><table border='0' width='100%' cellspacing='1' cellpadding='4' class='bordercolor'><tr><td class='windowbg2' width='100%'><center><a target='_blank' href='" + affy[q][2] + "' mce_href='" + affy[q][2] + "'><img src='" + affy[q][3] + "' mce_src='" + affy[q][3] + "' /></a><br>" + affy[q][1] + "</center></td></tr></table></div></div><br>");
};
// --></script>
</p>
For some reason it keeps adding <p> and </p> on its own


Title: Re: Affiliate Page
Post by: Agent Moose on May 29, 2009, 08:22:28 am
Oh yea, the webpage editor changes some things:

Code:
<script type="text/javascript"><!--
var OurAff = "http://i596.photobucket.com/albums/tt46/CadetAndrew/Affiliates/PICaffiliate.gif";
var TopicURL = "http://pic.smfforfree4.com/index.php/topic,1007.0.html";

var affy = new Array(); var a = 0;
affy[a++] = ["Revolution X","Where coding meets graphics","http://revolutionx.smfforfree3.com/index.php","http://i75.photobucket.com/albums/i288/deathwilldie/rX/Quarantine/aff1.png"];
affy[a++] = ["The Underground Forums","","http://theunderground.smfforfree.com/index.php","http://i44.tinypic.com/2zeb4p3.png"];
affy[a++] = ["Andrew's Everything Forums","","http://andrewseverything.smfforfree.com/index.php","http://i41.tinypic.com/v8pz4x.png"];
affy[a++] = ["Pirates Online Forums","Pirates Of The Carribean Online Fansite & Forums","http://piratesonlineforums.com/","http://i43.tinypic.com/wlxj7t.gif"];
affy[a++] = ["VMK Unleashed Insiders","","http://vmku.smfforfree.com/index.php","http://i41.tinypic.com/25ptse9.gif"];
affy[a++] = ["The Tent Dwellers","Friendship and Computer Help","http://tentdwellers.org/index.php","http://i40.tinypic.com/33wppip.gif"];
affy[a++] = ["Jargon","","http://thejargon.net/","http://i39.tinypic.com/9s3q8h.gif"];
affy[a++] = ["The Landing","Forum for overall talking","http://www.thelandingforum.com/index.php","http://www.imagelodge.net/imgs/jaggerjack/TLF0gx.png"];

document.write("<div class='tborder'><div class='catbg' style='padding: 6px; vertical-align: middle;' mce_style='padding: 6px; vertical-align: middle;'>Our Affiliate</div><div><table border='0' width='100%' cellspacing='1' cellpadding='4' class='bordercolor'><tr><td class='titlebg2'><a href='" + TopicURL + "' mce_href='" + TopicURL + "'>Add Your Affiliate</a></td></tr><tr><td class='windowbg2' width='100%'><center><img src='" + OurAff + "' mce_src='" + OurAff + "' /> <textarea><a href='" + smf_scripturl + "' mce_href='" + smf_scripturl + "' target='_blank'><img src='" + OurAff + "' mce_src='" + OurAff + "' /></a></text" + "area></center></td></tr></table></div></div><br><br>");
for(q=0;q<affy.length;q++){
document.write("<div class='tborder'><div class='catbg' style='padding: 6px; vertical-align: middle; text-align: center;' mce_style='padding: 6px; vertical-align: middle; text-align: center;'>" + affy[q][0] + "</div><div><table border='0' width='100%' cellspacing='1' cellpadding='4' class='bordercolor'><tr><td class='windowbg2' width='100%'><center><a target='_blank' href='" + affy[q][2] + "' mce_href='" + affy[q][2] + "'><img src='" + affy[q][3] + "' mce_src='" + affy[q][3] + "' /></a><br>" + affy[q][1] + "</center></td></tr></table></div></div><br>");
};
// --></script>


Title: Re: Affiliate Page
Post by: Andrew on May 29, 2009, 09:10:50 am
Thanks Agent, got it up and going again :)

Yea I noticed that about the webpage editor, it edits almost everything I post, thats why Im having problems with drop-down menu codes.


Title: Re: Affiliate Page
Post by: Exilis on May 29, 2009, 02:45:34 pm
Try always disabling JS before going into the editor.


Title: Re: Affiliate Page
Post by: Lyle on June 07, 2009, 04:01:16 pm
in my opinion i think this is the best affiliate code their is.


Title: Re: Affiliate Page
Post by: Mojobojo82 on June 17, 2009, 05:38:38 am
Thx for the code. Told my friend about it and he's using it  O0

2nd Post -

I'm about to add the code.
How do I add a webpage? And what do I make the URL for it?
http://www.darkilscape.com - Is my Forum URL


Title: Re: Affiliate Page
Post by: Mojobojo82 on June 24, 2009, 06:47:38 am
I done everything but now theres nothing there  :-\

this is my code.
Code:
<script type="text/javascript"><!--
var OurAff = "<a href="http://darkilscape.com"><img src="http://i652.photobucket.com/albums/uu250/andrew_98/darkilscapeaffiliate.gif"></a>";

var affy = new Array(); var a = 0;
affy[a++] = ["NAME","DESCRIPTION","BOARD URL","IMAGE URL"];

document.write("<div class='tborder'><div class='catbg' style='padding: 6px; vertical-align: middle;' mce_style='padding: 6px; vertical-align: middle;'>Our Affiliate</div><div><table border='0' width='100%' cellspacing='1' cellpadding='4' class='bordercolor'><tr><td class='windowbg2' width='100%'><center><img src='" + OurAff + "' mce_src='" + OurAff + "' /> <textarea><a href='" + smf_scripturl + "' mce_href='" + smf_scripturl + "' target='_blank'><img src='" + OurAff + "' mce_src='" + OurAff + "' /></a></text" + "area></center></td></tr></table></div></div><br><br>");
for(q=0;q<affy.length;q++){
document.write("<div class='tborder'><div class='catbg' style='padding: 6px; vertical-align: middle; text-align: center;' mce_style='padding: 6px; vertical-align: middle; text-align: center;'>" + affy[q][0] + "</div><div><table border='0' width='100%' cellspacing='1' cellpadding='4' class='bordercolor'><tr><td class='windowbg2' width='100%'><center><a target='_blank' href='" + affy[q][2] + "' mce_href='" + affy[q][2] + "'><img src='" + affy[q][3] + "' mce_src='" + affy[q][3] + "' /></a><br>" + affy[q][1] + "</center></td></tr></table></div></div><br>");
};
// --></script>


Link is:
http://www.darkilscape.com/pages/darkilscape/affiliates.php


Title: Re: Affiliate Page
Post by: Andrew on June 24, 2009, 12:02:42 pm
I done everything but now theres nothing there  :-\

this is my code.
Code:
<script type="text/javascript"><!--
var OurAff = "<a href="http://darkilscape.com"><img src="http://i652.photobucket.com/albums/uu250/andrew_98/darkilscapeaffiliate.gif"></a>";

var affy = new Array(); var a = 0;
affy[a++] = ["NAME","DESCRIPTION","BOARD URL","IMAGE URL"];

document.write("<div class='tborder'><div class='catbg' style='padding: 6px; vertical-align: middle;' mce_style='padding: 6px; vertical-align: middle;'>Our Affiliate</div><div><table border='0' width='100%' cellspacing='1' cellpadding='4' class='bordercolor'><tr><td class='windowbg2' width='100%'><center><img src='" + OurAff + "' mce_src='" + OurAff + "' /> <textarea><a href='" + smf_scripturl + "' mce_href='" + smf_scripturl + "' target='_blank'><img src='" + OurAff + "' mce_src='" + OurAff + "' /></a></text" + "area></center></td></tr></table></div></div><br><br>");
for(q=0;q<affy.length;q++){
document.write("<div class='tborder'><div class='catbg' style='padding: 6px; vertical-align: middle; text-align: center;' mce_style='padding: 6px; vertical-align: middle; text-align: center;'>" + affy[q][0] + "</div><div><table border='0' width='100%' cellspacing='1' cellpadding='4' class='bordercolor'><tr><td class='windowbg2' width='100%'><center><a target='_blank' href='" + affy[q][2] + "' mce_href='" + affy[q][2] + "'><img src='" + affy[q][3] + "' mce_src='" + affy[q][3] + "' /></a><br>" + affy[q][1] + "</center></td></tr></table></div></div><br>");
};
// --></script>


Link is:
http://www.darkilscape.com/pages/darkilscape/affiliates.php

You made a mistake in the YOUR IMAGE URL PART. Use this one, it should work fine:
Code:
<script type="text/javascript"><!--
var OurAff = "http://i652.photobucket.com/albums/uu250/andrew_98/darkilscapeaffiliate.gif";

var affy = new Array(); var a = 0;
affy[a++] = ["NAME","DESCRIPTION","BOARD URL","IMAGE URL"];

document.write("<div class='tborder'><div class='catbg' style='padding: 6px; vertical-align: middle;' mce_style='padding: 6px; vertical-align: middle;'>Our Affiliate</div><div><table border='0' width='100%' cellspacing='1' cellpadding='4' class='bordercolor'><tr><td class='windowbg2' width='100%'><center><img src='" + OurAff + "' mce_src='" + OurAff + "' /> <textarea><a href='" + smf_scripturl + "' mce_href='" + smf_scripturl + "' target='_blank'><img src='" + OurAff + "' mce_src='" + OurAff + "' /></a></text" + "area></center></td></tr></table></div></div><br><br>");
for(q=0;q<affy.length;q++){
document.write("<div class='tborder'><div class='catbg' style='padding: 6px; vertical-align: middle; text-align: center;' mce_style='padding: 6px; vertical-align: middle; text-align: center;'>" + affy[q][0] + "</div><div><table border='0' width='100%' cellspacing='1' cellpadding='4' class='bordercolor'><tr><td class='windowbg2' width='100%'><center><a target='_blank' href='" + affy[q][2] + "' mce_href='" + affy[q][2] + "'><img src='" + affy[q][3] + "' mce_src='" + affy[q][3] + "' /></a><br>" + affy[q][1] + "</center></td></tr></table></div></div><br>");
};
// --></script>


Title: Re: Affiliate Page
Post by: Agent Moose on June 24, 2009, 12:03:58 pm
Switch out the OurAff line with this one:
Code:
var OurAff = '<a href="http://darkilscape.com"><img src="http://i652.photobucket.com/albums/uu250/andrew_98/darkilscapeaffiliate.gif"></a>';


Title: Re: Affiliate Page
Post by: Mojobojo82 on June 25, 2009, 02:06:29 am
I didn't need to change the code.
SyntaxBlitz told me on MSN to turn Javascript off, Go into webpage editor, Do code again. Turn javascript back on and it'll work.
It worked fine.
But thx anyway guys.

I added Andrew's Everything Forum and PIC and RX to my Affiliate page just now.


Title: Re: Affiliate Page
Post by: Mojobojo82 on July 07, 2009, 04:00:35 am
Arghhhh
I was just adding somebody's Affiliate.
I added it, Went on Affiliate page to see if it was there, And nothing is there  >:(

Code:
<script type="text/javascript"><!--
var OurAff = "http://i652.photobucket.com/albums/uu250/andrew_98/darkilscapeaffiliate.gif";
var TopicURL = "http://www.darkilscape.com/index.php/topic,214.0.html";

var affy = new Array(); var a = 0;
affy[a++] = ["RevolutionX","Where coding meets graphics","http://revolutionx.smfforfree3.com/index.php","http://i75.photobucket.com/albums/i288/deathwilldie/rX/Quarantine/aff1.png"];
affy[a++] = ["Andrew's Everything Forums","","http://andrewseverything.smfforfree.com/index.php","http://i41.tinypic.com/v8pz4x.png"];
affy[a++] = ["Jargon","","http://thejargon.net/","http://i39.tinypic.com/9s3q8h.gif"];
affy[a++] = ["The Landing","Forum for overall talking","http://www.thelandingforum.com/index.php","http://www.imagelodge.net/imgs/jaggerjack/TLF0gx.png"];
affy[a++] = ["Partners In Crime","Former guild site. Now a forum for hanging out!","http://pic.smfforfree4.com","http://i42.tinypic.com/incuau.gif"];
affy[a++] = ["FungooSoft","FungooSoft is A RSPS Forum Also For A Server Called " Tac Locus "","http://curtisnightgade.com.net.sc/forums/","http://i510.photobucket.com/albums/s348/cboy676/Fungoosoft.png"];

document.write("<div class='tborder'><div class='catbg' style='padding: 6px; vertical-align: middle;' mce_style='padding: 6px; vertical-align: middle;'>Our Affiliate</div><div><table border='0' width='100%' cellspacing='1' cellpadding='4' class='bordercolor'><tr><td class='titlebg2'><a href='" + TopicURL + "'>Add Your Affiliate</a></td></tr><tr><td class='windowbg2' width='100%'><center><img src='" + OurAff + "' mce_src='" + OurAff + "' /> <textarea><a href='" + smf_scripturl + "' mce_href='" + smf_scripturl + "' target='_blank'><img src='" + OurAff + "' mce_src='" + OurAff + "' /></a></text" + "area></center></td></tr></table></div></div><br><br>");
for(q=0;q<affy.length;q++){
document.write("<div class='tborder'><div class='catbg' style='padding: 6px; vertical-align: middle; text-align: center;' mce_style='padding: 6px; vertical-align: middle; text-align: center;'>" + affy[q][0] + "</div><div><table border='0' width='100%' cellspacing='1' cellpadding='4' class='bordercolor'><tr><td class='windowbg2' width='100%'><center><a target='_blank' href='" + affy[q][2] + "' mce_href='" + affy[q][2] + "'><img src='" + affy[q][3] + "' mce_src='" + affy[q][3] + "' /></a><br>" + affy[q][1] + "</center></td></tr></table></div></div><br>");
};
// --></script>


Title: Re: Affiliate Page
Post by: Exilis on July 07, 2009, 12:55:07 pm
You need to disable JS every time you go into the editor.


Title: Re: Affiliate Page
Post by: Andrew on July 07, 2009, 01:11:53 pm
Mojo I looked at your code, tested it up and down, I couldnt fix it.

Did you change a part in the document write part?


Title: Re: Affiliate Page
Post by: Mojobojo82 on July 08, 2009, 12:59:01 am
Nope,
I always turn it off when I enter it, Then enter it, Then do my editing, Save it, Then turn JavaScript back on, This time not working.


Title: Re: Affiliate Page
Post by: nickrulz1 on August 31, 2009, 10:17:49 pm
got one for you Agent Moose

What if instead of having 1 per line.. how do you make it so that they are in boxes and having 4 to a row??


Title: Re: Affiliate Page
Post by: Agent Moose on September 01, 2009, 08:19:06 am
I could easily do that :)

But then you wouldn't have a spot for a description, now would you :P


Title: Re: Affiliate Page
Post by: nickrulz1 on September 01, 2009, 02:19:07 pm
maybe am just wanting this just for images :P

coz am using the code but not for affiliating lol. on my forum am using it for sotw winners