View Full Version : Disable post count per forum
Schneeflocke
05-14-2016, 07:48 AM
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
<td class="posts-count"><vb:if condition="!$isSubcategory">{vb:number {vb:raw forum.posts}}</vb:if></td>
replace with
<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
<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:
http://fs5.directupload.net/images/160514/temp/2fpnmdzv.jpg (http://www.directupload.net/file/d/4355/2fpnmdzv_jpg.htm)
Step 2:
http://fs5.directupload.net/images/160514/temp/rqzow28i.jpg (http://www.directupload.net/file/d/4355/rqzow28i_jpg.htm)
Step 3:
http://fs5.directupload.net/images/160514/temp/4hw5rtqz.jpg (http://www.directupload.net/file/d/4355/4hw5rtqz_jpg.htm)
Step 4:
http://fs5.directupload.net/images/160514/temp/zrmz8je2.jpg (http://www.directupload.net/file/d/4355/zrmz8je2_jpg.htm)
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.
http://fs5.directupload.net/images/160515/temp/qewsvqnf.jpg (http://www.directupload.net/file/d/4356/qewsvqnf_jpg.htm)
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:
#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:
#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:
#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?
Schneeflocke
05-15-2016, 02:10 PM
sure:
http://wortkompass.de/
noypiscripter
05-15-2016, 02:28 PM
I see some forums without post count. See attached screenshot.
What's not working?
Schneeflocke
05-15-2016, 03:27 PM
:eek:
Sorry!! Many, many thanks for your continous effort and support. @ noypiscripter!!
Is there a possibility to disable the "number of post" counter of the users for selected forums?
noypiscripter
05-16-2016, 04:54 AM
Yes. For example, the post counts in the forum channels Ank?ndigungen (forum id 136) and Vorstellung (forum id 186) can be hidden like this:
.b-module[data-node-id="136"] .posts-count,
.b-module[data-node-id="186"] .posts-count {
display: none;
}
Schneeflocke
05-16-2016, 08:16 AM
I tried it.
.b-module[data-node-id="136"] .posts-count,
.b-module[data-node-id="186"] .posts-count,
.b-module[data-node-id="119"] .posts-count,
.b-module[data-node-id="120"] .posts-count,
.b-module[data-node-id="121"] .posts-count,
.b-module[data-node-id="124"] .posts-count,
.b-module[data-node-id="125"] .posts-count,
.b-module[data-node-id="138"] .posts-count,
.b-module[data-node-id="187"] .posts-count{
display: none;
}
I insert the code in the css editor for the correct style.
But:
[IMG]http://fs5.directupload.net/images/160516/temp/mrdmfx85.jpg (http://www.directupload.net/file/d/4357/mrdmfx85_jpg.htm)
It counts.
Mistake?
noypiscripter
05-16-2016, 01:52 PM
Oh I thought you wanted to hide the post count in the topic list page like this one http://wortkompass.de/forum/aktuelles/neuigkeiten-und-ank%C3%BCndigungen
Schneeflocke
05-16-2016, 02:37 PM
Yes, thats okay.
I also like to hide these postcount:
https://vborg.vbsupport.ru/external/2016/05/11.jpg (http://www.directupload.net/file/d/4357/v7qwyupf_jpg.htm)
Is there a possibility to do that?
noypiscripter
05-16-2016, 05:16 PM
Yes. You add this:
// hide post counts in all the threads for Ank?ndigungen forum
.page249 .b-userinfo__additional-info-block .b-userinfo_aadditional-info:nth-child(2) {
display: none;
}
Each page in the forum has a unique page id in the <body> class. In the case of Ank?ndigungen forum page, it has page249 in the body class. You can find it by inspecting the page (right click > Inspect) and looking for the <body> tag.
Btw, my initial suggestion of hiding the post count in the forum list is not good. Here's the better one. Replace the original CSS with this one.
#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 {
position: relative;
}
#forum136 .posts-count:before,
#forum186 .posts-count:before,
#forum119 .posts-count:before,
#forum120 .posts-count:before,
#forum121 .posts-count:before,
#forum124 .posts-count:before,
#forum125 .posts-count:before,
#forum138 .posts-count:before,
#forum187 .posts-count:before {
content: '';
position: absolute;
left: 0;
top: 0;
display: block;
width: 100%;
height: 100%;
z-index: 1;
background: {vb:stylevar content_background};
}
Schneeflocke
05-17-2016, 06:16 AM
Hey,
I inserd your code in the additional template for the correct style.
// hide post counts in all the threads for Ank?ndigungen forum
.page249 .b-userinfo_additional-info-block .b-userinfo_additional-info:nth-child(2) {
display: none;
}
But something is wrong. Because nothing seemed to have changed (post in the thread Ank?ndigungen).
https://vborg.vbsupport.ru/external/2016/05/10.jpg (http://www.directupload.net/file/d/4358/3jtd34ww_jpg.htm)
It counts - post count:43 and the next 44.
But my intention is, that these counter counts only entries of the "important" channels. The counter should remain unchanged when somebody posts an entry in the channels which are set to be not counted.
noypiscripter
05-17-2016, 05:36 PM
Remove this comment in the CSS:
// hide post counts in all the threads for Ank?ndigungen forum
or change it to:
/* hide post counts in all the threads for Ank?ndigungen forum */
Schneeflocke
05-17-2016, 06:26 PM
Hey noypiscripter,
first of all I appreciate all your help and support, but I guess my request is not solvable?
Ok, I think I have tried now all the options provided, but still the counter is increasing when posting in those channels. Only to hide it, is not what I was looking for. But maybe my request is not possible at all? Can one deactivate this counter for given channels or only hide it?
Best Regards.
noypiscripter
05-17-2016, 11:18 PM
There's a typo in the CSS selector. Do a copy/paste of this one:
.page249 .b-userinfo__additional-info-block .b-userinfo__additional-info:nth-child(2) {
display: none;
}
Schneeflocke
05-18-2016, 06:03 AM
Guten Morgen noypiscripter,
thanks!
Now, the counter is hidden.
But, it still counts the number of entry the user makes. Im looking for a solution with completely deaktivates counting for seletctet channels.
Is there a possibility to do that????
cellarius
05-18-2016, 12:18 PM
I can't help with the issue, since I would not touch vB5 with a stick, but: There seems to be a huge misunderstanding here. She does not want to hide postcounters. What she's looking for is a possibility to not have posts in certain channels increase the total posts counter of a user.
- User post count: 123
- User posts in nonsense channel xy
- User post count: 123
- User posts in seriously important channel yz
- User post count: 124
This is nothing that can be achieved with css or template edits. If it's not in the core (as it is in vB4), then this will require some sort of plugin (is that even possible in vB5 by now?) or core file edit.
Schneeflocke
05-18-2016, 12:44 PM
Yes!
That's what I mean.
(My new post: https://vborg.vbsupport.ru/showthread.php?t=322664)
noypiscripter
05-18-2016, 10:52 PM
I'm aware the OP wanted to deactivate the post counts in some forums/threads but that's not possible without editing core php files. That's why I suggested an easier and more maintainable workaround.
If the OP explicitly mentioned right away that they don't want to increase the post count when users post to selected forums, then I wouldn't have suggested the CSS solution.
cellarius
05-19-2016, 04:30 AM
You know, if you don't know the right terminology plus english obviously not being your mother language its often not that simple to find the right words. I'm pretty sure she thougt that she did mention exactly that. Perhaps I understood her better since she's obviously German, which sometimes shows in one's english (as I'm sure it does in mine).
Anyway, what you offered is not a workaround - it's a perfect solution, just not for the problem at hand. For that, its not even a workaround, since it does not do what was (really) requested. But as I said: not your fault, not anyone's fault at all - just a misunderstanding. :)
Schneeflocke
05-19-2016, 08:20 AM
Hey,
Cellarius is completely right, first I am a non-native speaker (my english is really bad) and second not a programming expert (3 weeks of vbulletin usage). So, I definetly will miss the correct terms from time to time or every time.
So now, that this misunderstanding seems to be resolved, I still have the problem which is not solved yet.
I really appreciate the help offered by noypiscripter, but as Cellarius pointed out it was not what I am looking for. The hiding of the counter is like a first step to my problem, but still not fully deactivated as I would like.
Best Reagrds.
robertw795
06-06-2016, 10:09 AM
Disabeling this feature without editing the core files is indeed not possible, but you might be able to achieve this using a (not so pretty) workaround. You can implement a front-end hook in the createcontent.php that triggers as soon as anyone posts a post and pass along the post data as a parameter. Using the ancestorId's array in the post data you can determine from what channel the posts originated. Using an if conditional you can then catch if the posts was posted in an unrelevant subforum, and if so subtract 1 from the users post count, this way when the post will be added to the postcount, the postcount will remain as it was before.
EDIT: The postcount is found in the user table in the column posts
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.