View Full Version : Hide from Postbit Plugin?
iZefi10
08-25-2013, 01:37 PM
Hello again. I was browsing a friendly forum earlier, and I noticed a Technical Announcement, stating they'd made some changes to the "profile options." Users now had the ability to "hide" certain things from their Postbit. I think this is really amazing, and I've been browsing the Plugins section of vbulletin.org for quite a while, and I haven't found anything. Here is a print screen of what I am talking about.
https://vborg.vbsupport.ru/external/2013/08/18.png
Any help would be much appreciated!
Joe
Max Taxable
08-25-2013, 01:44 PM
Reading the source code of the "friendly" forum might yield a clue, since alot of the developers brand their work in the code.
iZefi10
08-25-2013, 01:47 PM
Reading the source code of the "friendly" forum might yield a clue, since alot of the developers brand their work in the code.
Nothing is listed.
Max Taxable
08-25-2013, 02:35 PM
Nothing is listed.I might have some better luck, if I had a link.
I don't know if it's an existing mod or not, but it's not that hard to do. You just need to create a new User Profile Field of type "Multiple Selection Checkbox", and list the items you want to be able to hide, then edit your postbit or postbit_legacy and put if tags around the various items. The only thing that's a little tricky is the condition to check. For example, you might list the items as
Username
Userbars
Join Date
Location
(etc)
Then in postbit, you'd find the code for each of those and add:
<if condition="!($post[fieldX] & 1)">
// existing code for username
</if>
...
<if condition="!($post[fieldX] & 2)">
// existing code for userbars
</if>
...
<if condition="!($post[fieldX] & 4)">
// existing code for join date
</if>
You'd replace the X in fieldX with the actual field number of the user profile field you create. Also, the values you check double for each item (1, 2, 4, 8, 16, 32, etc).
The only thing is that by default the items will list vertically instead of horizontally like the one you posted. I'm not sure, you may be able to change that using CSS.
ozzy47
08-25-2013, 03:46 PM
This may work, https://vborg.vbsupport.ru/showthread.php?t=215277
This may work, https://vborg.vbsupport.ru/showthread.php?t=215277
That's pretty much what I was trying to say, but it's a better step by step guide. Also I'm glad you posted that because I had used $bbuserinfo instead of $post.
iZefi10
08-27-2013, 03:19 PM
Thank you for the help, each of you.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.