miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /   

Restrict anonymous users from viewing public profile

Author Team
#1 | Posted: 3 Oct 2006 06:02 
This simple code snippet will allow to hide profiles from anonymous viewing:

/* Restrict anonymous users from viewing public profile */
if($action=='userinfo' and $user_id==0){
$title.=$l_accessDenied; $errorMSG='Sorry! You are not allowed to view user profile until you are not registered member.'; $correctErr='';
echo load_header();
echo ParseTpl(makeUp('main_warning'));
$totaltime=sprintf ("%01.3f", ($endtime-$starttime));
if(isset($includeFooter)) include($includeFooter); else echo ParseTpl(makeUp('main_footer'));

Author K.H.
#2 | Posted: 3 Oct 2006 14:05 
Sorry for perhaps the nOOb question, but where to put this snippet? I would like to use it!


PS Like the new board setup!

Author tom322
#3 | Posted: 3 Oct 2006 14:45 
I think in bb_plugins.php

Author Reinhold
#4 | Posted: 15 Jan 2008 06:29 

I putted it into bb_func_usernfo.php right after "if (!defined('NOFOLLOW' ..." and it works fine!

I'd suggest to make this a standard feature.

Thanks and regards,

Author Paul
Lead Developer
#5 | Posted: 15 Jan 2008 07:53 

What you have implemented is wrong... we are always recommending implement custom features at the plugins level, and modifying core file you have destroyed the easy possibility to upgrade this file in the future by simply overwriting it.

As about the "standard" feature - half of the users here think the user's profile, which besides the non-mandatory information lists links to users' topics and posts, is helping search engine to index the forums content nicely and so increase the chances in ranking. Making it for members only (this is of course necessary if you provide some personal information like phone numbers or emails or whatever - but by default miniBB doesn't offer such information at all, and what could be stored can't be even called "serious") you are excluding search engines from better eating your forums.

Author Reinhold
#6 | Posted: 15 Jan 2008 15:26 

thanks for your hint.

I moved the code to bb_plugins.php and it works the same way. No clue how the code is executed!

I agree that with this configuration search engine will have difficulties to capture some data. But if you are not interested in ranking of search engines this doesn't matter.

Nevertheless minibb is a great peace of work and I appreciate your help.

Thanks and regards,

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications / Restrict anonymous users from viewing public profile Top

Your Reply Click this icon to move up to the quoted message

 Short link for this topic:

You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.

Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Proceed with the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB