PDA

View Full Version : Sub Forum Icons help


merk_aus
06-13-2010, 05:07 AM
Hey there everyone;
I was wondering if anyone could offer some assistance with something I am attempting to do with my site and that is to have custom sub forum images dependent on the forum.

At the moment when you have sub forums displaying on the ForumHome it displays an image:
images/statusicon/subforum_new-48.png

However what I would like to do is have it so:
Sub Forum 1 - displays image - images/statusicon/subforum_new-1.png
Sub Forum 2 - displays image - images/statusicon/subforum_new-2.png
Sub Forum 3 - displays image - images/statusicon/subforum_new-3.png

Before anyone directs me to modifications available on these forums I have attempted to install them however they don't actually change those sub forum images per forum.

I would really appreciate some help if someone knows how to do it.

DragonBlade
06-13-2010, 06:12 AM
You can easily do this under the forum section's settings

Within Prefix for Forum Status Images, just put your custom path. For example, putting in:
subforum/

will point to:
images/statusicon/subforum

This subforum folder images must use the same filenames from the default ones:
forum_link-48.png
forum_new_lock-48.png
forum_new-48.png
forum_old_lock-48.png
forum_old-48.png

merk_aus
06-13-2010, 06:25 AM
No sorry - first of all thank you for your help - but I know how to change the Status Icons but what just suggested doesn't do what I have asked for.

I am looking at changing the icon that appears on the Forum Home Page when you have Sub Forums viewable on the home page - at the moment it displays:
http://www.yourdomain.com/images/statusicon/subforum_new-48.png

What I would like for it to do is each sub forum has it's own little icon that displays ON THE FORUM HOME PAGE.

Thank you for attempting to help.

DragonBlade
06-13-2010, 07:07 AM
This requires template editing. Go to forumhome_subforumbit_post under forumhome:

Replace the code with this:


<li class="subforum">

<vb:if condition="$forum[forumid] == xx">
<img class="inlineimg" src="pathtoimage" alt="" border="0" id="forum_statusicon_{vb:raw forum.forumid}" />

<vb:elseif condition="$forum[forumid] == xx">
<img class="inlineimg" src="pathtoimage" alt="" border="0" id="forum_statusicon_{vb:raw forum.forumid}" />

<vb:else />
<img class="inlineimg" src="{vb:stylevar imgdir_statusicon}/subforum_{vb:raw forum.statusicon}-48.png" alt="" border="0" id="forum_statusicon_{vb:raw forum.forumid}" />
</vb:if>

<vb:if condition="$depth > 1"></vb:if>
<a href="{vb:link forum, {vb:raw forum}}">{vb:raw forum.title}</a>
</li>


xx is your forumid
pathtoimage is your location of the image you want to use

Of course, add more elseifs for more subforums.

merk_aus
06-13-2010, 07:17 AM
I want to have your babies :) Thanks I thought it was something basic but have the biggest headache today and can't really think straight.

I really appreciate it - if you have paypal please send me a message so I can send you a small donation for your assistance, I really do appreciate your help.

--------------- Added 1276417513 at 1276417513 ---------------

UPDATE: Just an Update, I installed this however the Subforum Title and other subforums have disappeared (I understand the other sub forums as I need to put this information for them) however the sub forum titles are completely gone.

Sorry to be a pain but thought if we could get an update for this it would be greatly appreciated and useful to others.

--------------- Added 1276423235 at 1276423235 ---------------

I am hoping someone can help with this when attempting the above codes it comes up with:

The following error occurred when attempting to evaluate this template:
Invalid Tag Nesting
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

DragonBlade
06-13-2010, 11:25 AM
Sorry, forgot a trailing slash on the elseif.


<li class="subforum">

<vb:if condition="$forum[forumid] == xx">
<img class="inlineimg" src="pathtoximage" alt="" border="0" id="forum_statusicon_{vb:raw forum.forumid}" />

<vb:elseif condition="$forum[forumid] == yy" />
<img class="inlineimg" src="pathtoyimage" alt="" border="0" id="forum_statusicon_{vb:raw forum.forumid}" />

<vb:else />
<img class="inlineimg" src="{vb:stylevar imgdir_statusicon}/subforum_{vb:raw forum.statusicon}-48.png" alt="" border="0" id="forum_statusicon_{vb:raw forum.forumid}" />
</vb:if>

<vb:if condition="$depth > 1"></vb:if>
<a href="{vb:link forum, {vb:raw forum}}">{vb:raw forum.title}</a>
</li>


Also I should make myself clear.
You replace xx and pathtoximage for your first subsection.
You replace yy and pathtoyimage for your second subsection and etc.

If you need to change more, you just copy paste the else if statement code and add it after your last elseif code:

<vb:elseif condition="$forum[forumid] == zz" />
<img class="inlineimg" src="pathtozimage" alt="" border="0" id="forum_statusicon_{vb:raw forum.forumid}" />


The end result should look like this:

<li class="subforum">

<vb:if condition="$forum[forumid] == xx">
<img class="inlineimg" src="pathtoximage" alt="" border="0" id="forum_statusicon_{vb:raw forum.forumid}" />

<vb:elseif condition="$forum[forumid] == yy" />
<img class="inlineimg" src="pathtoyimage" alt="" border="0" id="forum_statusicon_{vb:raw forum.forumid}" />

<vb:elseif condition="$forum[forumid] == zz" />
<img class="inlineimg" src="pathtozimage" alt="" border="0" id="forum_statusicon_{vb:raw forum.forumid}" />

<vb:else />
<img class="inlineimg" src="{vb:stylevar imgdir_statusicon}/subforum_{vb:raw forum.statusicon}-48.png" alt="" border="0" id="forum_statusicon_{vb:raw forum.forumid}" />
</vb:if>

<vb:if condition="$depth > 1"></vb:if>
<a href="{vb:link forum, {vb:raw forum}}">{vb:raw forum.title}</a>
</li>


You wanted the images to be linkable as well, then use this code instead:

<li class="subforum">

<vb:if condition="$forum[forumid] == xx">
<a href="{vb:link forum, {vb:raw forum}}"><img class="inlineimg" src="pathtoximage" alt="" border="0" id="forum_statusicon_{vb:raw forum.forumid}" />{vb:raw forum.title}</a>

<vb:elseif condition="$forum[forumid] == yy" />
<a href="{vb:link forum, {vb:raw forum}}"><img class="inlineimg" src="pathtoyimage" alt="" border="0" id="forum_statusicon_{vb:raw forum.forumid}" />{vb:raw forum.title}</a>

<vb:elseif condition="$forum[forumid] == zz" />
<a href="{vb:link forum, {vb:raw forum}}"><img class="inlineimg" src="pathtozimage" alt="" border="0" id="forum_statusicon_{vb:raw forum.forumid}" />{vb:raw forum.title}</a>

<vb:else />
<img class="inlineimg" src="{vb:stylevar imgdir_statusicon}/subforum_{vb:raw forum.statusicon}-48.png" alt="" border="0" id="forum_statusicon_{vb:raw forum.forumid}" />
<a href="{vb:link forum, {vb:raw forum}}">{vb:raw forum.title}</a>
</vb:if>

</li>

merk_aus
06-13-2010, 11:27 AM
Now it's official I want to have your babies :D