vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Add a banner image to each forum (vb3.5) (https://vborg.vbsupport.ru/showthread.php?t=94119)

Zachariah 08-11-2005 10:00 PM

Add a banner image to each forum (vb3.5)
 
/* -----------------8/11/2005-----------------
[HowTo] Add a banner option image w/ Link or HTML paste to each forum V.1.6
Tested on vBulletin: 3.5.0 RC2

Zachariah - http://www.gzhq.net

This is a VB3.5 Ver of my previous hack:

*** Add a banner image to each forum (VB 3.0x)
https://vborg.vbsupport.ru/showthread.php?t=61555

*** Info:
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.
--------------------------------------------------*/

Upload the "plug-in" and edit 2 template, It's a snap.
:cool:


Changelog:
------------
1.6
Banner shows up on each thread
adds: 1 more template edit to the install
Requested by: - Ryan McBain

** Note: 1.5 - 1.6 needs only to edit SHOWTHREAD not Reinstall the XML files

1.5
Added HTML option (tested w/ Java and Iframe from phpadsnew output)
Added 3.x to VB 3.5 upgrade XML file.

** Random Banner Code Java

**Please click " Install " to track updates.

TCattitude 08-12-2005 12:38 AM

Nice!
Can we mod this to do something more "flexible" and "per forum"?, like this:
https://vborg.vbsupport.ru/showthread.php?t=65890
To put our own html code, instead a direct link/image for a banner.

To use another ads script with vbulletin, like phpadsnew.
Can you do that?

Thanks for all in advance ;)

Zachariah 08-12-2005 12:47 AM

Quote:

Originally Posted by TCattitude
Nice!
Can we mod this to do something more "flexible" and "per forum"?, like this:
https://vborg.vbsupport.ru/showthread.php?t=65890
To put our own html code, instead a direct link/image for a banner.

To use another ads script with vbulletin, like phpadsnew.
Can you do that?

Thanks for all in advance ;)

To put your own html code is not to hard( ill see what I can cook up). This does allow a direct Image / link / alt Tag per forum.

I know the Java / HTML that phpadsnew spits out is easy. I'll have to test the php code it spits out.

TCattitude 08-12-2005 01:36 AM

Quote:

Originally Posted by HarryButt
To put your own html code is not to hard( ill see what I can cook up). This does allow a direct Image / link / alt Tag per forum.

I know the Java / HTML that phpadsnew spits out is easy. I'll have to test the php code it spits out.

Thanks again in advance for look that ;)

MentaL 08-12-2005 12:29 PM

Just what i wanted , i asume each section supports different banners and multiple banners?

Zachariah 08-12-2005 12:43 PM

Quote:

Originally Posted by mentalrz
Just what i wanted , i asume each section supports different banners and multiple banners?

This add-on is very simple.

1 image with or without a link , and alt tag per forum. No rotation , click or impression count.

The code can be moved around on the Forumdisplay template (ie: header, footer, it currently sits under the $navbar).

MentaL 08-12-2005 12:49 PM

added and using on ragezone.com -- would be nice if i could add multiple stuff side by side or a random option ! none the less its very useful and appreciated.

utw-Mephisto 08-17-2005 02:25 AM

Works like a charm :) *installed*

wolfyman 08-17-2005 02:42 AM

easy and nice - thanks :)

clicks install

BuRNZau 08-17-2005 11:33 AM

Cheers!

rjerina 08-17-2005 02:27 PM

nice mod. it would be nice too to be able to add in your own html code like someone else said as well, as a lot of people use Google Adsense on their forums :)

wolfyman 08-17-2005 03:08 PM

agreed - phpadsnew is what i use, but it amounts to the same thing. I'm not live with 3.5 yet, but once I do go live with it - that will be a necessity, not a wish.

utw-Mephisto 09-02-2005 02:38 AM

Is there a way to show it on forumhome too ?

Emil 09-02-2005 01:33 PM

Really nice.. *Installed*

Would it be possible to make something so we can add the code for a Google adsense banner instead of a regular banner link?

Zachariah 09-02-2005 04:48 PM

Quote:

Originally Posted by Emil
Really nice.. *Installed*

Would it be possible to make something so we can add the code for a Google adsense banner instead of a regular banner link?

I am working on that and an option: "Mod" of the forum can change the banner or not. The adding your own code option will be 1st on the list.

Emil 09-02-2005 08:53 PM

That sounds great :)

Zachariah 09-04-2005 01:03 AM

I have the "add" own HTML ready not worked on adding PHP. ( works: w/ Java and Iframe from phpadsnew)

TCattitude 09-04-2005 03:05 AM

Great! :*

:P

ckmarkhsu 09-05-2005 02:29 PM

got error =.=

below:

Field ircchan is not defined in $validfields in class vb_datamanager_forum in /includes/class_dm.php on line 483

Zachariah 09-06-2005 12:51 PM

Quote:

Field ircchan is not defined in $validfields in class vb_datamanager_forum in /includes/class_dm.php on line 483
Has nothing to do with this hack directly, unless there is another hack and is conflicting. Looking @ your error there was a hack dealing with IRC/MIRC you installed that missed a step in the creation of the hack or you missed a step installing it. ( I think ..... I am not a VB guru :cry: )

If this is true try adding a Plugin.

Although you can edit class_dm_form.php, in VB3.5 we have plugins !!! :bunny:

hookname = forumdata_start
PHP Code:

$this->validfields['ircchan'] = array(TYPE_STRREQ_NO); 

Let me know how it works out. :nervous:

Quote:

Originally Posted by TCattitude
Great! :*

:P

:rambo: , have you tryed out the html / code part of the update ? I only tested w/ java and Iframe from phpadsnew output.

Feedback :nervous:

gc1 09-21-2005 11:40 AM

Works perfect thanks

Brinnie 09-21-2005 06:55 PM

This is nice.

So if I have a music banner, I'll put it on the music forum. :)

Ramsesx 09-22-2005 07:31 PM

I get this error what can be wrong?
MySQL Error : Unknown column 'banner' in 'field list'
Error Number : 1054

Zachariah 09-22-2005 10:52 PM

Did you skip the XML file import?

This is a Product to be imported via. plug-in system.

1) Choose the right XML file.

*** How to Install:

In your Admin Control Panel

Admincp => Plugin System => Manage Products
Click [Add/Import Product]
Browse for the file "banner_image.xml"
Allow Overwrite should be off
Import

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--
*** How to Upgrade:
There are 2 old ver. of this hack. What do I use?
What do you have installed?
1. banner, alt, link (use: 3.x to 3.5no-code.xml) v1.2
2. banner, alt, link, HTML (use: 3.x to 3.5code.xml) v1.5


In your Admin Control Panel After you upgrade to VB3.5.

Admincp => Plugin System => Manage Products
Click [Add/Import Product]
Browse for the file "xxxxxxxxxxx.xml"
Allow Overwrite should be off
Import

Quote:

Originally Posted by Ramsesx
I get this error what can be wrong?
MySQL Error : Unknown column 'banner' in 'field list'
Error Number : 1054


Ramsesx 09-23-2005 09:37 AM

First I imported the banner_image.xml, than in ForumDisplay I put after $navbar:

<if condition="$foruminfo['banner'] AND $foruminfo['bannerlink']"><center><a href="$foruminfo[bannerlink]" target="_blank"><img src="$foruminfo[banner]" alt="$foruminfo[banneralt]" border="0" /></a></center><br />
<else />
<if condition="$foruminfo['banner']"><center><img src="$foruminfo[banner]" alt="$foruminfo[banneralt]" border="0" /></center><br />
<else />
<if condition="$foruminfo['bannercode']"><center>$foruminfo[bannercode]</center><br />
</if>
</if>
</if>


Because it was not working I imported the 3.x to 3.5no-code.xml.
Now I had 2 entries in the plugin folder, I unsinstalled the old one and now having only the Add Banner Upgrade 1.5 in the pluginfolder but this mysql error is coming if I want to save a Forum.
Thank you

Zachariah 09-23-2005 11:42 AM

vb3.5x new install - banner_image.xml

vb3.0x upgrade - 3.x to 3.5code.xml - If you have already upgraded to ver. 1.5 in VB3.x hack.
vb3.0x upgrade - 3.x to 3.5no-code.xml - If you have ver. 1.2 in VB3.x hack.

After the install you should have:

2 plugins
add Banner - AdminCP
add Banner - ForumDisplay

Your manual template edit is fine, and will stay there even if you install / uninstall the plugins / products.

All XML files will make the same plugins. They have different DB edits.

Ramsesx 09-23-2005 12:26 PM

Cool, now it is working, thank you for this great plugin Zachariah :) :banana:

Ryan McBain 09-28-2005 07:14 AM

I must be doing something wrong cause I can't get the banners to show up in the showthread forums (where you see the posts of other people) just the main forums.

Zachariah 09-28-2005 03:53 PM

Changelog:
------------
1.6
Banner shows up on each thread
adds: 1 more template edit to the install
Requested by: - Ryan McBain

** Note: 1.5 - 1.6 needs only to edit SHOWTHREAD not Reinstall the XML files

TomAlien 10-03-2005 09:11 AM

How can I use this plugin for a Main Page banner?

azmi 10-03-2005 11:22 AM

Quote:

Originally Posted by TomAlien
How can I use this plugin for a Main Page banner?

this would be great :banana:
and then.... hack of the month? :rolleyes:
*click install*

Zachariah 10-03-2005 12:05 PM

This hack can work where ForumID can be used. The FORUMHOME does not have in "ID". There is a way that you can set a default banner that does not change via AdminCP. I have worked the banner in the $header to construct a default banner if there is not one filled in. This wil also show the default image in the FORUMHOME (in red, below).


Code:

<if condition="$foruminfo['banner'] AND $foruminfo['bannerlink']"><center><a href="$foruminfo[bannerlink]" target="_blank"><img src="$foruminfo[banner]" alt="$foruminfo[banneralt]" border="0" /></a></center><br />
<else />
<if condition="$foruminfo['banner']"><center><img src="$foruminfo[banner]" alt="$foruminfo[banneralt]" border="0" /></center><br />
<else />
<if condition="$foruminfo['bannercode']"><center>$foruminfo[bannercode]</center><br />
<else />
<a href="http://www.yoursite.com"><img src="images/banner/default.gif" border="0" alt="banner image" /></a>

</if>
</if>
</if>

You could also just edit the FORUMHOME:
after $navbar

Code:

<a href="http://www.yoursite.com"><img src="images/banner/default.gif" border="0" alt="banner image" /></a>
Fill in your info. (this will be static, but will work)

azmi 10-03-2005 01:04 PM

is there no way to make it not static?
a coder might explain it better, but how about this way?

in vbulletin options you can give a default banner.
if you leave this blank, the forum displays the specific thread banner

like:
PHP Code:

<if condition="$foruminfo['bannerdefault'] ... //vbulletin options for default
<else />
<if condition="
$foruminfo['banner']... // forum options
</if
</if 

don't laugh - i'm a noob in php :rolleyes:

Zachariah 10-03-2005 01:34 PM

Quote:

Originally Posted by azmi
is there no way to make it not static?
a coder might explain it better, but how about this way?

in vbulletin options you can give a default banner.
if you leave this blank, the forum displays the specific thread banner

like:
PHP Code:

<if condition="$foruminfo['bannerdefault'] ... //vbulletin options for default
<else />
<if condition="
$foruminfo['banner']... // forum options
</if
</if 

don't laugh - i'm a noob in php :rolleyes:

I understand. Yes this could be done.

I might move the template edit to the end of the $navbar, so that it would be on every page. The drawback of this is that programs that use the $navbar (gallery, non-VB pages, CMS front ends, etc .) would also have the banner under the navbar.

Ill look in on it.

azmi 10-03-2005 07:23 PM

thanks a lot for your help :up:

commonsense 10-04-2005 06:59 PM

Everyone else seems to have no issue, so I feel a little dumb asking this.

I got this installed fine through the plugin manager, but once I added the code to the two templates I get "Parse error: parse error, unexpected '<' in /www/b/batavia/htdocs/forums/forumdisplay.php on line 336" when I try to access a forum and a simpilar error when I try to go direct to a thread.

I am a php newbie, so not sure what i am doing wrong...

Zachariah 10-04-2005 08:30 PM

Quote:

Originally Posted by commonsense
Everyone else seems to have no issue, so I feel a little dumb asking this.

I got this installed fine through the plugin manager, but once I added the code to the two templates I get "Parse error: parse error, unexpected '<' in /www/b/batavia/htdocs/forums/forumdisplay.php on line 336" when I try to access a forum and a simpilar error when I try to go direct to a thread.


I am a php newbie, so not sure what i am doing wrong...

What other showtread type plugins are you running ? VB ver ?

commonsense 10-05-2005 12:27 AM

Quote:

Originally Posted by Zachariah
What other showtread type plugins are you running ? VB ver ?

None that I know of.. this is a fresh 3.5 install.

csidlernet 10-05-2005 02:54 AM

thanks!
/me installs

dreck 10-05-2005 03:35 AM

Very nice...

Thanks, dreck

*install*


All times are GMT. The time now is 02:43 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.01497 seconds
  • Memory Usage 1,836KB
  • 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
  • (2)bbcode_code_printable
  • (3)bbcode_php_printable
  • (11)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