Jman
Senior Member
Jman's Creature:
Code name: Fast-reply rotational ads
Date created: 8/19/10
Author(s): Meeeee.
Description: Done as a request. Puts a randomized image in the fast-reply box.
Preview: Click here!
<div class='spoiler_toggle'>Code. ></div><div class="spoiler" style="display:none;">
</div>
Board Template -> Below the Board
Made this a couple weeks back... not the most organized code in the world, but it works. You can use this to rotate images, affiliates, or whatever. Thoughts?
To add images/links: Keep adding to or edit the affiliates[i++] array like I have done above.
Date created: 8/19/10
Author(s): Meeeee.
Description: Done as a request. Puts a randomized image in the fast-reply box.
Preview: Click here!
<div class='spoiler_toggle'>Code. ></div><div class="spoiler" style="display:none;">
Code:
<[b][color=#5a70b3]script[/color][/b] [color=#5a70b3]type[/color]='[color=#090]text/javascript[/color]'>
affiliates = [], i = 0;
// add images below. (:
affiliates[i++] = ["[url]http://outlineforum.com"[/url], "[url]http://209.85.62.24/179/85/0/p257849/outlinead2.png"];[/url]
affiliates[i++] = ["[url]http://themeszetaboards.com/"[/url], "[url]http://209.85.62.24/179/85/0/p257849/outlinead2.png"];[/url]
if (location.href.match('/topic/')) {
if ($('#fast-reply').length) {
x = Math.floor(Math.random() * (affiliates.length));
$('#fast-reply dd').append('<[b][color=#5a70b3]br[/color][/b] /><[b][color=#5a70b3]br[/color][/b] /><[b][color=#5a70b3]span[/color][/b] [color=#5a70b3]id[/color]="[color=#090]affiliate[/color]"><[b][color=#5a70b3]center[/color][/b]><[b][color=#5a70b3]a[/color][/b] [color=#5a70b3]href[/color]="[color=#090]' + affiliates[x][0] + '[/color]"><[b][color=#5a70b3]img[/color][/b] [color=#5a70b3]src[/color]="[color=#090]' + affiliates[x][1] + '[/color]"></[b][color=#5a70b3]a[/color][/b]></[b][color=#5a70b3]center[/color][/b]></[b][color=#5a70b3]span[/color][/b]>');
}
}
</[b][color=#5a70b3]script[/color][/b]>
Board Template -> Below the Board
Made this a couple weeks back... not the most organized code in the world, but it works. You can use this to rotate images, affiliates, or whatever. Thoughts?
To add images/links: Keep adding to or edit the affiliates[i++] array like I have done above.