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

Reply
 
Thread Tools
Banner ad on forum Home Details »»
Banner ad on forum Home
Version: 1.00, by Beermonster Beermonster is offline
Developer Last Online: Sep 2023 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 04-16-2004 Last Update: Never Installs: 71
Supported
 

Adapted from "Add a banner image to each forum" script by Harrybutt
https://vborg.vbsupport.ru/showthread.php?t=61555

This modification will add an image banner with link and text to each forum you choose, and display it in on your forumhome, you can have a different banner for each forum with additional text above the banner like Sponsored by or affiliated with, or you can choose to have no text.

I have used 100x25px images for the example screen shot, but you can use what ever size you like, but remember it will effect the way your forum looks.

Hope people find this usful, this is my first hack as I'm still a big noob when it come's to hacking

Opps sorry made a slight error in the dir name, it's fixed now


For 3.5.x look here

Show Your Support

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

Comments
  #72  
Old 11-15-2004, 08:59 AM
Beermonster Beermonster is offline
 
Join Date: Dec 2003
Location: England
Posts: 362
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mark@sb.ws
OK, I have been using this hack without problems. Well Done !!
Thanks, please click install then

Quote:
Originally Posted by mark@sb.ws
I have my main forum sponsored by one company. Then on the sub forum I want another image. Can this be done?
Yes it can be but basically it would be another hack as you would need another set of boxes to put your details in etc.
Reply With Quote
  #73  
Old 11-17-2004, 07:57 AM
Spinball's Avatar
Spinball Spinball is offline
 
Join Date: Feb 2002
Location: Telford, England
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Beermonster,
there is a Firefox and Opera incompatibility in your code.
As it stands, in those browsers, the banners are displayed in the middle of the column rather than right justified. This is because your table HTML is wrong.
Instead of

HTML Code:
<if condition="$forum['fhbanner']">
<table align="right" border="0"><div align="center" valign="top">...
...</div></table>
</if>
You should have
HTML Code:
<if condition="$forum['fhbanner']">
<table align="right" border="0"><tr><td align="center" valign="top">...
...</td></tr></table>
</if>
This fixes the problem. All tables should have a TR and TD in them.
Reply With Quote
  #74  
Old 11-17-2004, 08:56 AM
Beermonster Beermonster is offline
 
Join Date: Dec 2003
Location: England
Posts: 362
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Spinball
Hi Beermonster,
there is a Firefox and Opera incompatibility in your code.
Thanks for the update
Reply With Quote
  #75  
Old 11-19-2004, 07:47 PM
[email protected] vbmenu_register("postmenu_573934", true);
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Beermonster
Thanks, please click install then



Yes it can be but basically it would be another hack as you would need another set of boxes to put your details in etc.
Install clicked ! Thanks for a wonderful hack !

Now can you help me with this other set of code? I would appreciate it beyond words. You guys that do this stuff are unreal and deserve lots of credit !

You say I need another set of boxes to put details in, but the boxes are already there in my control panel under the sub forum. It's just when I plug in info, it isn't displayed. What do you say? Help out a friend.
Reply With Quote
  #76  
Old 11-19-2004, 08:28 PM
Beermonster Beermonster is offline
 
Join Date: Dec 2003
Location: England
Posts: 362
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mark@sb.ws
Install clicked ! Thanks for a wonderful hack !

Now can you help me with this other set of code? I would appreciate it beyond words. You guys that do this stuff are unreal and deserve lots of credit !

You say I need another set of boxes to put details in, but the boxes are already there in my control panel under the sub forum. It's just when I plug in info, it isn't displayed. What do you say? Help out a friend.
OK I've quicky done it, you do need another box if you are displaying a different banner, like I said I've quickly done this and I've also had a couple of beers but I think it works


Code:
// Adds fields to forum table.

Run Query:
ALTER TABLE `forum` ADD `fhbanner2` VARCHAR( 50 ) NOT NULL AFTER `description` ;
ALTER TABLE `forum` ADD `fhbannerlink2` VARCHAR( 250 ) NOT NULL AFTER `fhbanner2` ;
ALTER TABLE `forum` ADD `fhmessage2` VARCHAR( 50 ) NOT NULL AFTER `fhbannerlink2` ;

------------------------------

Find in: admincp/forum.php

print_textarea_row($vbphrase['description'], 'forum[description]', $forum['description']);


below add:

print_input_row($vbphrase['fhbanner2'], 'forum[fhbanner2]', $forum['fhbanner2']);
print_input_row($vbphrase['fhbannerlink2'], 'forum[fhbannerlink2]', $forum['fhbannerlink2']);
print_input_row($vbphrase['fhmessage2'], 'forum[fhmessage2]', $forum['fhmessage2']);

Find:
$forum['description'] = convert_to_valid_html($forum['description']);

below add:
$forum['fhbanner2'] = convert_to_valid_html($forum['fhbanner2']);
$forum['fhbannerlink2'] = convert_to_valid_html($forum['fhbannerlink2']);
$forum['fhmessage2'] = convert_to_valid_html($forum['fhmessage2']);
---------------------------------

Edit Template : forumhome_forumbit_level1_post

Find:
<tbody>
	<tr align="center">
		<td class="alt1Active" colspan="2" align="$stylevar[left]" id="f$forum[forumid]">

below add:

<!-- Ad Banner Start -->
<table align="right" width="15%" border="0">
<div align="center" valign="top" valign="top">	
<if condition="$forum['fhbanner2']"><font size="1">$forum[fhmessage2]</font><br><a href="http://$forum[fhbannerlink2]" target="_blank"><img src="images/fhbanner/$forum[fhbanner2]" alt="$forum[fhbannerlink2]" border="0" /></a></div></if></table>
<!-- Ad Banner end -->



--------------------------------------------
Add these phrases:

Varname:
fhbanner2

text: 
Banner 2

Varname:
fhbannerlink2

text: 
Banner 2 Link

Varname:
fhmessage2

text: 
Postbits 2 Banner text i.e. Sponsored By or Affiliate with

--------------------------------------------
Then,

Create a "fhbanner2" folder EX: $vbhome/images/fhbanner
Reply With Quote
  #77  
Old 11-19-2004, 09:53 PM
[email protected] vbmenu_register("postmenu_573972", true);
Guest
 
Posts: n/a
Default

I'm not sure you understand what I'm trying to do.

Go to www.sportbikes.ws and look at the "Pocketbike" forum. I have a sponsor already there. Done deal...happy.

Now go into that forum http://www.sportbikes.ws/forumdisplay.php?f=103 and you'll see a sub forum "FAQ". That's were I want to put the second sponsor. I put the one you see there now just using some html to get by.

In the admincp, if I go into that FAQ sub forum, I see all the fields that I do on the main forumhome page.

Is this your understanding? Maybe I'm the one needing to have a few beers.

Thanks for the help !!
Reply With Quote
  #78  
Old 12-20-2004, 06:22 PM
Gottcha Gottcha is offline
 
Join Date: Oct 2004
Location: NY
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Been messing with this for awhile now and cant get it to run......can someone help installl or install it for me.....followed all the steps and banners not showing up.
Reply With Quote
  #79  
Old 12-28-2004, 02:02 PM
CSS59 CSS59 is offline
 
Join Date: Oct 2004
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How do i run query? I dont know how to do the first step

do i need to do anything diff for 3.0.3?
Reply With Quote
  #80  
Old 12-28-2004, 02:19 PM
Beermonster Beermonster is offline
 
Join Date: Dec 2003
Location: England
Posts: 362
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by JonelZ
How do i run query? I dont know how to do the first step

do i need to do anything diff for 3.0.3?
You need to run the query in mysql, you can do that using phpmyadmin, if you have cpanel hosting there will be a link to it from there, or you can also run then from within the admincp providing you have the right permissions set for it.
Reply With Quote
  #81  
Old 01-09-2005, 04:13 PM
MajorFm.com MajorFm.com is offline
 
Join Date: Dec 2004
Location: UK
Posts: 402
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can the banners be set so they expire after a period of time or even better...

Can the advertiser sign up, upload their banner, pay for the time requested, and it simply sits in admincp waiting a simple accept link (banner approval)

The admin clicks the link and the banner is added for the time paid for...
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 07:31 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.05025 seconds
  • Memory Usage 2,315KB
  • Queries Executed 27 (?)
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)bbcode_code
  • (2)bbcode_html
  • (6)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
  • (9)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete