Login before vieuwing

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 !

Login before vieuwing

Postby gcclinux on Thu 04. Sep, 2003 00:04

Hi, I am interrested in your mod that stoppes anyone from browsing the forum unless they are registered. Where can I find that MOD? And is it easy to install it? :?:
User avatar
gcclinux
Poster
Poster
 
Posts: 5
Joined: Fri 29. Aug, 2003 14:54

Postby Niels on Thu 04. Sep, 2003 12:09

you may find the mod in the "announcement" inside this forum.

the how-to cover how to add the mod into 2 pages...index and member list

after this you may control exactly who may see and use these pages, fully suporting usergroups.
in your case you also need to "customice" the mod into other pages as well, you may takea look inside my pre-loaded pack to see how I have added it into other pages. e.g. "seach" page.

BUT, it sounds more like you do not need this mod, if you simply whan to stop all not registerd useds from browsing your site, it would be better with less CPU demanding mod, a mod witch does not support usegroups does exisit, and will proberbly suit your needs better. go look www.phpbb.com


or simply put this code inside every page you would restrict.
(rigth after the code looking like this
// End session management
//
)
if( !$userdata['session_logged_in'])
{
message_die(GENERAL_MESSAGE, $lang['Not_Authorised']);
}

OR

if( !$userdata['session_logged_in'])
{
$header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: ";
header($header_location . append_sid("login.$phpEx?redirect=memberlist.$phpEx", true));
}


pay attention to the highlighted REDIRECT, this should be changed to the actual page name, so the user wil be redirected back to the correct page after successful login
(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 gcclinux on Thu 04. Sep, 2003 16:08

I've added the following lines instead:

if( !$userdata['session_logged_in'])
{
redirect(append_sid("login.$phpEx", true));
}

Thank you very much for your help.
User avatar
gcclinux
Poster
Poster
 
Posts: 5
Joined: Fri 29. Aug, 2003 14:54


Return to Extra permission [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron