MyBB Community Forums
Hide a forum's content from Guests - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html)
+----- Forum: MyBB 1.6 (https://community.mybb.com/forum-138.html)
+------ Forum: 1.6 General Support (https://community.mybb.com/forum-127.html)
+------ Thread: Hide a forum's content from Guests (/thread-170597.html)

Pages: 1 2


Hide a forum's content from Guests - ChilledStorm - 05-12-2015

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


RE: Hide a forum's content from Guests - gamemaster - 05-12-2015

(05-12-2015, 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-cant-view-threads-2..


RE: Hide a forum's content from Guests - Harshit - 05-15-2015

May be you need this one

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


RE: Hide a forum's content from Guests - Sazze - 05-15-2015

Use this code inside showthread.php

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



RE: Hide a forum's content from Guests - ChilledStorm - 05-16-2015

Nooooooo

Don't think you understood.

When a GUEST clicks on a forum link

[attachment=34278]


They go to this page

[attachment=34279]


RE: Hide a forum's content from Guests - zany - 05-16-2015

Umm.. But why to hide content from guests?


RE: Hide a forum's content from Guests - Sazze - 05-16-2015

(05-16-2015, 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();
} 



RE: Hide a forum's content from Guests - ChilledStorm - 05-16-2015

Where in forum display.php - and do i need to change any of that code?


RE: Hide a forum's content from Guests - Jack.D - 05-16-2015

  • 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.


RE: Hide a forum's content from Guests - ChilledStorm - 05-18-2015

NO, that makes it look like there are no threads.

Does anyone actually know?