vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Banner ad on forum Home (https://vborg.vbsupport.ru/showthread.php?t=63994)

Beermonster 11-15-2004 08:59 AM

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.

Spinball 11-17-2004 07:57 AM

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.

Beermonster 11-17-2004 08:56 AM

Quote:

Originally Posted by Spinball
Hi Beermonster,
there is a Firefox and Opera incompatibility in your code.

Thanks for the update :)

[email protected] vbmenu_register("postmenu_573934", true); 11-19-2004 07:47 PM

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. :)

Beermonster 11-19-2004 08:28 PM

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


[email protected] vbmenu_register("postmenu_573972", true); 11-19-2004 09:53 PM

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 !!

Gottcha 12-20-2004 06:22 PM

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.

CSS59 12-28-2004 02:02 PM

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?

Beermonster 12-28-2004 02:19 PM

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.

MajorFm.com 01-09-2005 04:13 PM

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...


All times are GMT. The time now is 08:05 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.01187 seconds
  • Memory Usage 1,756KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_html_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete