Revolution X

Coding Community => Coding Snippets => Topic started by: Spoken on November 09, 2008, 02:23:31 pm



Title: Affiliate box under stats
Post by: Spoken on November 09, 2008, 02:23:31 pm
First off, I cannot take full credit for this code. I used Agent Moose's "Add box under stats" code, and deathwildie's "Affiliate Box with text area" code.

Add this to your footers.
Code:
<script>
function add_box_stats_v3(){
//Create by Agent Moose (smcodes.smfforfree3.com)
var title = "TITLE"
var content = "<!-- Affiliate Box Codeby deathwilldie from Simple Machine Codes (www.smcodes.smfforfree3.com)--><table width='100%' border='0' cellspacing='1' cellpadding='4'><tr><td width='80%' class='windowbg2'><marquee onmouseover='this.stop()' onmouseout='this.start()'><a href='AFFILITE WEBSITE URL' target='_blank'><img src='AFFILIATE IMAGE URL'/></a></marquee></td><td class='windowbg' width='20%' border='3'><center>Our Image<BR><img src='YOUR AFFILITE URL' border='0'/><br></center></td></tr></table></div>"
var url = "PAGE URL"
var image = "IMAGE URL HERE"
var text = "HOVER TEXT HERE"

$("div#upshrinkHeaderIC table.bordercolor tbody tr:contains(Users Online)").before("<tr><td class='titlebg' colspan='2'>"+title+"</td></tr><tr><td class='windowbg' width='20' align='center'><a href='"+url+"'><img src='"+image+"' alt='"+text+"'/></a></td><td class='windowbg2' width='100%'><span class='middletext'>"+content+"</span></td></tr>");
};
add_box_stats_v3();
</script>

What to replace:
TITLE - Replace this with the title of the box
AFFILIATE WEBSITE URL - Replace this with the URL to your affiliate's website
AFFILIAE IMAGE URL - Replave this with the image URL for the affiliate
YOU AFFILIATE URL - Replace this with the image URL to your site's affiliate image

The next ones are for this image part,
(http://i491.photobucket.com/albums/rr280/Colonel-Pepsi/image.png)

IMAGE URL HERE - Replace this with the image URL you want to be next to the box
PAGE URL - Replace this with the URL of a page you want the image to be linked to
HOVER TEXT HERE - Replcae this with the test you want to be displayed when you hover over the image.

Have any problems post here. Moderators if you could give a better description please edit this :D
Im not good at explaining


Title: Re: Affiliate box under stats
Post by: deathwilldie on November 09, 2008, 02:30:01 pm
Now that is a pretty cool code :D


Title: Re: Affiliate box under stats
Post by: Spoken on November 09, 2008, 02:30:45 pm
Thanks. took me a while to do it


Title: Re: Affiliate box under stats
Post by: Mojobojo82 on June 14, 2009, 02:08:04 am
Pretty Awesome :P My friend always had it and i never kenw how... Idk why i never asked ??? Anyway Thanks I'm using it now