Go Back   vb.org Archive > vBulletin 5 Connect Discussion > vB5 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-14-2016, 07:48 AM
Schneeflocke Schneeflocke is offline
 
Join Date: Apr 2016
Location: Germany - Berlin
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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!
Reply With Quote
  #2  
Old 05-14-2016, 01:27 PM
bridge2heyday's Avatar
bridge2heyday bridge2heyday is offline
 
Join Date: Aug 2014
Location: Egypt
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 .
Reply With Quote
2 благодарности(ей) от:
MarkFL, Schneeflocke
  #3  
Old 05-14-2016, 03:48 PM
Schneeflocke Schneeflocke is offline
 
Join Date: Apr 2016
Location: Germany - Berlin
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is not working ....

Step 1:
[IMG][/IMG]
Step 2:
[IMG][/IMG]
Step 3:
[IMG][/IMG]
Step 4:
[IMG][/IMG]
Reply With Quote
  #4  
Old 05-14-2016, 06:47 PM
bridge2heyday's Avatar
bridge2heyday bridge2heyday is offline
 
Join Date: Aug 2014
Location: Egypt
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've tested it and it is working fine


- 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
Reply With Quote
  #5  
Old 05-14-2016, 08:27 PM
Schneeflocke Schneeflocke is offline
 
Join Date: Apr 2016
Location: Germany - Berlin
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

[IMG][/IMG]

Is there a possibility to do that?
Reply With Quote
  #6  
Old 05-14-2016, 08:29 PM
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Jul 2013
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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;
}
Reply With Quote
  #7  
Old 05-15-2016, 09:14 AM
Schneeflocke Schneeflocke is offline
 
Join Date: Apr 2016
Location: Germany - Berlin
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 05-15-2016, 01:30 PM
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Jul 2013
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You have an extra comma. The last one (187 and 126) should not have comma at the end
Reply With Quote
  #9  
Old 05-15-2016, 02:00 PM
Schneeflocke Schneeflocke is offline
 
Join Date: Apr 2016
Location: Germany - Berlin
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I deleted the extra comma, nothing has changed.

Reply With Quote
  #10  
Old 05-15-2016, 02:02 PM
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Jul 2013
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you post a link to your forum?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:45 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04318 seconds
  • Memory Usage 2,278KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (6)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (2)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete