eCreations
« Random Affiliates »

Welcome Guest. Please Login or Register.
Dec 3, 2009, 5:52am



You have No New Messages


eCreations :: Coding :: Code Index :: Random Affiliates
Page 1 of 4 » Jump to page   Go    [Search This Thread][Send Topic To Friend] [Print]
 AuthorTopic: Random Affiliates (Read 5,603 times)
Ross
eCreations Staff
[image]
member is offline




[homepage]

Joined: Jan 1970
Gender: Male
Posts: 1,768
Karma: 81
 Random Affiliates
« Thread Started on Nov 8, 2005, 9:41pm »

As featured on the main page here :)

Main Header:
<div id="forum">


Main Footer:
</div>
<table cellspacing="1" class="bordercolor" align="center"width="92%" id="affTable" style="position: relative; top: 14px;">
<tr>
<td colspan="2" height="18" class="catbg" align="center" id="affTitle">
<font color="FFFFFF">Random Affiliates</font>
</td>
</tr>
<tr>
<td class="windowbg2" width="90%" align="center" valign="middle" id="aff">

</td>
<td class="windowbg" align="center" valign="top" id="ownaff">
<a href="URl to Thread/Board to Affiliate"><img src="Your Mini-Banner URL" width="88" height="31" border="0" alt="Click here affiliate!"></a>
</td>
</tr>
<tr id="viewAllaff">
<td class="windowbg" align="right" colspan="2">
<font size=2>
Click <a href="/index.cgi?&page=affiliates">Here</a> to view all Affiliates
</font>
</td>
</tr>
</table>


<script type="text/javascript">
<!--
var max = 3; // Number of Affiliates to show

var aff = [];
function Affiliate(AffiliateURL,MiniBanner) {
if(location.href.match(/page=affiliate/))
document.getElementById('aff').innerHTML += "&nb"+"sp;<a href='"+AffiliateURL+"' target='_blank'><img src='"+MiniBanner+"' width='88' height='31' border='0' /></a>&nb"+"sp;"
else
aff[aff.length] = [AffiliateURL, MiniBanner];
}


Affiliate ('Site URL','Image URL');
Affiliate ('Site URL','Image URL');
Affiliate ('Site URL','Image URL');
Affiliate ('Site URL','Image URL');
Affiliate ('Site URL','Image URL');




if(location.href.match(/page=affiliate/)) {
document.getElementById('viewAllaff').style.display = 'none';
document.getElementById('ownAff').style.display = 'none';
document.getElementById('forum').style.display = 'none';
document.getElementById('affTitle').firstChild.innerHTML = 'Affiliates';
} else {
var affs = document.getElementById('aff');
for(i=0; i<max; i++) {
rand = Math.floor(Math.random() * aff.length);
if(affs.innerHTML.match(aff[rand][0]))
i--;
else
affs.innerHTML += "&nb"+"sp;<a href='"+aff[rand][0]+"' target='_blank'><img src='"+aff[rand][1]+"' width='88' height='31' border='0' /></a>&nb"+"sp;"
}
}
//-->
</script>
« Last Edit: Jan 16, 2006, 11:35pm by Ross »Link to Post - Back to Top  IP: Logged

ProBoards Style Button Generator | PC Support Made Simple
cmm225
Junior Member
[image]
member is offline





Joined: Nov 2005
Gender: Female
Posts: 64
Karma: 0
 Re: Random Affiliates
« Reply #1 on Feb 4, 2006, 4:12pm »

do you think it's ok to host the javascript portion of this?

I have a lot of affs in, and when you have a lot in your headers/footers, your board slows down right?
So I have been hosting all of my codes.... or most of them

I left the table portion, and hosted the javascript portion, and placed that below the table. It seems to work. I haven't found any errors in IE or FF.

So, is it ok.

my board

ps: this should be URL: "URl to..."
« Last Edit: Feb 4, 2006, 4:13pm by cmm225 »Link to Post - Back to Top  IP: Logged

The Don't Click Page
Richie
Veteran
[image]
member is offline

[avatar]

^ Yes, That's me V_V

[yim] [msn] [aim]
[homepage]

Joined: Aug 2005
Gender: Male
Posts: 624
Location: Ohio, USA!!
Karma: 5
 Re: Random Affiliates
« Reply #2 on Feb 5, 2006, 7:47pm »

Unless the copyright says so, you don't need permission.
Link to Post - Back to Top  IP: Logged


http://myspace.com/richie.soe
http://twitter.com/richie_soe
[image]
cmm225
Junior Member
[image]
member is offline





Joined: Nov 2005
Gender: Female
Posts: 64
Karma: 0
 Re: Random Affiliates
« Reply #3 on Feb 5, 2006, 11:45pm »

I really just wanted to make sure it was a smart thing to do, but so far, no problems.
Link to Post - Back to Top  IP: Logged

The Don't Click Page
Richie
Veteran
[image]
member is offline

[avatar]

^ Yes, That's me V_V

[yim] [msn] [aim]
[homepage]

Joined: Aug 2005
Gender: Male
Posts: 624
Location: Ohio, USA!!
Karma: 5
 Re: Random Affiliates
« Reply #4 on Feb 28, 2006, 8:48pm »

i wanna make the "Click here affiliate" part open in a new window, how do i do that.

i someone can just lmk what to replace or add to do this it'd be great!
Link to Post - Back to Top  IP: Logged


http://myspace.com/richie.soe
http://twitter.com/richie_soe
[image]
Michael
VIP Member
[image]
member is offline

[avatar]


[homepage]

Joined: Oct 2005
Gender: Male
Posts: 637
Location: Ontario, Canada
Karma: 7
 Re: Random Affiliates
« Reply #5 on Feb 28, 2006, 9:01pm »


Quote:
i wanna make the "Click here affiliate" part open in a new window, how do i do that.

i someone can just lmk what to replace or add to do this it'd be great!

This part of the code:

Quote:
Click <a href="/index.cgi?&page=affiliates">Here</a> to view all Affiliates

Add this:

Quote:
Click <a href="/index.cgi?&page=affiliates" target="_blank">Here</a> to view all Affiliates

That should work. :)
Link to Post - Back to Top  IP: Logged

[image]

[image]

gamerzproz
New Member
[image]
member is offline





Joined: Feb 2006
Posts: 7
Karma: 1
 Re: Random Affiliates
« Reply #6 on Mar 1, 2006, 6:07am »

my random affiliate wont work...can you view my page source and tell me what i might or did worng?i cant affiliate
Link to Post - Back to Top  IP: Logged
Richie
Veteran
[image]
member is offline

[avatar]

^ Yes, That's me V_V

[yim] [msn] [aim]
[homepage]

Joined: Aug 2005
Gender: Male
Posts: 624
Location: Ohio, USA!!
Karma: 5
 Re: Random Affiliates
« Reply #7 on Mar 1, 2006, 5:26pm »


Quote:
my random affiliate wont work...can you view my page source and tell me what i might or did worng?i cant affiliate
um, we need the url of your board to do that.

EDIT: THANX Michael!! ;D I knew i'd be something simple but wanted to make sure in case, i thought i might screw it up :-[ :P
« Last Edit: Mar 1, 2006, 5:33pm by Richie »Link to Post - Back to Top  IP: Logged


http://myspace.com/richie.soe
http://twitter.com/richie_soe
[image]
chexdex
Junior Member
[image]
member is offline



[msn] [aim]
[homepage]

Joined: Mar 2006
Gender: Female
Posts: 33
Location: NY
Karma: 0
 Re: Random Affiliates
« Reply #8 on Mar 14, 2006, 11:48pm »

My URL: http://charmed411p3.proboards75.com/index.cgi

When i click on Click Here to view all Affiliates @ my forum it dosen't bring it to a table like it's showed here. Why?
« Last Edit: Mar 15, 2006, 7:27pm by Ross »Link to Post - Back to Top  IP: Logged

[image] [image]
East High Wildcats
Ross
eCreations Staff
[image]
member is offline




[homepage]

Joined: Jan 1970
Gender: Male
Posts: 1,768
Karma: 81
 Re: Random Affiliates
« Reply #9 on Mar 15, 2006, 7:30pm »

Try changing this width in the actual affiliate table:

class="bordercolor" align="center"width="92%" id="affTable" style="position:

With 75% or something around there :)
Link to Post - Back to Top  IP: Logged

ProBoards Style Button Generator | PC Support Made Simple
brownthug69
New Member
[image]
member is offline





Joined: Mar 2006
Posts: 3
Karma: 0
 Re: Random Affiliates
« Reply #10 on Mar 16, 2006, 3:32am »

hey, i used this code on my forums and it worked! Thx
But i wanted the random affiliate on my website as well. I know this forum is for Proboards Support only. But i couldn't do it myself and i tried assking other people on Socal an Solisnake.. So, Please.. :-[
Link to Post - Back to Top  IP: Logged
chexdex
Junior Member
[image]
member is offline



[msn] [aim]
[homepage]

Joined: Mar 2006
Gender: Female
Posts: 33
Location: NY
Karma: 0
 Re: Random Affiliates
« Reply #11 on Mar 16, 2006, 8:38pm »


Quote:
Try changing this width in the actual affiliate table:

class="bordercolor" align="center"width="92%" id="affTable" style="position:

With 75% or something around there :)


Thnaks Ross I got it!
Link to Post - Back to Top  IP: Logged

[image] [image]
East High Wildcats
Ross
eCreations Staff
[image]
member is offline




[homepage]

Joined: Jan 1970
Gender: Male
Posts: 1,768
Karma: 81
 Re: Random Affiliates
« Reply #12 on Mar 17, 2006, 7:23pm »

It's a fairly basic code so should work fine on a website.
Link to Post - Back to Top  IP: Logged

ProBoards Style Button Generator | PC Support Made Simple
brownthug69
New Member
[image]
member is offline





Joined: Mar 2006
Posts: 3
Karma: 0
 Re: Random Affiliates
« Reply #13 on Mar 25, 2006, 7:00am »

i tried, no luck :( . Hope you could help me, i tried putting all of the code, deleted some parts, tried just using the script part But no luck. ... the ' div id="Forum" ' thing an other stuff thats like not neccesary on the site.


It has a table code, i alredy have a table made in the template, all i want is the code i can put in that little table so it'll work, i can do the Affiliate us n other stuff like that myself
« Last Edit: Mar 25, 2006, 7:03am by brownthug69 »Link to Post - Back to Top  IP: Logged
ME!
Moderator
[image]
member is offline

[avatar]

~Remanifesting-Eternal.~



Joined: Jan 2006
Gender: Male
Posts: 778
Location: VoiD
Karma: 24
 Re: Random Affiliates
« Reply #14 on Mar 25, 2006, 6:48pm »

nope you need to remove the aff table you are using and add the whole code from above.

keep the affiliate link from the old table and copy paste them to this code.
Link to Post - Back to Top  IP: Logged

[image]
Where Ancients Call, I Follow. Into The Darkness And Between The Light..I Am Born Of A Shadow's Dream,To Win This Endless Fight.. - Mal'Haddrus
Page 1 of 4 » Jump to page   Go    [Search This Thread][Send Topic To Friend] [Print]




vForums Free Message Boards


Site Design is Copyright © of eCreations (2005 - 2007)
Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!