Thread: Profile Enhancements - Banned users have no profile page
View Single Post
  #36  
Old 07-04-2013, 12:41 PM
D3m0n h311ra153's Avatar
D3m0n h311ra153 D3m0n h311ra153 is offline
 
Join Date: Sep 2012
Location: Newcastle / UK
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed

I have posted this here because I feel wrong posting this in the Vb4 template modifications forum, as I did not originally write the code, nor amended it for vB4.x.

Maybe a Super Moderator could move the necessary posts to where it would be more suited. Thanks in advance

Firstly I'd like to thank djdonx for the original code, yankidank for his vB4.x updated code, and furnival for his addition to allow Admins and Super Mods access to blocked User Profiles, which have all been implemented in the following code, with the addition of my own modification

With my modification, I have separated the code for different usergroups, this was implemented so I can have different Profile messages for 'Banned Members' and 'Users Awaiting Email Confirmation'

I am fairly new to all of this, so I hope I haven't stepped on anyone's toes, or forgot to give credit where it's due.

Please either replace or add the code as follows, or follow djdonx's original text file as it's pretty much the same.

Find in the template MEMBERINFO:-
Code:
<body>
	{vb:raw header}
	{vb:raw navbar}
	{vb:raw memberinfo_customize}

And below it add:-
Code:
<vb:if condition="is_member_of($userinfo, 8) AND ($vbulletin->userinfo['usergroupid'] != '5') AND ($vbulletin->userinfo['usergroupid'] != '6')">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="70%" align="center">
<tr>
	<td class="tcat" align="center" ><span style="color:Red"><b>Banned User</b></span></td>
</tr>
<tr>
	<td class="panelsurround" align="center">
	<div class="panel">
			
		<blockquote>
			<p>&nbsp;</p>
			<p><b>This user has been banned.</b></p>			
			<p class="smallfont">Their profile page is not accessible at this time. Please check back later to see if the ban has been lifted. </p>
			<div>&nbsp;</div>
		</blockquote>
			
	</div>
	</td>
</tr>
</table>
<vb:else />
<vb:if condition="is_member_of($userinfo, 3) AND ($vbulletin->userinfo['usergroupid'] != '5') AND ($vbulletin->userinfo['usergroupid'] != '6')">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="70%" align="center">
<tr>
	<td class="tcat" align="center" ><span style="color:Red"><b>Users Account Not Verified</b></span></td>
</tr>
<tr>
	<td class="panelsurround" align="center">
	<div class="panel">
			
		<blockquote>
			<p>&nbsp;</p>
			<p><b>This user has not yet verified their account.</b></p>			
			<p class="smallfont">Their profile page is not accessible at this time. Please check back later once they have verified their account. </p>
			<div>&nbsp;</div>
		</blockquote>
			
	</div>
	</td>
</tr>
</table>
<vb:else />

Also find in the template MEMBERINFO (Which is almost at the bottom)
Code:
{vb:raw footer}

And add above it add:-
Code:
</vb:if></vb:if>

That's pretty much it, now members who try to access blocked profiles, they will either see a message for Banned Users or a message for 'Users Awaiting Email Confirmation'. Of course you can change all of this to whatever user groups you like, add more, and have different messages for all. See attachments
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01689 seconds
  • Memory Usage 1,782KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete