View Full Version : Hide Post Count in Postbit
bitwise2000
07-29-2008, 09:50 PM
Some of my users hate having their post count displayed, some love it.
I want to allow my users to hide their post count from others based on a checkbox in their profile. In other words, if I check the hide "post count box" in my profile, I don't want it displayed in postbit, in my public profile, or in member search results.
I'm fine on creating a custom field in the user profile field manager, but I need a little help on how and where to structure the logic to hide the count.
Thanks for any help you provide.
Opserty
07-29-2008, 10:02 PM
<a href="http://www.vbulletin.com/forum/showthread.php?t=108785" target="_blank">http://www.vbulletin.com/forum/showthread.php?t=108785</a>
Just instead of the stuff between the <if>'s, you have the code that displays the post count.
bitwise2000
07-29-2008, 10:10 PM
I'm not sure that has quite what I'm looking for.
In a given thread, there will be a few users with that field set in their profile. Don't I need to selectively look up that field in their profile and conditionally decide whether or not to display their post count in postbit?
Following the logic in that link, I would be turning off display of all user post counts based on the field in my profile, which is not what I want to do. I'm trying to selectively let users hide their own post counts from being displayed to others.
Opserty
07-29-2008, 10:13 PM
Oh wait. Sorry, its late :D.
<if condition="$bbuserinfo['fieldX']">
...post count code here...
</if>
X being the id number of the field. (I'd recommend a single select radio box or yes/no option, can't remember exactly the options. Checkboxes are more complicated so avoid them).
bitwise2000
07-29-2008, 10:20 PM
Thanks a lot for helping me.
Yhe $bbuserinfo is for the user sitting behind the keyboard. In other words, it's my own profile. So any conditionals I make will be for what I see on my screen.
If I want to hide my post count from other users, when they render a thread I don't want them to see my post count. So vB will need to look at the profile fields for each poster in a thread.
I apologize for not explaining this very well. I coded this for the forum I had prior to vB and I'm just trying to replicate it here but I am still learning.
Opserty
07-29-2008, 10:23 PM
Oh wait. Follow that link I have in my initial post. That is what you want.
(Basically it uses $post instead of $bbuserinfo).
bitwise2000
07-29-2008, 10:31 PM
I don't think $post contains the extra profile fields for the user. There is no way to conditionally decide to display the posters post count.
I don't want to waste your time. I'm just not explaining this correctly.
Many Thanks
Edit: Got it. THANKS!
Opserty
07-30-2008, 06:37 AM
What was the working code?
TimberFloorAu
01-22-2009, 05:37 AM
I would like to bump this thread, as I would have liked to see this members actual working code.
Example:
We have 2 or more members who dont want their post count displaying in the postbit, in fact anywhere. However we still want their post count to increment.
How do we set an "individual" members postcount to be hidden.
On a One on One basis or as a profile field selection: ie.
Display post count ( radio button ) on for yes off for no
Or by just hacking the code.
If anyone can help, sincerely appreciate it.
Ste
TimberFloorAu
01-27-2009, 08:47 PM
Bumpetty Bump
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.