The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Users Can Hide Posts From Unregistered Browsers Details »» | |||||||||||||||||||||||||||
Users Can Hide Posts From Unregistered Browsers
Developer Last Online: Jul 2012
Requested by a forum member because of someone who had been banned continuing to nose around the forum as a Guest and I thought it was a sufficiently neat idea to be worth making known to the masses. All users have to do is choose to hide their posts to unregistered browsers (and search engines) in their UserCP. Sort of like a custom Tachy for privacy. Screenshot at the bottom!
INSTRUCTIONS OPEN: AdminCP > User Profile Fields > Add New User Profile Field Add a new Single-Selection Menu then fill in the following settings: Title: Hide my posts from Unregistered Browsers and Search Engines Options: (Make sure they are in this order!) No Yes Set Default: Yes, but no First Blank option Field Required: No but display at registration Field Editable by User: Yes Private Field, Field Searchable on Members List, Show on Members List: All No. (Unfortunately you must make this a non-private field or the change won't register with Guests) Display Page: Options: Log In/Privacy Save the page and make a note of the field number assigned to your Custom Field, which is shown on the User Field Manager page next to the display number. If this is your first Custom Field then your field number will be 6. In the following template edit, change the X in fieldX to the number of your Custom Field. OPEN: UserCP > Styles & Templates > Edit Templates > Postbit(_legacy) FIND: (shouldn't be tricky, it's the first lines ) Code:
<table class="tborder" id="post$post[postid]" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr> <td class="thead" $post[scrolltothis]> Code:
<table class="tborder" id="post$post[postid]" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <if condition="$post['fieldX'] == Yes AND is_member_of($bbuserinfo, 1)"> <tr> <td> This user has chosen to hide their posts from Guest browsers. </td> </tr> </table> <else /> <tr> <td class="thead" $post[scrolltothis]> Code:
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&userlist=buddy&u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr> </if> </table> </div> <!-- / post $post[postid] popup menu --> Code:
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&userlist=buddy&u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr> </if></if> </table> </div> <!-- / post $post[postid] popup menu --> And you're done! You can of course change the post-subtitute message to anything you like but you can't hide a post entirely because it breaks the formatting of the page so the table row must remain. Demo: Feedback, bugs, complaints to the usual address on the back of a postcard. You're going to hell if you use this hack and don't click install. Show Your Support
|
Comments |
#2
|
|||
|
|||
Oh, nuts to this. Why did the similar thread not appear when I searched for it? Freaking vBulletin search engine...
Oh well, I guess now you have choice of doing it with a plugin using the other guy's method or a purely a template edit using mine. His deals with the threadbit, mine does not. Mine doesn't trouble the database either, of course. |
#3
|
|||
|
|||
TygerTyger...
You have made here a fairly reasonable attempt at a mod, but I feel maybe you could make it far better. With a little thought behind why this would be used, it could have been made slightly differently. Think about it this way instead - I think this should be a native feature:- Ability for users to hide their 'THREADS' from non members (not posts, as it would make convos non-sensical).... This would however happen on a PER THREAD basis, not a global switch in usercp (bad idea) The ability to hide threads or not should be controlled by the permissions system and an admin should be able to specify which groups can and cant do this. The above, in my opinion would be the best implementation of any mod along these lines and would result in a very very popular and usable (even practical) mod. I'm sure someone will do this very soon.... wonder who'll be first? |
#4
|
|||
|
|||
Well if you check the other guy's method I linked to in the post above yours, his isn't too far off doing that.
The reason I left this one here (aside from the fact the search didn't pick it up until after I'd posted it :rolleyes) is because it's a quick-n-easy template-only edit and would still be useful for someone who wants to keep their posts out of the search engines which apparently some do. I'm inclined to think that a global thread-switch would be what most people are after though, I think that a per-thread mod would have a more limited use. If not because what I personally would do is a make a forum section for "Secrets" or whyever people would want to hide their thread and just hide the section from Guests. |
#5
|
|||
|
|||
I would rather see something like used here on vb.org were code is only visible for licensed user ..
|
#6
|
|||
|
|||
To be honest I'm astonished they don't already do that, I assumed they did.
Edit: They do. |
#7
|
||||
|
||||
Thanks for the hack! I'll install it right away...
|
#8
|
|||
|
|||
I just tried this on 3.6.1 and cannot get it to work. Is there any way to make this work with 3.6.1?
|
#9
|
|||
|
|||
so how exactly would I modify this so that a user hides their posts from all usergroups, not just guests?
|
#10
|
|||
|
|||
someone told me to remove the bbuser condition at the end, and just use
<if condition="$post['fieldxx'] == Yes"> instead, and it works fine!!! Thank you so much Tyger, this is a great option for my users when they need to hide their posts from general view for whatever reason, and what the freedom to hide or unhide their posts whenever they need to. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|