Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Design and Graphics Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-08-2007, 02:22 PM
soulplayer soulplayer is offline
 
Join Date: Mar 2004
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Rotating Banners

Hy,

I was wondering if it's possible to implement rotating banners in my forum? So that every time you load the index.php it will change the banner?

I'v found this script: http://www.webdesign.org/web/web-pro...ion.11100.html

My forum:
http://www.xeonix.be

My style:
Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
http://beta.colorizeit.com/index.php?style=vb_evo

I hope you guys can help me?
Reply With Quote
  #2  
Old 05-08-2007, 09:09 PM
SoftDux SoftDux is offline
 
Join Date: May 2007
Location: Johannesburg, South Afric
Posts: 137
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

take a look @ openads (formerly known as phpAdsNew) on http://www.openads.org
Reply With Quote
  #3  
Old 05-08-2007, 10:03 PM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Check my signature
Reply With Quote
  #4  
Old 12-18-2007, 03:03 AM
theOZer's Avatar
theOZer theOZer is offline
 
Join Date: Mar 2007
Location: Colorado, USA
Posts: 212
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Random Banners, How I Did It.

Thanks to vB.org, Thread Thumbnails for the banner on/off user option spin-off, other similar threads on vB.org & vB.com/forums.

That I know of this hack works in 3.6.8 PL2 and 3.7.0 Beta 2.

I use the stock vBulletin templates.

For the header area I use a GIF size height of 88. I display 2 animated GIFs, a 710x88 GIF and a 88x88 GIF. This seems to comfortably fits in the header for screen resolutions of 1024x768 or greater. Simply don't display the 2nd banner if you have only one banner. You have around 800 for the width size.

This hack displays GIFs. Change .gif to .jpg (or, .png, .jpeg, .whatever) in the $YourPrefix_randombanner line if needed. FTP your GIFs to your your_vb_forumname/images/misc directory. [Note: $stylevar[imgdir_misc] points to that directory. (I found that in the vB manual.)]

You could call the 3 lines of plugin code $x, $y, $z. But, I suggest: To insure you don't bang heads with vB uniqueify your plugin code. Replace "YourPrefix_" with whatever you wish. For example, Using the prefix "OMAC_" helps me later find changes in my templates and elsewhere.

Because some forum members are still on dial-up I also give forum members the options to turn off the animated banner display. It cuts down on load times for them. If you don't add a User Profile Field just remove the <if condition="$bbuserinfo['fieldXX'] <> 'Off'"> if clause.

In the $YourPrefix_banners line add the names of your banner files. Using an array allows you an unlimited number of banners possible. My example has 4 randomized banners. Yes, you will need to edit/change the plugin if you want to add or remove banners. Smolly.

>>>Add the plugin:

ACP > Plugins & Products > Add New Plugin.

Hook: global_start

Title: Random Banners

Plugin PHP Code:
$YourPrefix_banners=array('thisbannername', 'thatbannername', 'anotherbannername', 'whatever');
$YourPrefix_shuffle=$YourPrefix_banners[rand(0,count($YourPrefix_banners)-1)];
$YourPrefix_randombanner="<img src=\"$stylevar[imgdir_misc]/$YourPrefix_shuffle.gif\" border=\"0\" alt=\"\">\n";

Plugin is Active:
YES

>>>Make the following changes in each style you wish to add the banner to.

ACP > Styles & Templates > Style Manager, select a template, click on All Style Options GO, then under Common Templates, header.

---vB3.6.8 PL2:

find/replace

<td align="$stylevar[right]">
&nbsp;
</td>

with

<td align="$stylevar[right]">
<if condition="$bbuserinfo['field10'] <> 'Off'">
$YourPrefix_randombanner <!-- randomized banner -->
<img src="$stylevar[imgdir_misc]/Your_GIF_filename_Here.gif" border="0" /> <!-- the 2nd, non-randomized banner on OMAC-->
<else />
&nbsp;
</if>
</td>

---vB3.7.0 Beta2:

find/replace

<if condition="$ad_location['ad_header_logo']">$ad_location[ad_header_logo]<else />&nbsp;</if>

with

<if condition="$ad_location['ad_header_logo']">$ad_location[ad_header_logo]
<else />
<if condition="$bbuserinfo['fieldXX'] <> 'Off'"> <!-- Use Banner User Profile Field number, eg, field8 -->
$YourPrefix_randombanner <!-- randomized banner -->
<img src="$stylevar[imgdir_misc]/Your_GIF_filename_Here.gif" border="0" /> <!-- the 2nd, non-randomized banner on OMAC-->
<else />
&nbsp;
</if>
</if>

>>>Add a user option to turn the banner On or Off.

ACP > User Profile Fields > Add New User Profile Field.

Select "single selection radio buttons"

Title: "Banners"

Description: "Turn the banner display On or Off."

In Options, enter "On" and "Off".

Skip down to Display Page and choose "Options: Other". This puts the option under Miscellaneous Options.
Note the field number assigned. Check for this field number in the if statement <if condition="$bbuserinfo['fieldXX'] <> 'Off'"> .
Reply With Quote
  #5  
Old 12-19-2007, 09:07 AM
Cause4Chaos Cause4Chaos is offline
 
Join Date: Oct 2007
Location: Canada
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I use this program http://sourceforge.net/projects/phpadsnew and it is free, very easy to setup and use different codes on your site anywhere depending on your liking i.e: popup or static,,

you can set it up on the same database as your forums or set it up to another db, your choice,

I have 2 campaigns running at the moment, but you can have many:

"" Openads (phpAdsNew) is an open-source ad server, with an integrated banner management interface and tracking system for gathering statistics. With Openads you can easily rotate paid banners and your own in-house advertisements""

sample is working on my website www.cause4chaos.com and the Forums
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 02:32 AM.


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.03605 seconds
  • Memory Usage 2,202KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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