ik ben aan het testen gegaan met de Restricted Groups mod
maar krijg een foutmelding,
dit is de mod:
Code: Selecteer alles
##############################################################
## MOD Title: Restricted Group
## MOD Author: cYbercOsmOnauT < cosmo@cybercosmonaut.de > (Tekin B.)
## MOD Description: This mod allows you to specify a group that has no access to forums which have "registred users" access through your acp.
## MOD Version: 1.0.1
##
## Installation Level: Easy
## Installation Time: 9 minutes
## Files To Edit: admin/admin_board.php
## includes/auth.php
## language/lang_english/lang_admin.php
## templates/subSilver/admin/board_config_body.tpl
## Included Files: db_update.php
## translations/german_translation.mod
## Generator: MOD Studio 3.0 Beta 2 [mod functions 0.4.1818.26949]
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes: This mod only makes sense if you do not
## let people register on your board without checking them.
##
## If you do not use Easymod for installing, you can use
## db_update.php for the SQL-Stuff.
##
## The db_update.php can also be used to remove the
## MOD's database entry from your database.
##############################################################
## MOD History:
##
## 2005-06-25 - Version 1.0.1
##
## - Small Bugfix
##
## 2005-06-23 - Version 1.0.0
##
## - First Stable release.
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ SQL ]------------------------------------------
#
INSERT INTO phpbb_config (config_name, config_value) VALUES ('restricted_group', '0');
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]------------------------------------------
#
"L_ALLOW_NAME_CHANGE" => $lang['Allow_name_change'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
"L_RESTRICTED_GROUP" => $lang['Restricted_group'],
"L_RESTRICTED_GROUP_EXPLAIN" => $lang['Restricted_group_explain'],
#
#-----[ FIND ]------------------------------------------
#
"NAMECHANGE_NO" => $namechange_no,
#
#-----[ AFTER, ADD ]------------------------------------------
#
"RESTRICTED_GROUP" => $new['restricted_group'],
#
#-----[ OPEN ]------------------------------------------
#
includes/auth.php
#
#-----[ FIND ]------------------------------------------
#
// 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
//
#
#-----[ AFTER, ADD ]------------------------------------------
#
$sql = "SELECT *
FROM ". USER_GROUP_TABLE ."
WHERE user_id=". $userdata['user_id'] ." AND group_id=". $board_config['restricted_group'] ." AND user_pending=0";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Failed obtaining user group lists', '', __LINE__, __FILE__, $sql);
}
$banned_group = $db->sql_numrows($result);
$db->sql_freeresult($result);
#
#-----[ FIND ]------------------------------------------
#
$auth_user[$key] = ( $userdata['session_logged_in'] ) ? TRUE : 0;
#
#-----[ REPLACE WITH ]------------------------------------------
#
$auth_user[$key] = ( $userdata['session_logged_in'] && !$banned_group ) ? TRUE : 0;
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
//
// That's all Folks!
#
#-----[ BEFORE, ADD ]------------------------------------------
#
$lang['Restricted_group'] = 'Restricted Group';
$lang['Restricted_group_explain'] = 'Specify a group which has no access to forums open for all registred users. Enter the <b>GroupID</b> of the group. 0 disables this function.';
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/board_config_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1">{L_ALLOW_NAME_CHANGE}</td>
<td class="row2"><input type="radio" name="allow_namechange" value="1" {NAMECHANGE_YES} /> {L_YES} <input type="radio" name="allow_namechange" value="0" {NAMECHANGE_NO} /> {L_NO}</td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<td class="row1">{L_RESTRICTED_GROUP}<br /><span class="gensmall">{L_RESTRICTED_GROUP_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="5" maxlength="4" name="restricted_group" value="{RESTRICTED_GROUP}" /></td>
</tr>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
en dit is de foutmelding
Code: Selecteer alles
Failed obtaining user group lists
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND user_pending=0' at line 3
SELECT * FROM phpbb_user_group WHERE user_id=3 AND group_id= AND user_pending=0
Line : 200
File : auth.php
ik heb de mod helemaal nagelopen, en alles is uitgevoerd zoals beschreven
ook staat de extra tabel in de database
iemand een idee waar ik moet zoeken om dit op te lossen
