MyBB Community Forums

Full Version: Label a forum Private?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Everyone.

Loving MyBb, have one simple question. How do I label a private forum private? So users can see the forum exists, but they cant read posts in it. I know vBulletin has this.

Below is an image example.
(2009-01-04, 04:14 AM)Netbuddy Wrote: [ -> ]I know vBulletin has this.

[attachment=12258]

Would this suffice ?
That will certainly block the viewing of the forum. My question is really how to "label it" private. Instead of showing the last post details such as thread title, date and username, or never. I need the word "Private" or "Registered Users Only". Im sure its more of a template hack than anything.
(2009-01-04, 07:07 AM)Netbuddy Wrote: [ -> ]Im sure its more of a template hack than anything.
Looks like it Sad
Anything here remotely similar to what you want?? http://www.learnmybb.com/forums/showthre...190#pid190
Just coming back to this problem now. That tutorial is kinda of what im after. The only problem is those changes make changes to all forums, rather than private ones, but its almost there.

Basically I need something that

a) checks to see if the forum is set to private at all, and for what usergroups
b) what level the privacy kicks in - so it needs to check if the user is a guest, registered, moderator, supermoderator, admin etc...For example, label it private for registered users for example, but normal for moderators or higher
c) change the "last post" column if the conditions are met.

So I think where talking some PHP here, condition statements or something...its over my head lol, but I know ive seen done a billion times on various sites.
Why don't you just put it in the forum name or description?
I could definately do that, but the thing is. It still shows the last post title, username etc in the last post column, and I dont want users without access to be able to see that info.

Labrocca over at MyBBCentral has got me part the way there.

[Image: columndisplay.jpg]

But what I really need is this for example... Hopefully its possible.

[Image: columndisplay2.jpg]

Unfortunately a couple minutes after his reply the site went down, and still down for me. But ya that second image is what im after ideally.

This is the change I made in functions_forumlist.php

This is the original.

$hideinfo = false;
			if($forum['password'] != '' && $mybb->cookies['forumpass'][$forum['fid']] != md5($mybb->user['uid'].$forum['password']))
			{
				$hideinfo = true;
			}

This is the changed code.

$hideinfo = false;
            if($forum['password'] != '' && $mybb->cookies['forumpass'][$forum['fid']] != md5($mybb->user['uid'].$forum['password']) || $permissions['canviewthreads'] !=1)
            {
                $hideinfo = true;
            }

Almost there...
Moved to requests for now then, as it's a code modification.