miniBB ® 

miniBB

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

Latest Discussions Not Viewable unless Logged In

 
Author Guest
~
#1 | Posted: 29 Aug 2009 10:38 
I was wondering if there was a way to hide the Latest Discussions (Recent Topics) block until a user has logged in? Could you somehow use the
$lastOut=array(); variable? Instead of the block just have it say "Login to see Latest Discussions". Thanks

Author Paul
Lead Developer 
#2 | Posted: 31 Aug 2009 02:15 
Latest discussions are just kind of digest from all the forum, so if user is not logged in, he still is able to browse forum-by-forum to see the new stuff? Honestly I don't understand such approach. And it would be useful only if you are set up $statsPageModern setting to FALSE which is kind of old-fashioned layout...

Anyway, the simplest solution in this case is only to modify index.php. Where it says

require($pathToFiles.'bb_func_ldisc.php');
$listTopics=$list_topics;
you need to put a condition

if($user_id!=0){
require($pathToFiles.'bb_func_ldisc.php');
$listTopics=$list_topics;
}
else{
$listTopics='HTML code for guests';
}

Author Guest
~
#3 | Posted: 31 Aug 2009 09:55 
That worked great, thanks.

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /
 Latest Discussions Not Viewable unless Logged In
 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
Proceed with the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑