vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Subforum Icons (https://vborg.vbsupport.ru/showthread.php?t=310670)

Set3sh 04-22-2014 05:37 AM

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


All times are GMT. The time now is 08:14 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.00994 seconds
  • Memory Usage 1,722KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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