miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /  
 

Restrict anonymous users from viewing public profile

 
Author Team
8-)
#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'));
$endtime=get_microtime();
$totaltime=sprintf ("%01.3f", ($endtime-$starttime));
if(isset($includeFooter)) include($includeFooter); else echo ParseTpl(makeUp('main_footer'));
exit;
}

Author K.H.
Guest
#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!

K.H.

PS Like the new board setup!

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

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

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,
Reinhold

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

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
Guest
#6 | Posted: 15 Jan 2008 15:26 
Paul,

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,
Reinhold

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /
 Restrict anonymous users from viewing public profile
 Share Topic's Link

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


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑