PDA

View Full Version : Banners instead of links for several sub-forums...?


cl4ym4n
10-08-2007, 11:43 PM
My forum-structure looks like that:

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



<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:


<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

<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 :)