|
Author | Topic: Random Affiliates (Read 5,603 times) |
Ross eCreations Staff
![[image]](http://freelancedev.net/ecreations/forum/images/miniprofile/admin.gif) member is offline
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>
| ProBoards Style Button Generator | PC Support Made Simple |
|
cmm225 Junior Member
![[image]](http://freelancedev.net/ecreations/forum/images/miniprofile/rank3.gif) 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..."
| The Don't Click Page |
|
Richie Veteran
![[image]](http://freelancedev.net/ecreations/forum/images/miniprofile/rank8.gif) member is offline
![[avatar]](http://i17.photobucket.com/albums/b67/Son_of_Exodia/Proboards/avy.jpg)
^ Yes, That's me V_V
Joined: Aug 2005 Gender: Male  Posts: 624 Location: Ohio, USA!! Karma: 5 | |
cmm225 Junior Member
![[image]](http://freelancedev.net/ecreations/forum/images/miniprofile/rank3.gif) 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.
| The Don't Click Page |
|
Richie Veteran
![[image]](http://freelancedev.net/ecreations/forum/images/miniprofile/rank8.gif) member is offline
![[avatar]](http://i17.photobucket.com/albums/b67/Son_of_Exodia/Proboards/avy.jpg)
^ Yes, That's me V_V
Joined: Aug 2005 Gender: Male  Posts: 624 Location: Ohio, USA!! Karma: 5 | |
Michael VIP Member
![[image]](http://freelancedev.net/ecreations/forum/images/miniprofile/rank9.gif) member is offline
![[avatar]](http://i83.photobucket.com/albums/j293/mhycal/guoga/mhyavalrp2.png)
Joined: Oct 2005 Gender: Male  Posts: 637 Location: Ontario, Canada Karma: 7 | |
gamerzproz New Member
![[image]](http://freelancedev.net/ecreations/forum/images/miniprofile/rank1.gif) 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
| |
|
Richie Veteran
![[image]](http://freelancedev.net/ecreations/forum/images/miniprofile/rank8.gif) member is offline
![[avatar]](http://i17.photobucket.com/albums/b67/Son_of_Exodia/Proboards/avy.jpg)
^ Yes, That's me V_V
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!! I knew i'd be something simple but wanted to make sure in case, i thought i might screw it up
|
http://myspace.com/richie.soe http://twitter.com/richie_soe
![[image]](http://wimg.mp/XSxFgm.gif) |
|
chexdex Junior Member
![[image]](http://freelancedev.net/ecreations/forum/images/miniprofile/rank3.gif) member is offline
Joined: Mar 2006 Gender: Female  Posts: 33 Location: NY Karma: 0 | |
Ross eCreations Staff
![[image]](http://freelancedev.net/ecreations/forum/images/miniprofile/admin.gif) member is offline
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
| ProBoards Style Button Generator | PC Support Made Simple |
|
brownthug69 New Member
![[image]](http://freelancedev.net/ecreations/forum/images/miniprofile/rank1.gif) 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..
| |
|
chexdex Junior Member
![[image]](http://freelancedev.net/ecreations/forum/images/miniprofile/rank3.gif) member is offline
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!
|
![[image]](http://img390.imageshack.us/img390/7880/affilateyq7.gif) East High Wildcats |
|
Ross eCreations Staff
![[image]](http://freelancedev.net/ecreations/forum/images/miniprofile/admin.gif) member is offline
Joined: Jan 1970 Gender: Male  Posts: 1,768 Karma: 81 | |
brownthug69 New Member
![[image]](http://freelancedev.net/ecreations/forum/images/miniprofile/rank1.gif) 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
| |
|
ME! Moderator
![[image]](http://freelancedev.net/ecreations/forum/images/miniprofile/mod.gif) member is offline
![[avatar]](http://r2.mrfrufru.com/dregondrahl/avvay.jpg)
~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.
|
![[image]](http://r2.mrfrufru.com/dregondrahl/siggy.jpg) 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
|
|
|