Back to vBulletin 3.6 Template Modifications

Users Can Hide Posts From Unregistered Browsers
Mod Version: 1.00, by TygerTyger

This modification is in the archives.
vB Version: 3.6.0 Beta 3 Rating: (0 vote - 0 average) Installs: 8
Released: 13 Jul 2006 Last Update: 13 Jul 2006 Downloads: 45
Not Supported Template Edits  

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]>
REPLACE WITH:
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]>
FIND: (Should be equally difficult, it's the last lines)
Code:
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;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 -->
REPLACE WITH:
Code:
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;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.

Download

This modification is archived, downloads are still allowed.

File Type: %1$s Users Can Hide Posts From Unregistered Browsers.txt (3.4 KB, 80 downloads)

Similar Mods

Hide Posts To Unregistered Users - Posting Option vBulletin 3.5 Add-ons

vblts.ru supports vBulletin®, 2022-2024