[Resolved]I need precise details

This mod will make it posible to specify permissions to all "special pages, like MEMBERLIST, PROFILE VIEW and so on.
The permissions support USERGROUP, making this tool very powerfull

Moderator: Moderators

Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

[Resolved]I need precise details

Postby Lunatic on Mon 17. Nov, 2003 18:41

Hello,

I'll try to speak a good English ;)

I have two different questions :

- First, if I understand correctly, when we want to protect a page we have to add some code into it. But what is the difference between

Code: Select all
$is_auth = auth([b]AUTH_READ[/b], PAGE_VIEWMEMBERS, $userdata);


and

Code: Select all
$is_auth = auth([b]AUTH_ALL[/b], PAGE_VIEWMEMBERS, $userdata);


since we set the permissions in the administration panel ?

- Second question : setting full access to shoutbox and memberlist pages, how can I hide the locked "forums" named "SHOUTBOX" and "MEMBERLIST PAGE" ?

Thanks a lot :)

Lunatic.
Last edited by Lunatic on Mon 17. Nov, 2003 23:52, edited 1 time in total.
Lunatic
Poster
Poster
 
Posts: 7
Joined: Sun 08. Dec, 2002 00:19

Postby Niels on Mon 17. Nov, 2003 22:23

$is_auth = auth(AUTH_READ, PAGE_VIEWMEMBERS, $userdata);
or
$is_auth = auth(AUTH_ALL, PAGE_VIEWMEMBERS, $userdata);

is used to fetch permission data from the DB, in the first case, you ONLY fetch the auth_read permission, while in the later, you fetch ANY permission data.

of couse the first one is the fastes, but if you ned to verify more than one type of permission, the secound will be the one to use.

e.g. if you have used
$is_auth = auth(AUTH_READ, PAGE_VIEWMEMBERS, $userdata);

you can later in thatpage use
Code: Select all
if ($is_auth['auth_read'])
{
}


but you can NOT use
Code: Select all
if ($is_auth['auth_post'])
{
}


if you instead use
$is_auth = auth(AUTH_ALL, PAGE_VIEWMEMBERS, $userdata);

you may use ANY permission you like
e.g.
Code: Select all
if ($is_auth['auth_mod'])
{
}

or

Code: Select all
if ($is_auth['auth_delete'])
{
}
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Lunatic on Mon 17. Nov, 2003 22:39

Thank you for these good explanations :)

Can you help me about the first question ?

(I have attached a file in order to show the "forums" I would like to hide. On your board we don't see these forums)
Lunatic
Poster
Poster
 
Posts: 7
Joined: Sun 08. Dec, 2002 00:19

Postby Niels on Mon 17. Nov, 2003 23:35

the "special pages" should NOT show as forums, on your index page.....
I guess you have some other mod installed, witch handle how the forums are showen....

make shure this MOD, only fetch positive forum id's alternativly AND/OR does NOT fetch cat ID = 0

this should make them disaper
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Lunatic on Mon 17. Nov, 2003 23:42

Niels wrote:the "special pages" should NOT show as forums, on your index page.....
I guess you have some other mod installed, witch handle how the forums are showen....

make shure this MOD, only fetch positive forum id's alternativly AND/OR does NOT fetch cat ID = 0

this should make them disaper


Ok, thank you again.

I think these "forums" appear because of the "Categories hierarchy" (created by Ptirhiik) is installed. These "forums" have a negative id (f=-7 ; f=-2 ; etc.)

:)
Lunatic
Poster
Poster
 
Posts: 7
Joined: Sun 08. Dec, 2002 00:19

Postby Niels on Tue 18. Nov, 2003 01:51

simply modify the SQL the MOD have added/changed on index.php /functions_select.php pages

e.g.
SELECT * FROM ".FORUMS_TABLE."

becomes
SELECT * FROM ".FORUMS_TABLE." WHERE cat_id<>0
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46


Return to Extra permission [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron