Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Mist's Random Banner Hack Details »»
Mist's Random Banner Hack
Version: 1.00, by Dean C Dean C is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 01-11-2003 Last Update: Never Installs: 19
 
No support by the author.

Mist's Random Banner Hack

What does this hack do?

This allows you to have a random banner in your header.

Latest Version: 1.0

+++++++++++++++++++++++++++++++++++++++++++
If you install this hack then please click the INSTALL button.
+++++++++++++++++++++++++++++++++++++++++++

Regards

- miSt

Show Your Support

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

Comments
  #22  
Old 01-18-2003, 11:24 PM
Mike Gaidin's Avatar
Mike Gaidin Mike Gaidin is offline
 
Join Date: Oct 2001
Location: Michigan
Posts: 247
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent! Will install!
Reply With Quote
  #23  
Old 01-19-2003, 09:50 AM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thankyou

- miSt
Reply With Quote
  #24  
Old 01-20-2003, 11:19 AM
NanoEntity NanoEntity is offline
 
Join Date: Oct 2001
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am geting PMs from people that want diffrent urls to diffrent banners, here is the code

This was tested and it works.
PHP Code:
//?hololith.com(NanoEntity)
$banner1="<a href=\"http://url1\"><img src=\"{ imagesfolder }/adbanners/banner1.gif\" border=\"0\" alt=\"\"></a>";
$banner2="<a href=\"http://url2\"><img src=\"{ imagesfolder }/adbanners/banner2.gif\" border=\"0\" alt=\"\"></a>";

$banners=array($banner1,$banner2); //banner array
$shuffle=$banners[rand(0,count($banners)-1)]; //shuffle banners 
$adbanner="$shuffle\n"//banners output
//END ?hololith.com(NanoEntity) 
Enjoy.
Reply With Quote
  #25  
Old 01-20-2003, 03:44 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Instructions on how to add more more banners is outlined in my instructions...

- miSt
Reply With Quote
  #26  
Old 01-20-2003, 08:19 PM
Floris Floris is offline
 
Join Date: Jan 2002
Posts: 1,898
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by NanoEntity
I am geting PMs from people that want diffrent urls to diffrent banners, here is the code

This was tested and it works.
PHP Code:
//?hololith.com(NanoEntity)
$banner1="<a href=\"http://url1\"><img src=\"{ imagesfolder }/adbanners/banner1.gif\" border=\"0\" alt=\"\"></a>";
$banner2="<a href=\"http://url2\"><img src=\"{ imagesfolder }/adbanners/banner2.gif\" border=\"0\" alt=\"\"></a>";

$banners=array($banner1,$banner2); //banner array
$shuffle=$banners[rand(0,count($banners)-1)]; //shuffle banners 
$adbanner="$shuffle\n"//banners output
//END ?hololith.com(NanoEntity) 
Enjoy.
They don't rotate :/
Reply With Quote
  #27  
Old 01-21-2003, 09:59 AM
NanoEntity NanoEntity is offline
 
Join Date: Oct 2001
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it dose rotate, I just checked it, click refresh few times.
Reply With Quote
  #28  
Old 01-21-2003, 10:08 AM
Floris Floris is offline
 
Join Date: Jan 2002
Posts: 1,898
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by NanoEntity
it dose rotate, I just checked it, click refresh few times.
Bwah!

I set $banner and ofcourse in your code it is $adbanner FIXED :P hehe.
Reply With Quote
  #29  
Old 02-02-2003, 03:38 AM
ScottRoberts ScottRoberts is offline
 
Join Date: Nov 2002
Location: Florida
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
//?hololith.com(NanoEntity)
$banner1="<a href=\"http://url1\"><img src=\"{ imagesfolder }/adbanners/banner1.gif\" border=\"0\" alt=\"\"></a>";
$banner2="<a href=\"http://url2\"><img src=\"{ imagesfolder }/adbanners/banner2.gif\" border=\"0\" alt=\"\"></a>";

$banners=array($banner1,$banner2); //banner array
$shuffle=$banners[rand(0,count($banners)-1)]; //shuffle banners
$adbanner="$shuffle\n"; //banners output
//END ?hololith.com(NanoEntity)
NanoEntity,

I used your script and it worked great. I have about 8 or 9 banner ads running now, and after a few modifications to the header template, I was able to get my header to look just right. Thanks. If anyone wants to see a sample, you can take a look at http://forums.cultfree.org.

Thanks again!

Scott
Reply With Quote
  #30  
Old 02-02-2003, 10:30 AM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey nano i just realised what you did. The original intention of this hack was to just rotate images but i'll change the text file to allow url's

Regards

- miSt
Reply With Quote
  #31  
Old 02-02-2003, 10:37 AM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PPN's hack may not work, but mine does

Perhaps you could try and make a size limiter bit to the image

Satan
Reply With Quote
Reply

Thread Tools

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 12:01 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08260 seconds
  • Memory Usage 2,312KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete