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)
-   -   Add a banner image to each forum (https://vborg.vbsupport.ru/showthread.php?t=61555)

BradM 03-23-2004 04:25 AM

Quote:

Originally Posted by Eternal2u
is there any possiblity of changing this to make it where you can enable a random banner to appear..

so you cna put in say 10+ banners, and just have one randomly appear...would be kinda easy i think with a nice php sscript...hmm i think i might have a go at that now tha ti think of it...if you don't mind me editing your mod a bit eh?


Pretty sure he said a few posts back he was working on it.

Spinball 03-25-2004 06:16 PM

This hack is the basis of what I'm looking for and crucial to my upgrade from vB2 to vB3 since I have several sponsors with banners in specific forums.
I do need to be able to specify ALT text for the banners and also to have them rotate randomly.

Silviu 03-28-2004 08:05 AM

What about flash banner? Or html code, for getting the banner from some adserver?

xgaboard 03-30-2004 10:14 PM

Easy hack great job!

Flow Fusion 04-04-2004 10:07 PM

Ok I have two questions...one in the databas quiery it says ...// Adds fields to forum table called banner and bannerlink.

Run Query:

ALTER TABLE `forum` ADD `banner` VARCHAR( 50 ) NOT NULL AFTER `description` ;
ALTER TABLE `forum` ADD `bannerlink` VARCHAR( 250 ) NOT NULL AFTER `banner`

So these are to be one field line correct?

And my other question is it says Add these phrases:

are these to be global? or what? Thanks.

Flow Fusion 04-05-2004 12:19 PM

Hello? Can I get some help on this? An update..something?

Zachariah 04-05-2004 01:52 PM

Quote:

Originally Posted by Flow Fusion
Ok I have two questions...one in the databas quiery it says ...// Adds fields to forum table called banner and bannerlink.

Run Query:
ALTER TABLE `forum` ADD `banner` VARCHAR( 50 ) NOT NULL AFTER `description` ;
ALTER TABLE `forum` ADD `bannerlink` VARCHAR( 250 ) NOT NULL AFTER `banner`

So these are to be one field line correct?

And my other question is it says Add these phrases:

are these to be global? or what? Thanks.



Yep I used phpmyadmin.

Code:

ALTER TABLE `forum` ADD `banner` VARCHAR( 50 ) NOT NULL AFTER `description` ;
ALTER TABLE `forum` ADD `bannerlink` VARCHAR( 250 ) NOT NULL AFTER `banner` ;

all phrases are global

Flow Fusion 04-06-2004 11:49 PM

I don't understand "description?"
Database error in vBulletin 3.0.0:

Invalid SQL: UPDATE forum SET

### UPDATE QUERY GENERATED BY fetch_query_sql() ###
title = 'The Arts',
description = '',
banner = '',
bannerlink = '',
link = '',
displayorder = '3',
daysprune = '30',
parentid = '-1',
newpostemail = '',
newthreademail = '',
styleid = '0',
password = '',
options = '86017',
parentlist = '5,-1'
WHERE forumid=5
mysql error: Unknown column 'banner' in 'field list'

mysql error number: 1054

can I get some help? This happens when I try to show the forum in the drop down menu.

Zachariah 04-07-2004 04:13 AM

[QUOTE=Flow Fusion]I don't understand "description?"
[QUOTE]

Forum table
description is a row already there.
The comands place banner and bannerlink under the description row.

see attached.

Note: I changed description type to "blob" for something else. It has nothing to do with this hack.

Flow Fusion 04-07-2004 10:47 PM

Thanks I'll try this from scrach and see what happens.

French 04-11-2004 07:58 PM

Hello.
The banner image doesn't appear in my forum, although I have followed all the steps you indicate.

The new banner image is in the folder:
... mywebsite.de/images/banner/ ...

Bernd Z.

White Knight 04-13-2004 02:08 PM

Just a question.. so dont shoot :)

I like the assigned Banner... great hack

Would it be possible so that we you can add a html code also?

Its nice to have a banner then also add some information about the company.. like what they sell and so forth. Just a idea

Spinball 04-29-2004 09:29 AM

Look folks, we seem to have lots of people wanting this and that included above specific forums.
I personally want one banner displayed at random from several and in addition some static HTML pages containing news read in and displayed.
Let's do something which caters for everyone. Is this technically possible?

How about we have one new field in the forum table called, say, 'topinclude'. This field is the url of a file.
When the forum is displayed, the contents of this file are evaluated and displayed at the top.
Could this file be a .php file?
If so then we could all put whatever we want into this file and hey presto it gets displayed at the top.
Can we do this?

reteep 05-04-2004 02:57 PM

I just couldn't figure out how to add more than one banners yet. Could someone break this down again, please?
So in fact 3 different banners at 3 different spots.

Thanks!

Dras 05-04-2004 10:19 PM

You know to catter to them why not just add 2 fields? 1 for just the banner image name which is in $home/images/banner, then and advanced option to allow for HTML to be placed there instead. Then you guys can install some free banner rotating script (www.hotscripts.com).

If the basic field is empty ignre, if advnaced field is empty ignore.

Just some suggestions, I will try and edit this for you guys!

Dras 05-04-2004 11:14 PM

I know this may be a stupid question but where do I add the banners? lol

Willnot 05-07-2004 01:42 PM

Quote:

Originally Posted by Dras
I know this may be a stupid question but where do I add the banners? lol

Any way to incorporate a google ad banner??

A.Q.M 05-07-2004 03:15 PM

The correct Query is

Code:

ALTER TABLE `testing`.`forum` ADD `banner` VARCHAR(50) NOT NULL AFTER `description`, ADD `bannerlink` VARCHAR(250) NOT NULL AFTER `banner`;

Imprezer 05-21-2004 02:51 AM

This should not be limited to images only. Having "HTML" per forum would be a lot more functionable. Just my .02 rubbles.

Great hack. I will try it out.

Zachariah 05-21-2004 08:56 PM

I am working on some updates. Should have something by monday 05.24.04

Spinball 05-21-2004 09:33 PM

Quote:

Originally Posted by HarryButt
I am working on some updates. Should have something by monday 05.24.04

Excellent. Hope you took onboard the HTML suggestion. I used a modified version of this hack when I upgraded to vB3 last weekend. I added some ALT text as a third additional field in the forum table.
I would, however like to replace it all with the HTML or preferably processed contents of a PHP file.
Example of a banner rotation script if anyone finds this useful:
PHP Code:

<?php
$banners 
= array (
    
"avforums_avsales.gif|avforums_avsales.pl|Providing Audio and Visual equipment for over 15 years. Home cinema centre and on-line store.|0|468|60",
    
"avforums_digitaldirect.gif|avforums_digitaldirect.pl|Save ?'s Off High St Prices|0|468|60",
    
"avforums_discounttv.gif|avforums_discounttv.pl|Discount electrical uk - exclusive deals for av forums. Click here|0|468|60",
    
"avforums_richer.gif|avforums_richer.pl|Richer Sounds, The UK's Biggest Hi-Fi Retailer|0|468|60"

);
$banner $banners[mt_rand(0,sizeof($banners) - 1)];
list(
$imgsrc,$myurl,$alttext,$border,$width,$height) = explode ('|',$banner);
echo(
"<A HREF=\"http://www.avforums.com/cgi-bin/$myurl\" TARGET = \"_blank\"><IMG src=\"http://www.avforums.com/adverts/banners/$imgsrc?" mt_rand(1,999) . "\" border=\"$border\" width=\"$width\" height = \"$height\" alt=\"$alttext\"></A>");

?>


Zachariah 05-21-2004 11:13 PM

Spinball,

Ill take a look at that :). This is just some small updates.

Spinball 05-22-2004 08:57 AM

Cool - thanks, Harry. :)

reteep 05-27-2004 07:57 AM

Quote:

Originally Posted by Spinball
Excellent. Hope you took onboard the HTML suggestion. I used a modified version of this hack when I upgraded to vB3 last weekend. I added some ALT text as a third additional field in the forum table.
I would, however like to replace it all with the HTML or preferably processed contents of a PHP file.
Example of a banner rotation script if anyone finds this useful:

Can you explain how to use that rotation script with the banner hack?

Spinball 05-27-2004 08:10 AM

Quote:

Originally Posted by stormblast
Can you explain how to use that rotation script with the banner hack?

Unfortunately you can't. I posted the rotation script as an example so Harry would consider altering this hack so it could be used.
Basically if the idea of having an image, URL and ALT text for each forum should be dropped completely and instead a single field which links to a php script.
The php script is evaluated and the results put at the top of the forum.
This script could contain my rotation script.

run.exe 06-05-2004 07:20 AM

1) I frequently peruse this outstanding resource, and I was intrigued by this hack.

2) I followed every step, to the letter; however, no banners are being displayed.

3) I am running vBulletin (release code) v3.0.1

Any clarification/assistance would be most appreciated; my board is here:

http://www.500Ecstasy.com/forums


Thank you very much, in advance.

Kind regards,

Spinball 06-05-2004 09:50 AM

Run - it's impossible to tell what you've done wrong just by looking at your board. Most likely you have misnamed the banner images or put the wrong link to them in your forum table. What URL have you used for your banners?

FWF 06-12-2004 05:23 AM

how do i UNdo the SQL edits, i tryed to install this hack however it wont work. So id like to undo the SQL edits. thanks in advance.

Zachariah 06-13-2004 02:30 PM

Quote:

Originally Posted by FWF
how do i UNdo the SQL edits, i tryed to install this hack however it wont work. So id like to undo the SQL edits. thanks in advance.

If ya need help yell :nervous:

But to kill the sql install :

Code:

ALTER TABLE `forum` DROP `banner`, DROP `bannerlink`, DROP `banneralt`;
works for me :ermm: whats up ?

SnowBot 06-14-2004 01:24 AM

hhmm cant install this :(

Quote:

Error

SQL-query :

ALTER TABLE `forum` ADD `banner` VARCHAR( 50 ) NOT NULL AFTER `description`

MySQL said:


Duplicate column name 'banner'
any help ?

The Realist 06-14-2004 10:23 AM

Here is your answer and you said this yourself:

Duplicate column name 'banner'

Means that when you tried to run the SQL commands it tried to installed a column called banner but it could not because there is one already there.

Mamochka 06-19-2004 09:09 AM

I have a problem. Baner prevents to use search.
Essence of a problem: having pressed a button SEARCH leaves panel search in which we hammer themes for search. Panel leaves here only for banerom. :(
Any ideas?

tHe Rk 06-27-2004 01:11 AM

It would be nice if there was something in the instructions that said that you had to go to into forum manager and then the options would be there for each forum. I couldn't find them, and then after a little bit of looking found them, but I shouldn't have had too.

Zachariah 06-27-2004 07:41 PM

Quote:

Originally Posted by Mamochka
I have a problem. Baner prevents to use search.
Essence of a problem: having pressed a button SEARCH leaves panel search in which we hammer themes for search. Panel leaves here only for banerom. :(
Any ideas?

Re check the code editing ?
It's up on my site for last 7 months.

http://www.gzhq.net/forums/

Michael Morris 07-13-2004 10:38 AM

This hack has worked well for some time now at ENWorld, though we use it in the $header file to construct a forum specific logo. Our header looks like this...

Code:

<if condition="$foruminfo['banner'] AND $foruminfo['bannerlink']">
                <a href="$foruminfo[bannerlink]" target="_blank">
                        <img src="images/banner/$foruminfo[banner]" alt="$foruminfo[banner]" border="0" />
                </a><else />
        <if condition="$foruminfo['banner']">
                <img src="images/banner/$foruminfo[banner]" alt="$foruminfo[banner]" border="0" />
        <else />
        <img src="images/banner/default.gif" border="0">
</if></if>


Michael Morris 07-13-2004 10:41 AM

One small problem with the above comes with the popular VBAdvance CMPS hack. This hack doesn't set a forum, so the header falls to the default. In order that we "not" need to use a seperate header for the CMPS pages, the following code was put into our phpinclude_end file.

PHP Code:

if (defined('VBA_PORTAL'))

$output str_replace("default.gif""ENNewsLogo.gif"$output);



turbidblue 07-16-2004 06:24 PM

thank you :)


[high]* turbidblue clicks install :)[/high]

Spinball 08-07-2004 09:12 PM

May I direct people to
https://vborg.vbsupport.ru/showthread.php?t=67942
where there is a fairly simple alternative allowing multiple rotating banners in specific forums?

Blam Forumz 10-08-2004 09:41 PM

i using vb 3.0.2 and nowt happened!

Watson 10-13-2004 10:18 PM

Anyway to add a line break after this, cause it touches the top of subforums within the forums

Watson

/me clicks install, thanks for this


All times are GMT. The time now is 06:18 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.01394 seconds
  • Memory Usage 1,838KB
  • 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
  • (4)bbcode_code_printable
  • (2)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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