After installed Extra Permission & Shoutbox...then....

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 !

After installed Extra Permission & Shoutbox...then....

Postby oxfly on Sat 26. Apr, 2003 07:48

the memberlist link is gone!..
it's not appeared ...like below...

Statistics Calendar Latest Posts Links Portal
FAQ Search Album
Profile You have no new messages

This thing supposed to be at the upper right...

Is it caused by the extra permission mod?..
and the forum admin>permission>select a forum
MEMBERLIST, INDEX_PAGE..

i'm confused..
how do i want to make sure the memberlist is appear?...
oxfly
Poster
Poster
 
Posts: 6
Joined: Sat 29. Mar, 2003 07:58

Postby Niels on Sun 27. Apr, 2003 21:17

some users have reported this....so I gues it seam like, I migth missed a part in the how-to
please test this:
in file auth.php
Code: Select all
[FIND]
$forum_match_sql = ( $forum_id != AUTH_LIST_ALL ) ? "WHERE a.forum_id = $forum_id" : '';
[IN-LINE FIND]
= $forum_id
[IN-LINE REPLACE WITH]
= '$forum_id'


pleae report back fast
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby oxfly on Mon 28. Apr, 2003 06:01

sad to say that nothing happens....

any other idea?...
oxfly
Poster
Poster
 
Posts: 6
Joined: Sat 29. Mar, 2003 07:58

Postby Niels on Mon 28. Apr, 2003 11:34

could you verify that your "forum permission" for the memberlist is set to view "all"
a link to your site would also help, so I can see how it behaives

also try email me your auth.php file, include a link to this post
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby oxfly on Mon 28. Apr, 2003 11:58

MEMBERLIST > view > ALL doesnt work...

my link is: http://myscc.org

[code]<?php
/***************************************************************************
* auth.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: auth.php,v 1.37.2.2 2002/12/22 18:46:26 psotfx Exp $
*
*
***************************************************************************/

/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/

/*
$type's accepted (pre-pend with AUTH_):
VIEW, READ, POST, REPLY, EDIT, DELETE, STICKY, ANNOUNCE, VOTE, POLLCREATE, BAN, GREENCARD, BLUECARD

Possible options ($type/forum_id combinations):

* If you include a type and forum_id then a specific lookup will be done and
the single result returned

* If you set type to AUTH_ALL and specify a forum_id an array of all auth types
will be returned

* If you provide a forum_id a specific lookup on that forum will be done

* If you set forum_id to AUTH_LIST_ALL and specify a type an array listing the
results for all forums will be returned

* If you set forum_id to AUTH_LIST_ALL and type to AUTH_ALL a multidimensional
array containing the auth permissions for all types and all forums for that
user is returned

All results are returned as associative arrays, even when a single auth type is
specified.

If available you can send an array (either one or two dimensional) containing the
forum auth levels, this will prevent the auth function having to do its own
lookup
*/
function auth($type, $forum_id, $userdata, $f_access = '')
{
global $db, $lang;

switch( $type )
{
case AUTH_ALL:
$a_sql = 'a.auth_view, a.auth_read, a.auth_post, a.auth_reply, a.auth_edit, a.auth_delete, a.auth_sticky, a.auth_announce, a.auth_vote, a.auth_pollcreate, a.auth_ban, a.auth_greencard, a.auth_bluecard';
$auth_fields = array('auth_view', 'auth_read', 'auth_post', 'auth_reply', 'auth_edit', 'auth_delete', 'auth_sticky', 'auth_announce', 'auth_vote', 'auth_pollcreate', 'auth_ban', 'auth_greencard', 'auth_bluecard');
break;

case AUTH_VIEW:
$a_sql = 'a.auth_view';
$auth_fields = array('auth_view');
break;

case AUTH_READ:
$a_sql = 'a.auth_read';
$auth_fields = array('auth_read');
break;
case AUTH_POST:
$a_sql = 'a.auth_post';
$auth_fields = array('auth_post');
break;
case AUTH_REPLY:
$a_sql = 'a.auth_reply';
$auth_fields = array('auth_reply');
break;
case AUTH_EDIT:
$a_sql = 'a.auth_edit';
$auth_fields = array('auth_edit');
break;
case AUTH_DELETE:
$a_sql = 'a.auth_delete';
$auth_fields = array('auth_delete');
break;

case AUTH_ANNOUNCE:
$a_sql = 'a.auth_announce';
$auth_fields = array('auth_announce');
break;
case AUTH_STICKY:
$a_sql = 'a.auth_sticky';
$auth_fields = array('auth_sticky');
break;

case AUTH_POLLCREATE:
$a_sql = 'a.auth_pollcreate';
$auth_fields = array('auth_pollcreate');
break;
case AUTH_VOTE:
$a_sql = 'a.auth_vote';
$auth_fields = array('auth_vote');
break;
case AUTH_BAN:
$a_sql = 'a.auth_ban';
$auth_fields = array('auth_ban');
break;
case AUTH_GREENCARD:
$a_sql = 'a.auth_greencard';
$auth_fields = array('auth_greencard');
break;
case AUTH_BLUECARD:
$a_sql = 'a.auth_bluecard';
$auth_fields = array('auth_bluecard');
break;
case AUTH_ATTACH:
break;

default:
break;
}
attach_setup_basic_auth($type, $auth_fields, $a_sql);
//
// If f_access has been passed, or auth is needed to return an array of forums
// then we need to pull the auth information on the given forum (or all forums)
//
ieview');
bCe A_ Rßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
oxfly
Poster
Poster
 
Posts: 6
Joined: Sat 29. Mar, 2003 07:58

Postby Niels on Tue 29. Apr, 2003 23:49

the changes to auth.php (posted above) should be made 2 places in the code, please modify you auth.php further to gain this.

(I have now included this into the how-to ver 0.9.6)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby m3kon on Thu 12. Jun, 2003 23:21

Hi hope you can help i am having the same problem my memberlist link is missing and ive installed shoutbox and it doesnt show up either could you please take a look at my code for auth.php see if i have made a mistake, i have checked it a few times but cant see anything wrong.

Code: Select all
<?php
/***************************************************************************
*                                 auth.php
*                            -------------------                         
*   begin                : Saturday, Feb 13, 2001
*   copyright            : (C) 2001 The phpBB Group       
*   email                : support@phpbb.com                           
*                                                         
*   $Id: auth.php,v 1.37.2.2 2002/12/22 18:46:26 psotfx Exp $                                                           
*                                                           
*
***************************************************************************/

/***************************************************************************
*
*   This program is free software; you can redistribute it and/or modify
*   it under the terms of the GNU General Public License as published by
*   the Free Software Foundation; either version 2 of the License, or
*   (at your option) any later version.
*
***************************************************************************/

/*
   $type's accepted (pre-pend with AUTH_):
   VIEW, READ, POST, REPLY, EDIT, DELETE, STICKY, ANNOUNCE, VOTE, POLLCREATE

   Possible options ($type/forum_id combinations):

   * If you include a type and forum_id then a specific lookup will be done and
   the single result returned

   * If you set type to AUTH_ALL and specify a forum_id an array of all auth types
   will be returned

   * If you provide a forum_id a specific lookup on that forum will be done

   * If you set forum_id to AUTH_LIST_ALL and specify a type an array listing the
   results for all forums will be returned

   * If you set forum_id to AUTH_LIST_ALL and type to AUTH_ALL a multidimensional
   array containing the auth permissions for all types and all forums for that
   user is returned

   All results are returned as associative arrays, even when a single auth type is
   specified.

   If available you can send an array (either one or two dimensional) containing the
   forum auth levels, this will prevent the auth function having to do its own
   lookup
*/
function auth($type, $forum_id, $userdata, $f_access = '')
{
   global $db, $lang;

   switch( $type )
   {
      case AUTH_ALL:
         $a_sql = 'a.auth_view, a.auth_read, a.auth_post, a.auth_reply, a.auth_edit, a.auth_delete, a.auth_sticky, a.auth_announce, a.auth_vote, a.auth_pollcreate';
         $auth_fields = array('auth_view', 'auth_read', 'auth_post', 'auth_reply', 'auth_edit', 'auth_delete', 'auth_sticky', 'auth_announce', 'auth_vote', 'auth_pollcreate');
         break;

      case AUTH_VIEW:
         $a_sql = 'a.auth_view';
         $auth_fields = array('auth_view');
         break;

      case AUTH_READ:
         $a_sql = 'a.auth_read';
         $auth_fields = array('auth_read');
         break;
      case AUTH_POST:
         $a_sql = 'a.auth_post';
         $auth_fields = array('auth_post');
         break;
      case AUTH_REPLY:
         $a_sql = 'a.auth_reply';
         $auth_fields = array('auth_reply');
         break;
      case AUTH_EDIT:
         $a_sql = 'a.auth_edit';
         $auth_fields = array('auth_edit');
         break;
      case AUTH_DELETE:
         $a_sql = 'a.auth_delete';
         $auth_fields = array('auth_delete');
         break;

      case AUTH_ANNOUNCE:
         $a_sql = 'a.auth_announce';
         $auth_fields = array('auth_announce');
         break;
      case AUTH_STICKY:
         $a_sql = 'a.auth_sticky';
         $auth_fields = array('auth_sticky');
         break;

      case AUTH_POLLCREATE:
         $a_sql = 'a.auth_pollcreate';
         $auth_fields = array('auth_pollcreate');
         break;
      case AUTH_VOTE:
         $a_sql = 'a.auth_vote';
         $auth_fields = array('auth_vote');
         break;
      case AUTH_ATTACH:
         break;

      default:
         break;
   }

   //
   // If f_access has been passed, or auth is needed to return an array of forums
   // then we need to pull the auth information on the given forum (or all forums)
   //
   if ( empty($f_access) )
   {
      $forum_match_sql = ( $forum_id != AUTH_LIST_ALL ) ? "WHERE a.forum_id = '$forum_id'" : '';

      $sql = "SELECT a.forum_id, $a_sql
         FROM " . FORUMS_TABLE . " a
         $forum_match_sql";
      if ( !($result = $db->sql_query($sql)) )
      {
         message_die(GENERAL_ERROR, 'Failed obtaining forum access control lists', '', __LINE__, __FILE__, $sql);
      }

      $sql_fetchrow = ( $forum_id != AUTH_LIST_ALL ) ? 'sql_fetchrow' : 'sql_fetchrowset';

      if ( !($f_access = $db->$sql_fetchrow($result)) )
      {
         $db->sql_freeresult($result);
         return array();
      }

      $db->sql_freeresult($result);
   }

   //
   // If the user isn't logged on then all we need do is check if the forum
   // has the type set to ALL, if yes they are good to go, if not then they
   // are denied access
   //
   $u_access = array();
   if ( $userdata['session_logged_in'] )
   {
      $forum_match_sql = ( $forum_id != AUTH_LIST_ALL ) ? "AND a.forum_id = '$forum_id'" : '';

      $sql = "SELECT a.forum_id, $a_sql, a.auth_mod
         FROM " . AUTH_ACCESS_TABLE . " a, " . USER_GROUP_TABLE . " ug
         WHERE ug.user_id = ".$userdata['user_id']. "
            AND ug.user_pending = 0
            AND a.group_id = ug.group_id
            $forum_match_sql";
      if ( !($result = $db->sql_query($sql)) )
      {
         message_die(GENERAL_ERROR, 'Failed obtaining forum access control lists', '', __LINE__, __FILE__, $sql);
      }

      if ( $row = $db->sql_fetchrow($result) )
      {
         do
         {
            if ( $forum_id != AUTH_LIST_ALL)
            {
               $u_access[] = $row;
            }
            else
            {
               $u_access[$row['forum_id']][] = $row;
            }
         }
         while( $row = $db->sql_fetchrow($result) );
      }
   }

   $is_admin = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? TRUE : 0;

   $auth_user = array();
   for($i = 0; $i < count($auth_fields); $i++)
   {
      $key = $auth_fields[$i];

      //
      // If the user is logged on and the forum type is either ALL or REG then the user has access
      //
      // If the type if ACL, MOD or ADMIN then we need to see if the user has specific permissions
      // to do whatever it is they want to do ... to do this we pull relevant information for the
      // user (and any groups they belong to)
      //
      // Now we compare the users access level against the forums. We assume here that a moderator
      // and admin automatically have access to an ACL forum, similarly we assume admins meet an
      // auth requirement of MOD
      //
      if ( $forum_id != AUTH_LIST_ALL )
      {
         $value = $f_access[$key];

         switch( $value )
         {
            case AUTH_ALL:
               $auth_user[$key] = TRUE;
               $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users'];
               break;

            case AUTH_REG:
               $auth_user[$key] = ( $userdata['session_logged_in'] ) ? TRUE : 0;
               $auth_user[$key . '_type'] = $lang['Auth_Registered_Users'];
               break;

            case AUTH_ACL:
               $auth_user[$key] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_ACL, $key, $u_access, $is_admin) : 0;
               $auth_user[$key . '_type'] = $lang['Auth_Users_granted_access'];
               break;

            case AUTH_MOD:
               $auth_user[$key] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_MOD, 'auth_mod', $u_access, $is_admin) : 0;
               $auth_user[$key . '_type'] = $lang['Auth_Moderators'];
               break;

            case AUTH_ADMIN:
               $auth_user[$key] = $is_admin;
               $auth_user[$key . '_type'] = $lang['Auth_Administrators'];
               break;

            default:
               $auth_user[$key] = 0;
               break;
         }
      }
      else
      {
         for($k = 0; $k < count($f_access); $k++)
         {
            $value = $f_access[$k][$key];
            $f_forum_id = $f_access[$k]['forum_id'];

            switch( $value )
            {
               case AUTH_ALL:
                  $auth_user[$f_forum_id][$key] = TRUE;
                  $auth_user[$f_forum_id][$key . '_type'] = $lang['Auth_Anonymous_users'];
                  break;

               case AUTH_REG:
                  $auth_user[$f_forum_id][$key] = ( $userdata['session_logged_in'] ) ? TRUE : 0;
                  $auth_user[$f_forum_id][$key . '_type'] = $lang['Auth_Registered_Users'];
                  break;

               case AUTH_ACL:
                  $auth_user[$f_forum_id][$key] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_ACL, $key, $u_access[$f_forum_id], $is_admin) : 0;
                  $auth_user[$f_forum_id][$key . '_type'] = $lang['Auth_Users_granted_access'];
                  break;

               case AUTH_MOD:
                  $auth_user[$f_forum_id][$key] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_MOD, 'auth_mod', $u_access[$f_forum_id], $is_admin) : 0;
                  $auth_user[$f_forum_id][$key . '_type'] = $lang['Auth_Moderators'];
                  break;

               case AUTH_ADMIN:
                  $auth_user[$f_forum_id][$key] = $is_admin;
                  $auth_user[$f_forum_id][$key . '_type'] = $lang['Auth_Administrators'];
                  break;

               default:
                  $auth_user[$f_forum_id][$key] = 0;
                  break;
            }
         }
      }
   }

   //
   // Is user a moderator?
   //
   if ( $forum_id != AUTH_LIST_ALL )
   {
      $auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_MOD, 'auth_mod', $u_access, $is_admin) : 0;
   }
   else
   {
      for($k = 0; $k < count($f_access); $k++)
      {
         $f_forum_id = $f_access[$k]['forum_id'];

         $auth_user[$f_forum_id]['auth_mod'] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_MOD, 'auth_mod', $u_access[$f_forum_id], $is_admin) : 0;
      }
   }

   return $auth_user;
}

function auth_check_user($type, $key, $u_access, $is_admin)
{
   $auth_user = 0;

   if ( count($u_access) )
   {
      for($j = 0; $j < count($u_access); $j++)
      {
         $result = 0;
         switch($type)
         {
            case AUTH_ACL:
               $result = $u_access[$j][$key];

            case AUTH_MOD:
               $result = $result || $u_access[$j]['auth_mod'];

            case AUTH_ADMIN:
               $result = $result || $is_admin;
               break;
         }

         $auth_user = $auth_user || $result;
      }
   }
   else
   {
      $auth_user = $is_admin;
   }

   return $auth_user;
}

?>


also how do i set the permissions ( all my forums are all on so all can read reply etc.).

Thanks in advance...


http://www.teamdragon.co.uk/clan/portal.php
m3kon
Poster
Poster
 
Posts: 10
Joined: Tue 22. Oct, 2002 18:03

Postby Niels on Mon 16. Jun, 2003 09:08

to change the permission, then go into "ACP -> forum permission" and look up the forum "shoutbox page"

inside here you may define auth view, auth_read, auth_delete and auth_mod

please try change the settings and see if this is stored.
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Next

Return to Extra permission [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron