2012-10-11, 07:45 AM
2012-10-11, 08:03 AM
It shows error " Guests Cant view threads"
I want to show login page
I want to show login page
2012-10-12, 03:20 AM
maybe possible via a plugin. hackforums.net has it. better to ask them
2012-10-12, 03:34 AM
I've got this on my forum but I done it through a hard written change in showthread.php, it's only a few lines.
Find
And change it to be like
If you want to include awaiting activation people into the mix then change
This is all assuming that your usergroup ID's are defualt where 1 = guest and 5 = awaiting.
If you want to make it so they can read some forums/category's but not others let me know.
Find
// Does the user have permission to view this thread?
if($forumpermissions['canview'] != 1 || $forumpermissions['canviewthreads'] != 1)
{
error_no_permission();
}
And change it to be like
// Does the user have permission to view this thread?
if($forumpermissions['canview'] != 1 || $forumpermissions['canviewthreads'] != 1)
{
error_no_permission();
}
/****** Guests can see threads but not read any*****/
if ($mybb->user['usergroup'] == 1)
{
error_no_permission();
}
/**** END Guests ****/
If you want to include awaiting activation people into the mix then change
if ($mybb->user['usergroup'] == 1)
toif ($mybb->user['usergroup'] == 1 || $mybb->user['usergroup'] == 5)
This is all assuming that your usergroup ID's are defualt where 1 = guest and 5 = awaiting.
If you want to make it so they can read some forums/category's but not others let me know.
2012-10-12, 09:51 AM
Thanks... i want to know more. Is your code shows login page if user is guest??
And it blocks all forums or not?
I want to block all forums..
And it blocks all forums or not?
I want to block all forums..
2012-10-12, 02:58 PM
(2012-10-12, 09:51 AM)pro Wrote: [ -> ]Thanks... i want to know more. Is your code shows login page if user is guest??
And it blocks all forums or not?
I want to block all forums..
It blocks all forums. They can enter into them and see there are threads there and read the titles but if they click on any it goes to the login page that says "No permission etc...; please log in"
Exactly like HF if you're familiar with their setup.
2012-10-13, 02:21 AM
Thank you so much..
2012-10-13, 02:07 PM
AdminCP -> Users & Groups -> Groups -> Guests -> Forums and Posts -> Viewing Options -> Can view threads?
2013-04-12, 12:07 PM
Hi, how can I do this: user clicks on forum name and he/she has login page (and no "forum empty")?
Thank you in advance
Thank you in advance
2013-07-21, 10:59 AM
(2012-10-12, 03:34 AM)Client Wrote: [ -> ]I've got this on my forum but I done it through a hard written change in showthread.php, it's only a few lines.
Find
// Does the user have permission to view this thread? if($forumpermissions['canview'] != 1 || $forumpermissions['canviewthreads'] != 1) { error_no_permission(); }
And change it to be like
// Does the user have permission to view this thread? if($forumpermissions['canview'] != 1 || $forumpermissions['canviewthreads'] != 1) { error_no_permission(); } /****** Guests can see threads but not read any*****/ if ($mybb->user['usergroup'] == 1) { error_no_permission(); } /**** END Guests ****/
If you want to include awaiting activation people into the mix then change
toif ($mybb->user['usergroup'] == 1)
if ($mybb->user['usergroup'] == 1 || $mybb->user['usergroup'] == 5)
This is all assuming that your usergroup ID's are defualt where 1 = guest and 5 = awaiting.
If you want to make it so they can read some forums/category's but not others let me know.
Well yes it works perfectly.
But is there a way to do it for specific Sections only?
I need a small help.
Thanks