Language: 
To browser these website, it's necessary to store cookies on your computer.
The cookies contain no personal information, they are required for program control.
  the storage of cookies while browsing this website, on Login and Register.
Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

Community



Donate

Donate for PortaMx !
Your donation is safe and helps support the issues and causes you care most about.

Stats

  • *Total Members: 4319
  • *Latest: thygrim

  • *Total Posts: 15779
  • *Total Topics: 2382
  • *Online Today: 2
  • *Most Online: 157
(27.08.09, 03:54:53)
  • *Users: 0
  • *Guests: 3
  • *Total: 3

Author Topic: Sub Forums  (Read 2103 times)

0 Members and 0 Guests are viewing this topic.

Offline Dukie

  • Newbie
  • *
  • Posts: 24
  • Gender: Male
Sub Forums
« on: 04.05.12, 03:46:34 »
We have Many Admins and I would like to know if the sub forums can be set up so only certain admin members can access it?

The admins are all in one group, so I would like to have access per member basis.

Is this posible?

Thanks

Offline feline

  • CO PortaMx corp.
  • Administrator
  • *
  • Posts: 5586
  • Gender: Female
Re: Sub Forums
« Reply #1 on: 04.05.12, 12:03:36 »
The Membergroup for this members must have the permission Administrate forum and database.
If you don't can accept that, you must chnage the Subforums code itself ...
Many are stubborn in relation to the path, a few in relation to the target.

Offline Dukie

  • Newbie
  • *
  • Posts: 24
  • Gender: Male
Re: Sub Forums
« Reply #2 on: 05.05.12, 04:16:43 »
The Membergroup for this members must have the permission Administrate forum and database.
If you don't can accept that, you must chnage the Subforums code itself ...

Hi Feline..

Understood.

Could you point me in the right direction to make such a change?


Offline feline

  • CO PortaMx corp.
  • Administrator
  • *
  • Posts: 5586
  • Gender: Female
Re: Sub Forums
« Reply #3 on: 07.05.12, 15:00:27 »
Well .. that is not simple.
At first you have to add (manually) a new permission (like admin_subforums) to the SMF permission structure.
Then you must change the login permissions in the file Subforums.php on two points:
here:
Code: [Select]
// main forum only for admins ?
elseif(empty($maintenance) && empty($modSettings['subforums'][$_SERVER['SERVER_NAME']]) && !empty($modSettings['subforums_adminonly']) && !allowedTo('admin_forum'))
Subforums_Login(true);

and here:
Code: [Select]
// get permissions for the group(s)
$perms = 0;
$request = $smcFunc['db_query']('', '
SELECT count(permission)
FROM {db_prefix}permissions
WHERE id_group IN ({array_int:group}) AND permission = {string:perm} AND add_deny = 1',
array(
'group' => $groups,
'perm' => 'admin_forum'
)
);
list($perms) = $smcFunc['db_fetch_row']($request);
$smcFunc['db_free_result']($request);

I have currently not the time to clarify that more, but I think that helps ...
Many are stubborn in relation to the path, a few in relation to the target.

Offline Dukie

  • Newbie
  • *
  • Posts: 24
  • Gender: Male
Re: Sub Forums
« Reply #4 on: 08.05.12, 04:43:22 »
Well .. that is not simple.
At first you have to add (manually) a new permission (like admin_subforums) to the SMF permission structure.
Then you must change the login permissions in the file Subforums.php on two points:
here:
Code: [Select]
// main forum only for admins ?
elseif(empty($maintenance) && empty($modSettings['subforums'][$_SERVER['SERVER_NAME']]) && !empty($modSettings['subforums_adminonly']) && !allowedTo('admin_forum'))
Subforums_Login(true);

and here:
Code: [Select]
// get permissions for the group(s)
$perms = 0;
$request = $smcFunc['db_query']('', '
SELECT count(permission)
FROM {db_prefix}permissions
WHERE id_group IN ({array_int:group}) AND permission = {string:perm} AND add_deny = 1',
array(
'group' => $groups,
'perm' => 'admin_forum'
)
);
list($perms) = $smcFunc['db_fetch_row']($request);
$smcFunc['db_free_result']($request);

I have currently not the time to clarify that more, but I think that helps ...
Thank you Feline.. It gives me a start. I will report back with a mod if I proceed.

Thanks