PDA

View Full Version : Subforum Icons


Set3sh
04-22-2014, 05:37 AM
Hello,

I'd like to remove all subforum status icons and replace it with
&bull; <a href="{vb:link forum, {vb:raw row}}">{vb:raw row.title}</a> if there are not new posts
and with
<b>&rarr; <a href="{vb:link forum, {vb:raw row}}">{vb:raw row.title}</a></b> if there are new posts.

Any hints regarding how can I do this?

Thank you.

Set3sh
04-25-2014, 03:49 PM
So, not even a single idea? :confused:

Lynne
04-25-2014, 04:08 PM
Well, I can tell you that you'll need to modify the forumhome_subforums template and that the variable you will want to look at is $row['statusicon'] to determine if it is going to be bold or not. So, play around with that and post your exact template change if you need more help.

Set3sh
04-25-2014, 04:13 PM
This is my forumhome_subforums template:

<style>
.subforums ol.subforumlist { float: left; width: 100%; margin: 0; padding: 0; }
.subforumlist li.subforum { float: left; width: 33%; margin: 0; padding: 0; clear:none;}
</style>

<div class="subforums">
<br />
<h4 class="subforumlistlabel">{vb:rawphrase subforums}:</h4>
<ol class="subforumlist commalist">
<vb:each from="subforums" value="row">
<li class="subforum">
<vb:if condition="$row['canpost']">
<vb:if condition!="CONDITION-TO-CHECK-NEW-POSTS?"> &bull; <a href="{vb:link forum, {vb:raw row}}">{vb:raw row.title}</a></vb:if>
<vb:else />
<b>&rarr; <a href="{vb:link forum, {vb:raw row}}">{vb:raw row.title}</a></b>
</vb:if>
</li>
</vb:each>
</ol>
</div>

I need the condition...

Set3sh
04-30-2014, 03:30 PM
Any hints regarding how can I check if a subforum has new posts?

Lynne
04-30-2014, 04:03 PM
I already told you to look at the value of $row['statusicon'] for the forum. Print it out in the template and you will see what I mean.

{vb:raw row.statusicon}

Set3sh
05-01-2014, 02:32 PM
Where should I look for it and how should I use it?
I don't want to use the default forum status icons for subforums, I'd like to display a dot and a bold name of the subforum if it has new posts..
Sorry for being a pain lol..

Lynne
05-01-2014, 04:44 PM
Like...
<vb:if condition!="$row['statusicon'] == 'something_here'">

but, in order to find the 'something_here', you need to print it out and see what the value is first. So, add this line to your template and see what value gets spit out for when there are new posts and when there are not so that you know how to finish that condition.
{vb:raw row.statusicon}

Set3sh
05-02-2014, 06:02 AM
Where's the thanks button Lynne? :D
Thank you :)