vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=263)
-   -   Disable post count per forum (https://vborg.vbsupport.ru/showthread.php?t=322634)

Schneeflocke 05-14-2016 07:48 AM

Disable post count per forum
 
Hello,

I'm trying to disable the post count in some forums. Is there a possibility to do that? I know it is not a feature in vB5. But, is there an add-on or a mod?

Thanks!

bridge2heyday 05-14-2016 01:27 PM

in Template display_Forums_item
find
Code:

<td class="posts-count"><vb:if condition="!$isSubcategory">{vb:number {vb:raw forum.posts}}</vb:if></td>
replace with
Code:

<td class="posts-count"><vb:if condition="!$isSubcategory"><vb:if condition="!in_array($forum['nodeid'],array(1,2,3))">{vb:number {vb:raw forum.posts}}</vb:if></vb:if></td>
where (1,2,3) are the node id's of the forums you want to hide post count

you can do the same thing with topics count in the same template
Code:

<td class="topics-count"><vb:if condition="!$isSubcategory">{vb:number {vb:raw forum.topics}}</vb:if></td>
you can do the same thing in template display_Topics_item if you want to disable post counts in topic list .

Schneeflocke 05-14-2016 03:48 PM

is not working .... :confused:

Step 1:
[IMG]http://fs5.directupload.net/images/1...p/2fpnmdzv.jpg[/IMG]
Step 2:
[IMG]http://fs5.directupload.net/images/1...p/rqzow28i.jpg[/IMG]
Step 3:
[IMG]http://fs5.directupload.net/images/1...p/4hw5rtqz.jpg[/IMG]
Step 4:
[IMG]http://fs5.directupload.net/images/1...p/zrmz8je2.jpg[/IMG]

bridge2heyday 05-14-2016 06:47 PM

I've tested it and it is working fine
https://vborg.vbsupport.ru/external/2016/05/12.jpg

- Make sure you put the correct node id's.
- Make sure you are viewing the style you have edited ..not another one .
- You may need to edit display_Forums_list if they are displayed as subforums, better to Add Template Name in HTML Comments and see what template you need to edit .

Regards

Schneeflocke 05-14-2016 08:27 PM

I like to disable post count per channel!!!! Sorry, i was wrong.

[IMG]http://fs5.directupload.net/images/1...p/qewsvqnf.jpg[/IMG]

Is there a possibility to do that?

noypiscripter 05-14-2016 08:29 PM

For maintenance reasons, it is better to just hide the post count via CSS rather than editing existing templates which will require you to do (or resolve merge conflicts for) every time you upgrade. You can use the forum id which is present in the HTML as the selector (in the format of #forumnodeid) to distinguish which forum's count to hide. For example:

Code:

#forum123 .posts-count,
#forum456 .posts-count,
#forum789 .posts-count {
    visibility: hidden;
}


Schneeflocke 05-15-2016 09:14 AM

Okay, thanks for your help.

But, nothing works.

I have CategorieIDs -100, 122, 126
and
ChannelIDs - 136, 186, 119, etc.

I tried the code:
Code:

#forum136 .posts-count,
#forum186 .posts-count,
#forum119 .posts-count,
#forum120 .posts-count,
#forum121 .posts-count,
#forum124 .posts-count,
#forum125 .posts-count,
#forum138 .posts-count,
#forum187 .posts-count,{
    visibility: hidden;
}

and:

Code:

#forum100 .posts-count,
#forum122 .posts-count,
#forum126 .posts-count,{
    visibility: hidden;
}

I insert it in the CSS-Editor (css_additional template).
But the post continued to be counted.

It is very important to hide the count. So, maybe I need a manual for ... idiots

noypiscripter 05-15-2016 01:30 PM

You have an extra comma. The last one (187 and 126) should not have comma at the end

Schneeflocke 05-15-2016 02:00 PM

I deleted the extra comma, nothing has changed.

:confused:

noypiscripter 05-15-2016 02:02 PM

Can you post a link to your forum?


All times are GMT. The time now is 03:56 PM.

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.01067 seconds
  • Memory Usage 1,738KB
  • 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
  • (6)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete