MyBB Community Forums

Full Version: How to display word 'Private' Instead of - for private forum
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi I have made one of my forum private. But it shows a - sign [dash sign] for post and thread. Is it possible to replace the - sign with the word 'private'
so user can see the word 'private' for post and thread of the private forum instead of the sign '-' [dash sign]

Some one please help. i really need help
(2014-05-12, 09:41 AM)Reallifeplusdotorg Wrote: [ -> ]Hi I have made one of my forum private. But it shows a - sign [dash sign] for post and thread. Is it possible to replace the - sign with the word 'private'
so user can see the word 'private' for post and thread of the private forum instead of the sign '-'

Yes, it is possible. Open up "inc/functions_forumlist.php" into a text editor like Notepad, Notetab, or Notepad++.
Search for:
$posts = "-";
Replace with:
$posts = "Private";
If you want any formatting, add the tags around Private. Such as: <em>Private</em> to create Private

Do this for:
$threads = "-";
and if you want to change the "last post" part as well replace this:
$lastpost = "<div style=\"text-align: center;\">-</div>";
With:
$lastpost = "<div style=\"text-align: center;\">Private</div>";
And format as needed. Ensure you close HTML tags properly.

However, this also means that forums that are used as redirect links and do not contain posts/threads will also use "Private" according to the comments in the file.
Thanks mate you made my day I will check it and let you know. Thanks again
Thanks a lot it works. Just one thing is it possible to show thelatest post in the last post section of private forum? Thank you. Hope you help me
If the user is logged in and they have permission to view the forum and the forum has a password (Forum Password isn't blank) and the user has entered the password for it, then it will show them the last post made, the post count and the thread count during their session.

However, if the forum is supposed to be hidden (Forum is Active? setting is marked), it wouldn't matter if a user was logged in or not. If they don't know the link to the forum, they can't view the forum. The forum will not show up on the index page.