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)

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 09:13 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.01314 seconds
  • Memory Usage 1,749KB
  • 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
  • (2)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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