Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-08-2007, 11:43 PM
cl4ym4n cl4ym4n is offline
 
Join Date: Jul 2007
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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?
Reply With Quote
  #2  
Old 10-09-2007, 03:01 AM
Analogpoint's Avatar
Analogpoint Analogpoint is offline
 
Join Date: Feb 2007
Posts: 656
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #3  
Old 10-09-2007, 10:41 PM
cl4ym4n cl4ym4n is offline
 
Join Date: Jul 2007
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #4  
Old 10-10-2007, 12:32 AM
Analogpoint's Avatar
Analogpoint Analogpoint is offline
 
Join Date: Feb 2007
Posts: 656
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #5  
Old 10-10-2007, 12:18 PM
cl4ym4n cl4ym4n is offline
 
Join Date: Jul 2007
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works like a charm...

Thx mate <3
Reply With Quote
  #6  
Old 10-10-2007, 01:14 PM
Analogpoint's Avatar
Analogpoint Analogpoint is offline
 
Join Date: Feb 2007
Posts: 656
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're very welcome
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:48 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04334 seconds
  • Memory Usage 2,205KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete