Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Beta Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
-Alpha- Banner Rotation Script Details »»
-Alpha- Banner Rotation Script
Version: 1.00, by Eternal2u Eternal2u is offline
Developer Last Online: Aug 2005 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 02-22-2005 Last Update: Never Installs: 2
Is in Beta Stage  
No support by the author.

I know it's been posted by someone else for the banner rotation controlable by the acp, etc...but this is my own little version with only 1 template to edit...


First this was originally made by Reece on www.GamesXposed.com to generate cash to support the server costs....

Time to start the mod..

##########Edit headinclude##########


##Find##

Code:
<script type="text/javascript" src="clientscript/vbulletin_global.js"></script>
<if condition="$show['popups']"><script type="text/javascript" src="clientscript/vbulletin_menu.js"></script></if>
##After Add##

Code:
<SCRIPT LANGUAGE="javascript">
<!-- Copyright
// 
function banner(img_source,url,alt,chance) {
   this.img_source = img_source;
   this.url = url;
   this.alt = alt;
   this.chance = chance;
}
function display() {
   with (this) document.write("<A HREF=" + url + "><IMG SRC='" + img_source + "' WIDTH=468 HEIGHT=60 BORDER=0 ALT='" + alt + "'></A>");
}
banner.prototype.display = display;
banners = new Array();
banners[0] = new banner("http://canaca.com/Banner10.gif",
                        "http://www.canaca.com/affiliate/link.php?ref=173&productid=1 target='_blank'",
                        "Canaca Inc",
                        10);
banners[1] = new banner("http://gamesxposed.com/cheat.gif",
                        "http://www.cheatnexus.net/ target='_blank'",
                        "Cheat Nexus",
                        10);
sum_of_all_chances = 0;
for (i = 0; i < banners.length; i++) {
   sum_of_all_chances += banners[i].chance;
}
function display_banner() {
   chance_limit = 0;
   randomly_selected_chance = Math.round((sum_of_all_chances - 1) * Math.random()) + 1;
   for (i = 0; i < banners.length; i++) {
      chance_limit += banners[i].chance;
      if (randomly_selected_chance <= chance_limit) {
         document.write("<A HREF=" + banners[i].url + "><IMG SRC='" + banners[i].img_source + "' WIDTH=468 HEIGHT=60 BORDER=0 ALT='" + banners[i].alt + "'></A>");
         return banners[i];
         break;
      }
   }
}
//-->
</SCRIPT>
##End - Save Template File##


-Explnation-

obviously on

Code:
banners[0] = new banner("http://mysite.com/bannerlocation.jpg",
                        "http://advertiserurllocation.com target='_blank''",
                        "Advertiser's Name",
                        10);
banners[1] = new banner("http://mysite.com/bannerlocation.gif",
                        "http://advertiserurllocation.com target='_blank'",
                        "Advertiser's Name",
                        10);
each new banner would simply copy

Code:
banners[1] = new banner("http://mysite.com/bannerlocation.gif",
                        "http://advertiserurllocation.com target='_blank'",
                        "Advertiser's Name",
                        10);
that and replace the mysite.com/bannerlocation.gif with the picture/banner they wanted for it..also would replace http://advertiserurllocation.com witht he actually person's url and lastly Advertiser's Name with the name of the site there advertising for..

Will possibly come back with acp options and build it into the acp to make it easier for users to change it awithout diving in the template system..

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 02-23-2005, 10:14 PM
Durtay Durtay is offline
 
Join Date: Feb 2004
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's always helpful to have screenshots and to have the coding in a downloadable format. Nice hack.
Reply With Quote
  #3  
Old 02-24-2005, 03:43 AM
Eternal2u Eternal2u is offline
 
Join Date: Feb 2004
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

post deleted by et2u
Reply With Quote
  #4  
Old 02-25-2005, 01:15 PM
steadicamop's Avatar
steadicamop steadicamop is offline
 
Join Date: Jul 2004
Location: Lancashire, UK
Posts: 379
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For whatever reason, this doesn't work for me, I copied the code into the headinclude and it does nothing, should there be anything anywhere in some other code? I suppose it could be the template I'm using.

Thanks, cracking hack, hopefully will get it working

Jason
Reply With Quote
  #5  
Old 02-25-2005, 04:06 PM
hollyboy's Avatar
hollyboy hollyboy is offline
 
Join Date: Mar 2004
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

for when this hack will become Full Release?
I think it's agood hack and I was actually looking for something like this
Reply With Quote
  #6  
Old 02-26-2005, 11:46 AM
Eternal2u Eternal2u is offline
 
Join Date: Feb 2004
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

jasonwilliams not sure what your prob is man..

mind copying your headerinclude code here so i can look and compare whats what..

Also i will probably not release another version of this ever for vBulletin..

I'm moving to phpBB 2.0.12 by the end of the weekend and abandoning vBulletin due to there unfair practices with linking off my server to questionable content

So see you guys on phpBB.com 's official community boards..

May vBulletin rot in hell.
Reply With Quote
  #7  
Old 02-27-2005, 07:19 AM
hollyboy's Avatar
hollyboy hollyboy is offline
 
Join Date: Mar 2004
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so does thi work?
Reply With Quote
  #8  
Old 03-09-2005, 12:04 AM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
I'm moving to phpBB 2.0.12 by the end of the weekend and abandoning vBulletin due to there unfair practices with linking off my server to questionable content
If by questionable content you mean warez then jelsoft has every right to take any action they please, read the license agreement.
Reply With Quote
  #9  
Old 04-13-2005, 01:09 AM
vinnycuz vinnycuz is offline
 
Join Date: Jun 2004
Location: eNwhYsEe
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hack did nothing...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:38 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04339 seconds
  • Memory Usage 2,280KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete