vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Banners instead of links for several sub-forums...? (https://vborg.vbsupport.ru/showthread.php?t=159803)

cl4ym4n 10-08-2007 11:43 PM

Banners instead of links for several sub-forums...?
 
My forum-structure looks like that:

Code:

MAINFORUM
  --- SUBFORUM1
      --- SUB1
      --- SUB2
      --- SUB3
      --- ...
  --- SUBFORUM2
      --- SUB1
      --- SUB2
      --- SUB3
      --- ...

No i want to do this:
I want in subforum1 to show up banners instead of links.
Exactly... it is a squad-forum for our gaming-clan.

Now we want to show up the squad-banners instead of the subforum-names - but only on this subforum. All other subforums should have the normal links...

Anyone know how to realize that?

Analogpoint 10-09-2007 03:01 AM

Where the link is output in the templates, put in a conditional. Here's the pseudocode. Something along these lines. I didn't check what variables you would actually use. You'll have to take a look at these templates:

forumhome_forumbit_level1_nopost
forumhome_forumbit_level1_post
forumhome_forumbit_level2_nopost
forumhome_forumbit_level2_post
forumhome_subforumbit_nopost
forumhome_subforumbit_post


Code:

<a href="forumdisplay.php?f=$foruminfo[forumid]">
    <if condition="$foruminfo[forumid] == FORUMID">
          <!-- show banner -->
          <img src="path/to/image.jpg" alt="" />
  <else />
      <!-- show regular link text -->
      $foruminfo[title_clean]
    </if>
</a>


cl4ym4n 10-09-2007 10:41 PM

Thanks so far...

I just want the banners to show up in the forumindex/home, so i edited these templates...

forumhome_subforumbit_nopost
forumhome_subforumbit_post

Changed the forumid to the id of one of the subforums, saved the template and reloaded the forumindex...but there is still the text link - no banner.

For me it looks like somehow the if/else condition doesnt work.

Added this after the code from forumhome_subforumbit_post to test it out:

Code:

<if condition="$foruminfo[forumid] == 17">
      <b>lol</b>
  <else />
      <b>blah</b>
</if>

But now it is showing up blah after every subforum title...
So i guess, the <if condition="$foruminfo[forumid] == 17"> somehow isn't working right...

Any idea?

Analogpoint 10-10-2007 12:32 AM

Use $forum[forumid]

Here's your forumhome_subforumbit_post template

Code:

<img class="inlineimg" src="$stylevar[imgdir_statusicon]/subforum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" /> <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><if condition="in_array($forum[forumid], array(17, 22, 45))"><img src="IMAGE_HERE" alt="" /><else />$forum[title]</if></a>

cl4ym4n 10-10-2007 12:18 PM

Works like a charm...

Thx mate <3 :D

Analogpoint 10-10-2007 01:14 PM

You're very welcome :)


All times are GMT. The time now is 01:30 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.01183 seconds
  • Memory Usage 1,709KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete