miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | 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 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
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB