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)

Zachariah 02-13-2004 10:00 PM

Add a banner image to each forum
 
Works on: VB3 RC3 - 3.1+

This modification will Add an image banner w/ link option per forum.

This hack modifies/adds :

1 php file
2 templates
4 query / table field
4 added phrase

*1.6 Update 12.18.05

Useage:
This modification will Add an image banner w/ link Or paste in your own HTML code option per forum. These files can be any image. (png, jpg, gif, ect). This will be located after the $navbar on FORMDISPLAY. This images can be located on the localhost or on a remote server.

Admincp -> Forums & Moderators -> Forum Manager -> Edit Forum -> Fill out the banner info.

Banner Image - (location of image)
Banner URL - (Link that you go to when u click the banner)
Alt Tag (if you mouse over the banner; pop-up text)
HTML Paste (added)

You can also fill out the info when you make a new forum.

NOTES:


Changes:
--------
1.6
Banner shows up on each thread
adds: 1 more template edit to the install

*1.5
+Added HTML option

*1.2
+ Added Alt text for each banner(admincp)
+ Images no longer must be on the server
You can use a local image off your webserver or use a image at another location.
EX: /images/banner/someimage.jpg or http://www.yoursite.com/someimage.jpg

*1.1
+ Added option for image to have a link

*1.0
+ Image banner for every forum under the $navbar

*//


JAVA BANNER ROTATION

FYI-

I did some playing around took the <if></if> statement added to the ForumsDisplay template. You can insted place it in the header / footer template and it will show up also.

VB3.5X ver
https://vborg.vbsupport.ru/showthread.php?t=94119

Andreas 02-14-2004 06:50 PM

Looks quite good.
Currently we do have banners/forum - but hardcoded in templates :-/
This is easier to manage, but what about adding an URL too?
Would be useful if you want to display banner ads.

proxyMX 02-14-2004 07:10 PM

Ive been looking for something like this
except id rather have the banner on the main page next to a forums name

Allan 02-14-2004 07:18 PM

very nice, cheer :)

gmarik 02-14-2004 07:52 PM

Random option and a counter would be a good future option, nice.

FleaBag 02-14-2004 08:43 PM

Works great for my needs as is, cheers mate.

MaDCaT75 02-14-2004 09:33 PM

hmm.... I think I came up with this idea for VB2 :rolleyes:

riyatch 02-15-2004 12:26 AM

any chance of making this .htl compatible??

Zachariah 02-16-2004 11:06 PM

*1.1 Update

Added link (option) to each banner.
"Clicking" the banner will open the URL location to a _blank page.
Image can be used with or without a URL link.

New users use add banner to forum 1.1.txt.
1.0 users please use the upgrade1.0 to 1.1.txt to add link option.

Andreas 02-16-2004 11:32 PM

I think i'll integrate this new version into our board :)
Thanks!

Zachariah 02-16-2004 11:40 PM

Quote:

Originally Posted by KirbyDE
I think i'll integrate this new version into our board :)
Thanks!

No problem :D

Ageel 02-17-2004 09:08 AM

Nice Hack

I think we can use Dynamic banners using PhpAds or so :)
don't we?!!

thanx

prat 02-18-2004 07:53 AM

Anything in the works for a random banner? Or cycling? That would rock.

Zachariah 02-18-2004 09:56 PM

Quote:

Originally Posted by prat
Anything in the works for a random banner? Or cycling? That would rock.

Worken on it ya. :tired:

Charlie Argueta 02-23-2004 12:35 PM

Nice work, and now some suggestions, is it possible to get also the clicks in the banner?
Also to have the full amount of banners displayed in the Board?

See Ya

gc1 02-26-2004 10:16 PM

10 bucks(PayPal) to any mod here or highly trustworthy person here to install this hack for me

I have tried and I cant get it right for some reason and I am sure it is my fault.

I have a rather large forum and I need help

TIA as always, the people here are great and the work you guys offer free here is awesome

dethfire 02-27-2004 02:10 AM

what about a hack that adds little button links to the homepage forum sections, I know they had it for vb2

Da Lynched 1 02-27-2004 08:18 AM

Quote:

Originally Posted by dethfire
what about a hack that adds little button links to the homepage forum sections, I know they had it for vb2

I'm having a problem installing it as well... when I go to query I'm told:

Quote:

An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ';
ALTER TABLE `forum` ADD `bannerlink` VARCHAR( 250 ) NOT NULL

Zachariah 02-27-2004 01:12 PM

Quote:

Originally Posted by Da Lynched 1
I'm having a problem installing it as well... when I go to query I'm told:


I'll need to find out what syntax to use in admincp's query utility. The querys however do work in phpmyadmin.

EX: result from phpmyadmin:

Your SQL-query has been executed successfully

ALTER TABLE `forum` ADD `banner` VARCHAR( 50 ) NOT NULL AFTER `description` ;# Affected rows:261
ALTER TABLE `forum` ADD `bannerlink` VARCHAR( 250 ) NOT NULL AFTER `banner` ;# Affected rows:261

Da Lynched 1 02-27-2004 01:21 PM

Quote:

Originally Posted by HarryButt
I'll need to find out what syntax to use in admincp's query utility. The querys however do work in phpmyadmin.

EX: result from phpmyadmin:

Your SQL-query has been executed successfully

ALTER TABLE `forum` ADD `banner` VARCHAR( 50 ) NOT NULL AFTER `description` ;# Affected rows:261
ALTER TABLE `forum` ADD `bannerlink` VARCHAR( 250 ) NOT NULL AFTER `banner` ;# Affected rows:261

I didn't even think about using phpmyadmin... doh

Zachariah 03-02-2004 10:20 AM

Everything worken out on the installs ?

NexVision 03-02-2004 10:33 PM

Quote:

Originally Posted by HarryButt
Everything worken out on the installs ?

got a question any way to make it support multiple images like side by side

gc1 03-02-2004 10:55 PM

Yes, I had it installed right I just couldn't find it :)

Thanks

Great hack

Zachariah 03-03-2004 01:30 AM

Quote:

Originally Posted by NexVision
got a question any way to make it support multiple images like side by side

That should not be a problem to add on. :rolleyes:

Say max 5 images ? each as a variable.

IE:
$image1 w/ $link1
$image2 w/ $link2
$image3 w/ $link3
$image4 w/ $link4
$image5 w/ $link5

Then place the <if> </if> statments where you wish. ?

We are talking static images. Not rotation ? Give me a little info.

NexVision 03-03-2004 01:42 AM

Quote:

Originally Posted by HarryButt
That should not be a problem to add on. :rolleyes:

Say max 5 images ? each as a variable.

IE:
$image1 w/ $link1
$image2 w/ $link2
$image3 w/ $link3
$image4 w/ $link4
$image5 w/ $link5

Then place the <if> </if> statments where you wish. ?

We are talking static images. Not rotation ? Give me a little info.


I mean like 1 on either side of this image so there were 3 or 4 or 5 like you said not to sure wut you mean static images i dont know ++++ about hacks just opened my board 3 months ago as a spoof and now I got over 5000 members so im tryin to reecoop some right now I had my friend add the image thru the header template so would i remove that before installing this hack or would it put it below or above it.

If you are willing to do this then i'll def wait till its updated cause I think it would be awesome with easy access.

edit:::::: sorry wrong pic

Zachariah 03-03-2004 02:06 AM

This hack allows you to place an image with/without a link for each forum you create. (Possible different image w/ different link per forum) There is a bit of code you place in a template to make the image appear where you want it to.

The EX:

With some more hacking I could make it were there are 5 different images w/ links you can place per forum.
There would be 5 bit of code for the 5 images you want to show up when a forum loads.



Current Hack w/ 1 image

http://www.gzhq.net/forums/forumdisplay.php?f=118
(with image and link - Hellfire Empire Image)

http://www.gzhq.net/forums/forumdisplay.php?f=23
(without image and link)

NexVision 03-03-2004 02:38 AM

If you want to take it on I would def install it ive been looking to have 3 or so up there 5 would be dope as hell.

Da Lynched 1 03-04-2004 01:52 AM

I've gotten now down to the Add these phrases portion. I'm assuming these would go in the the Replacement Variable manager but I'm not sure. Where exactly do I do that?

Sorry for being difficult, I'm making sure I do it properly. I'm all about helpin create a better detailed install for you, so some not as advanced person as me can do it simply without having to bug everyone to do it. So far it's been pretty simple, I just completely forgot about using myphpadmin, and did the query through vbulletin. After that the only hang up has been where to add the phrases.

Da Lynched 1 03-04-2004 02:27 AM

I was thinkin about somethin earlier but I really suck with php right now... first was it would be cool if you could do a rotating banner (with link) and make it so it's always under the nav bar, or above the footer.

Zachariah 03-04-2004 01:27 PM

Quote:

Originally Posted by Da Lynched 1
I've gotten now down to the Add these phrases portion. I'm assuming these would go in the the Replacement Variable manager but I'm not sure. Where exactly do I do that?


Admincp -> Languages & Phrases -> Phrase Manager -> Add New Phrase

All Phrases are "global"

xg3 03-08-2004 08:47 AM

hi, im looking for a hack to do this: http://www.srtforums.com/forums/index.php?
add the sponsored banner links on the front page next to an individual forum. is there a hack that does this? this is the closest one ive found.

joeychgo 03-08-2004 09:04 AM

I would like that as well.

Also, I would like a hack that randomly changes between banners on the forum pages..... SO perhaps 4 or 5 different banners would randomly rotate between page clicks........

Beermonster 03-08-2004 06:05 PM

/me clicks install

Thanks for that, is there some way of adding a click counter to it?

Zachariah 03-09-2004 11:39 PM

Quote:

Originally Posted by Beermonster
[high]* Beermonster clicks install
[/high]

Thanks for that, is there some way of adding a click counter to it?

Yeppers, I'll have something soon. Have been worken on some other things.

gopherhockey 03-11-2004 12:44 AM

Quote:

Originally Posted by gmarik
Random option and a counter would be a good future option, nice.

Or a feature to allow different forums to have different banners (as in sponsors for various forums)

Zachariah 03-11-2004 02:53 AM

Quote:

Originally Posted by gopherhockey
Or a feature to allow different forums to have different banners (as in sponsors for various forums)


Currently this allows a different image w/ link per forum made. :D

Michael Morris 03-20-2004 06:12 AM

Hi. I have this working fine on our normal pages now but it doesn't want to work on our advance pages (note that I moved the banner into the header and changed the code as follows)

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></if>

That displays a default image if no forum is currently selected (like the main page). Anyway, vbadvance displays the default, but I would like it to display the banner... Wait a sec... BRB

Michael Morris 03-20-2004 06:19 AM

Ok, I was double checking to make sure I had banners defined for each of the three forums. Anyway, vbulletin is dropping to the default image, which means it isn't putting anything into the $foruminfo['banner'] variable. How do I go about retrieving this info?

Michael Morris 03-20-2004 07:23 AM

Ok, so you don't want your banner in the $navbar template but in your header. Fine. Here's one way.

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></if>

Note the extra statement after the else that sets a default page for your forum.

Now if you're like me and you use vbadvance you can port variant headers over there without changing your $header template. First set $index_header and $index_footer equal to the site's normal header & footer as follows:

Code:

eval('$index_header = "' . fetch_template('header') . '";');
eval('$index_footer = "' . fetch_template('footer') . '";');

Then, assuming you don't have any other default.gif files in your header, you can do a str replace for each forum. The site I work on has three as follows:

Code:

if ($newsforum == 110)
{
$index_header = str_replace("default.gif", "scifinews.gif", $index_header);
}
elseif ($newsforum == 111)
{
$index_header = str_replace("default.gif", "pdfnews.gif", $index_header);
}
else
{
$index_header = str_replace("default.gif", "ENNewsLogo.gif", $index_header);
}

That bit of code goes immediately after the second bit. I hope this makes some sense - it's 5 AM here and I'm babbling.

Eternal2u 03-20-2004 04:10 PM

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?


All times are GMT. The time now is 04:46 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.01516 seconds
  • Memory Usage 1,835KB
  • 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
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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