MyBB Community Forums

Full Version: Hide a forum's content from Guests
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi everyone.

I need some code to hide threads from guests.

That is:

A guest can see the forum titles, e.g. 'Forum A', 'Forum B' - but when they click on the link, to therefore go to the forum and see the threads, they are redirected to that 'You don't have permissions to view' page.

SO - guests SEE the forums but when clicking on a forum get redirected - BEFORE they see threads.

I already have code so that a guest, if clicking on a thread, gets redirected - but can't work out how to do the same for a forum (the step before).

Thanks all

Phil
(2015-05-12, 02:56 PM)ChilledStorm Wrote: [ -> ]Hi everyone.

I need some code to hide threads from guests.

That is:

A guest can see the forum titles, e.g. 'Forum A', 'Forum B' - but when they click on the link, to therefore go to the forum and see the threads, they are redirected to that 'You don't have permissions to view' page.

SO - guests SEE the forums but when clicking on a forum get redirected - BEFORE they see threads.

I already have code so that a guest, if clicking on a thread, gets redirected - but can't work out how to do the same for a forum (the step before).

Thanks all

Phil

Try this one.. http://mods.mybb.com/view/member-groups-...-threads-2..
May be you need this one

Hide content from guests
http://community.mybb.com/mods.php?action=view&pid=313
Use this code inside showthread.php

if(!$mybb->user['uid'])
{
 error_no_permission();
}
Nooooooo

Don't think you understood.

When a GUEST clicks on a forum link

[attachment=34278]


They go to this page

[attachment=34279]
Umm.. But why to hide content from guests?
(2015-05-16, 02:21 PM)zany Wrote: [ -> ]Umm.. But why to hide content from guests?

Because they can leech things afterwards? meh.

Also about the problem, do it in the forumdisplay.php (and showthread.php since they can easily bypass it).

if(!$mybb->user['uid'])
{
 error_no_permission();
} 
Where in forum display.php - and do i need to change any of that code?
  • Go to the ACP
  • Click the Forums and Posts Tab
  • Click on the Forum You want to edit and it should bring up a picture like this.
[Image: jVosJK6.png]
  • Click Set Custom Permissions
  • Uncheck Can View Threads within forum! 
That should do it.
NO, that makes it look like there are no threads.

Does anyone actually know?
Pages: 1 2