Beste bezoeker,

Wij werken met een klein groepje.
Het kan zijn dat u na het plaatsen van een bericht even moet wachten op hulp of op een antwoord,
blijf daarom gerust posten we zullen z.s.m. en wanneer het kan reageren.

Voor dringende zaken die echt niet kunnen wachten kunt u het contactformulier gebruiken.

-------------------------------------

Wanneer u ons forum bezoekt voor hulp bij installatie, vragen wij u een account aan te maken en geen gebruik te maken van het contactformulier.

Wij kunnen u beter helpen wanneer u een account aanmaakt en u in het volgende onderwerp phpBB en Extensie installatie en aanpassingen laten uitvoeren een nieuw onderwerp start.

Ook wanneer u ergens niet uitkomt of vragen heeft, vragen wij u gebruik te maken van 1 van de bestaande "support onderwerpen" en aldaar uw onderwerp te starten.

Waneer u een account aanmaakt kan het zijn dat de activatie email terecht komt in de spamfolder.
  • Verplaats deze terug naar uw postvak-in en klik op de activatie link, hierna is uw account geactiveerd en kunt u inloggen op het forum.

Met vriendelijke groet,

Team phpBBservice.nl
(steeds tot uw dienst)

Anti Spam ACP 1.0.3-PL1 [phpBB Debug]

Archief
Gebruikersavatar

Auteur
Denise
phpBBservice Teamlid
phpBBservice Teamlid
Berichten in topic: 9
Berichten: 1309
Lid geworden op: 04 jan 2012 13:44
Locatie: 127.0.0.1
Verstuurde bedankjes: 30 keren
Ontvangen bedankjes: 14 keren

Anti Spam ACP 1.0.3-PL1 [phpBB Debug]

Bericht door Denise » 04 jan 2012 14:09

Hallo,

Gebruikers die nieuw zijn en waar nog een beperking op geldt qua controleren van spamwoorden
krijgen het volgende te zien als ze een bericht posten en of wijzigen:

[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4625: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4627: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4628: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4629: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)

Code uit Functions.php

Code: Selecteer alles

// START Anti-Spam ACP
	antispam::page_header();
	// END Anti-Spam ACP
	// application/xhtml+xml not used because of IE

dit is line 4625:	  header('Content-type: text/html; charset=UTF-8');

dit is line 4627:	  header('Cache-Control: private, no-cache="set-cookie"');
dit is line 4628:	  header('Expires: 0');
dit is line 4629:	  header('Pragma: no-cache');
Deze foutmeldingen komen alleen voor bij nieuwe gebruikers, na 3 posts is het weg en herhaald het zich weer bij een nieuwe gebruiker.

overigens deze lijn van de foutmelding is ong 20 keer te zien:

[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash

Ik heb dit ook reeds geplaatst bij support van desbetreffende mod op phpbb.com (zie onderstaande link)
maar tot op heden geen reactie. ik hoop eigenlijk dat iemand zich in deze error erkend en mij kan wijzen wat er fout gaat en evt hoe het hersteld kan worden.

Heel erg bedankt alvast voor het meedenken, hopend dat jullie me kunnen helpen met deze puzzel.

http://www.phpbb.com/customise/db/mod/a ... hp-t_96629
Met vriendelijke groet,
Afbeelding
phpBBservice.nl
Steeds tot uw dienst.

AfbeeldingSupport Tools | Afbeelding My Extensions | buy me a beer Afbeelding


Kevin
Vorig TeamLid
Berichten in topic: 4
Berichten: 3559
Lid geworden op: 03 nov 2007 20:36
Verstuurde bedankjes: 5 keren
Ontvangen bedankjes: 8 keren
Contacteer:

Re: Anti Spam ACP 1.0.3-PL1 [phpBB Debug]

Bericht door Kevin » 04 jan 2012 15:11

Om te beginnen weet je zeker dat je alle engelse taalbestanden ook in de nederlandse map heb zitten?
Heb je bestanden bewerkt en daarna terug geupload? zo ja is dan de codering van de bestanden nog wel juist ga je je dan afvragen. Taalbestanden kun je zomaar niet bewerken met een programma als kladblok ivm de codering "utf8 zonder bom".
Met vriendelijke groeten,
Kevin.

-----------------------------------------------------------------------------------------

Bent u tevreden over onze service?
Dan zouden wij het op prijs stellen als u ons zou willen beoordelen op Afbeelding.

Winnaar in de phpBB.nl awards 2009, 2010 en 2012 met AquaforA

Gebruikersavatar

Auteur
Denise
phpBBservice Teamlid
phpBBservice Teamlid
Berichten in topic: 9
Berichten: 1309
Lid geworden op: 04 jan 2012 13:44
Locatie: 127.0.0.1
Verstuurde bedankjes: 30 keren
Ontvangen bedankjes: 14 keren

Re: Anti Spam ACP 1.0.3-PL1 [phpBB Debug]

Bericht door Denise » 04 jan 2012 16:04

Hoi kevin,

Ik heb alle engelse benodige taalbestanden ook in de nederlandse map zitten.
Bestanden die ik bewerkt heb, heb ik ook terug geupload, gisteravond ben ik de hele installatie instructies van die mod nog eens doorgelopen en alles wat er veranderd moet worden staat erin en op de goede plek.

Ik gebruik altijd notepad++ om bestanden mee in te bewerken.

Door te zoeken op die foutmelding op google las ik iets dat het te maken kon hebben met stk (support toolkit)
maar na stk verwijderd te hebben en daarna weer getest, bleek dat dat niet de oorzaak was. probleem deed zich nog steeds voor.

http://lithiumstudios.org/forum/tracker.php?p=5&t=156

Ook is de foutmelding die daar wordt gegeven anders dan mijn foutmeldingen.

Wat ik trouwens ook heb en misschien is dit gerelateerd aan deze foutmelding,
als ik debug aanzet in config.php en ik ga naar algemene permissies >> beheerders en klik in beheerdersgroep op beheerders en dan wijzig permissies dan krijg ik het volgende te zien:

Code: Selecteer alles

[phpBB Debug] PHP Notice: in file /includes/acp/auth.php on line 1208: Undefined index: instellingen
[phpBB Debug] PHP Notice: in file /includes/acp/auth.php on line 1208: Undefined index: instellingen
[phpBB Debug] PHP Notice: in file /includes/acp/auth.php on line 1208: Undefined index: instellingen
[phpBB Debug] PHP Notice: in file /includes/acp/auth.php on line 1208: Undefined index: instellingen
[phpBB Debug] PHP Notice: in file /includes/acp/auth.php on line 1208: Undefined index: instellingen
[phpBB Debug] PHP Notice: in file /includes/acp/auth.php on line 1208: Undefined index: instellingen
[phpBB Debug] PHP Notice: in file /includes/acp/auth.php on line 1114: Undefined index: instellingen
[phpBB Debug] PHP Notice: in file /adm/index.php on line 150: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 152: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 153: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 154: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
Met vriendelijke groet,
Afbeelding
phpBBservice.nl
Steeds tot uw dienst.

AfbeeldingSupport Tools | Afbeelding My Extensions | buy me a beer Afbeelding


Kevin
Vorig TeamLid
Berichten in topic: 4
Berichten: 3559
Lid geworden op: 03 nov 2007 20:36
Verstuurde bedankjes: 5 keren
Ontvangen bedankjes: 8 keren
Contacteer:

Re: Anti Spam ACP 1.0.3-PL1 [phpBB Debug]

Bericht door Kevin » 04 jan 2012 23:01

Die meldingen die je nu laat zien hebben toch heel vaak te maken met foutieve taalbestanden. Heb je veel mods geinstalleerd op je forum? Zo niet dan zou ik er is een vers NL pakket overheen uploaden en de aanpassingen van de mod van 0 af aan opnieuw doorvoeren.

Kun je de volgende bestanden is hier plaatsen tussen de code tags, even kijken of daar iets mee aan de hand kan zijn.
/adm/index.php
/includes/acp/auth.php
Met vriendelijke groeten,
Kevin.

-----------------------------------------------------------------------------------------

Bent u tevreden over onze service?
Dan zouden wij het op prijs stellen als u ons zou willen beoordelen op Afbeelding.

Winnaar in de phpBB.nl awards 2009, 2010 en 2012 met AquaforA

Gebruikersavatar

Auteur
Denise
phpBBservice Teamlid
phpBBservice Teamlid
Berichten in topic: 9
Berichten: 1309
Lid geworden op: 04 jan 2012 13:44
Locatie: 127.0.0.1
Verstuurde bedankjes: 30 keren
Ontvangen bedankjes: 14 keren

Re: Anti Spam ACP 1.0.3-PL1 [phpBB Debug]

Bericht door Denise » 04 jan 2012 23:25

Ik heb idd veel mods geinstalleerd, tenminste ik denk dat het veel is, zal ze proberen hier neer te zetten.

- Mchat 1.3.5
- Mchat new chat alert
- Reimg
- Anti Spam Acp 1.03Pl-1
- Board3 portal 2.0.0b1
- Browser_os&_screen_v0.30
- Contact Admin 3.06
- National flags 2.04
- Phpbb3_Countdown 1.0.0
- Show Avatar in friends list 1.01
- Statistics on Index
- Welcome on index
- User status
- View or mark unreads 1.08
- Vietopic Birthday
- Please wait
- pm bars
- Who was here 1.2.1.1

Ik kan me verder niet voorstellen dat het een taalbestand kan zijn, maar evt kan ik die ook hier plaatsen.

Het gevraagde:
/adm/index.php

Code: Selecteer alles

<?php
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
*/
define('IN_PHPBB', true);
define('ADMIN_START', true);
define('NEED_SID', true);

// Include files
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
require($phpbb_root_path . 'common.' . $phpEx);
require($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
require($phpbb_root_path . 'includes/functions_module.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('acp/common');
// End session management

// Have they authenticated (again) as an admin for this session?
if (!isset($user->data['session_admin']) || !$user->data['session_admin'])
{
	login_box('', $user->lang['LOGIN_ADMIN_CONFIRM'], $user->lang['LOGIN_ADMIN_SUCCESS'], true, false);
}

// Is user any type of admin? No, then stop here, each script needs to
// check specific permissions but this is a catchall
if (!$auth->acl_get('a_'))
{
	trigger_error('NO_ADMIN');
}

// We define the admin variables now, because the user is now able to use the admin related features...
define('IN_ADMIN', true);
$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : './';

// Some oft used variables
$safe_mode		= (@ini_get('safe_mode') == '1' || strtolower(@ini_get('safe_mode')) === 'on') ? true : false;
$file_uploads	= (@ini_get('file_uploads') == '1' || strtolower(@ini_get('file_uploads')) === 'on') ? true : false;
$module_id		= request_var('i', '');
$mode			= request_var('mode', '');

// Set custom template for admin area
$template->set_custom_template($phpbb_admin_path . 'style', 'admin');
$template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style');

// the acp template is never stored in the database
$user->theme['template_storedb'] = false;

// Instantiate new module
$module = new p_master();

// Instantiate module system and generate list of available modules
$module->list_modules('acp');

// Select the active module
$module->set_active($module_id, $mode);

// Assign data to the template engine for the list of modules
// We do this before loading the active module for correct menu display in trigger_error
$module->assign_tpl_vars(append_sid("{$phpbb_admin_path}index.$phpEx"));

// Load and execute the relevant module
$module->load_active();

// Generate the page
adm_page_header($module->get_page_title());

$template->set_filenames(array(
	'body' => $module->get_tpl_name(),
));

adm_page_footer();

/**
* Header for acp pages
*/
function adm_page_header($page_title)
{
	global $config, $db, $user, $template;
	global $phpbb_root_path, $phpbb_admin_path, $phpEx, $SID, $_SID;

	if (defined('HEADER_INC'))
	{
		return;
	}

	define('HEADER_INC', true);

	// gzip_compression
	if ($config['gzip_compress'])
	{
		if (@extension_loaded('zlib') && !headers_sent())
		{
			ob_start('ob_gzhandler');
		}
	}

	$template->assign_vars(array(
		'PAGE_TITLE'			=> $page_title,
		'USERNAME'				=> $user->data['username'],

		'SID'					=> $SID,
		'_SID'					=> $_SID,
		'SESSION_ID'			=> $user->session_id,
		'ROOT_PATH'				=> $phpbb_admin_path,

		'U_LOGOUT'				=> append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=logout'),
		'U_ADM_LOGOUT'			=> append_sid("{$phpbb_admin_path}index.$phpEx", 'action=admlogout'),
		'U_ADM_INDEX'			=> append_sid("{$phpbb_admin_path}index.$phpEx"),
		'U_INDEX'				=> append_sid("{$phpbb_root_path}index.$phpEx"),

		'T_IMAGES_PATH'			=> "{$phpbb_root_path}images/",
		'T_SMILIES_PATH'		=> "{$phpbb_root_path}{$config['smilies_path']}/",
		'T_AVATAR_PATH'			=> "{$phpbb_root_path}{$config['avatar_path']}/",
		'T_AVATAR_GALLERY_PATH'	=> "{$phpbb_root_path}{$config['avatar_gallery_path']}/",
		'T_ICONS_PATH'			=> "{$phpbb_root_path}{$config['icons_path']}/",
		'T_RANKS_PATH'			=> "{$phpbb_root_path}{$config['ranks_path']}/",
		'T_UPLOAD_PATH'			=> "{$phpbb_root_path}{$config['upload_path']}/",

		'ICON_MOVE_UP'				=> '<img src="' . $phpbb_admin_path . 'images/icon_up.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
		'ICON_MOVE_UP_DISABLED'		=> '<img src="' . $phpbb_admin_path . 'images/icon_up_disabled.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
		'ICON_MOVE_DOWN'			=> '<img src="' . $phpbb_admin_path . 'images/icon_down.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
		'ICON_MOVE_DOWN_DISABLED'	=> '<img src="' . $phpbb_admin_path . 'images/icon_down_disabled.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
		'ICON_EDIT'					=> '<img src="' . $phpbb_admin_path . 'images/icon_edit.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
		'ICON_EDIT_DISABLED'		=> '<img src="' . $phpbb_admin_path . 'images/icon_edit_disabled.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
		'ICON_DELETE'				=> '<img src="' . $phpbb_admin_path . 'images/icon_delete.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
		'ICON_DELETE_DISABLED'		=> '<img src="' . $phpbb_admin_path . 'images/icon_delete_disabled.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
		'ICON_SYNC'					=> '<img src="' . $phpbb_admin_path . 'images/icon_sync.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
		'ICON_SYNC_DISABLED'		=> '<img src="' . $phpbb_admin_path . 'images/icon_sync_disabled.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',

		'S_USER_LANG'			=> $user->lang['USER_LANG'],
		'S_CONTENT_DIRECTION'	=> $user->lang['DIRECTION'],
		'S_CONTENT_ENCODING'	=> 'UTF-8',
		'S_CONTENT_FLOW_BEGIN'	=> ($user->lang['DIRECTION'] == 'ltr') ? 'left' : 'right',
		'S_CONTENT_FLOW_END'	=> ($user->lang['DIRECTION'] == 'ltr') ? 'right' : 'left',
	));

	// application/xhtml+xml not used because of IE
	header('Content-type: text/html; charset=UTF-8');

	header('Cache-Control: private, no-cache="set-cookie"');
	header('Expires: 0');
	header('Pragma: no-cache');

	return;
}

/**
* Page footer for acp pages
*/
function adm_page_footer($copyright_html = true)
{
	global $db, $config, $template, $user, $auth, $cache;
	global $starttime, $phpbb_root_path, $phpbb_admin_path, $phpEx;

	// Output page creation time
	if (defined('DEBUG'))
	{
		$mtime = explode(' ', microtime());
		$totaltime = $mtime[0] + $mtime[1] - $starttime;

		if (!empty($_REQUEST['explain']) && $auth->acl_get('a_') && defined('DEBUG_EXTRA') && method_exists($db, 'sql_report'))
		{
			$db->sql_report('display');
		}

		$debug_output = sprintf('Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . (($config['gzip_compress']) ? 'On' : 'Off') . (($user->load) ? ' | Load : ' . $user->load : ''), $totaltime);

		if ($auth->acl_get('a_') && defined('DEBUG_EXTRA'))
		{
			if (function_exists('memory_get_usage'))
			{
				if ($memory_usage = memory_get_usage())
				{
					global $base_memory_usage;
					$memory_usage -= $base_memory_usage;
					$memory_usage = get_formatted_filesize($memory_usage);

					$debug_output .= ' | Memory Usage: ' . $memory_usage;
				}
			}

			$debug_output .= ' | <a href="' . build_url() . '&explain=1">Explain</a>';
		}
	}

	$template->assign_vars(array(
		'DEBUG_OUTPUT'		=> (defined('DEBUG')) ? $debug_output : '',
		'TRANSLATION_INFO'	=> (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '',
		'S_COPYRIGHT_HTML'	=> $copyright_html,
		'VERSION'			=> $config['version'])
	);

	$template->display('body');

	garbage_collection();
	exit_handler();
}

/**
* Generate back link for acp pages
*/
function adm_back_link($u_action)
{
	global $user;
	return '<br /><br /><a href="' . $u_action . '">&laquo; ' . $user->lang['BACK_TO_PREV'] . '</a>';
}

/**
* Build select field options in acp pages
*/
function build_select($option_ary, $option_default = false)
{
	global $user;

	$html = '';
	foreach ($option_ary as $value => $title)
	{
		$selected = ($option_default !== false && $value == $option_default) ? ' selected="selected"' : '';
		$html .= '<option value="' . $value . '"' . $selected . '>' . $user->lang[$title] . '</option>';
	}

	return $html;
}

/**
* Build radio fields in acp pages
*/
function h_radio($name, &$input_ary, $input_default = false, $id = false, $key = false)
{
	global $user;

	$html = '';
	$id_assigned = false;
	foreach ($input_ary as $value => $title)
	{
		$selected = ($input_default !== false && $value == $input_default) ? ' checked="checked"' : '';
		$html .= '<label><input type="radio" name="' . $name . '"' . (($id && !$id_assigned) ? ' id="' . $id . '"' : '') . ' value="' . $value . '"' . $selected . (($key) ? ' accesskey="' . $key . '"' : '') . ' class="radio" /> ' . $user->lang[$title] . '</label>';
		$id_assigned = true;
	}

	return $html;
}

/**
* Build configuration template for acp configuration pages
*/
function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
{
	global $user, $module;

	$tpl = '';
	$name = 'config[' . $config_key . ']';

	// Make sure there is no notice printed out for non-existent config options (we simply set them)
	if (!isset($new[$config_key]))
	{
		$new[$config_key] = '';
	}

	switch ($tpl_type[0])
	{
		case 'text':
		case 'password':
			$size = (int) $tpl_type[1];
			$maxlength = (int) $tpl_type[2];

			$tpl = '<input id="' . $key . '" type="' . $tpl_type[0] . '"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="' . $name . '" value="' . $new[$config_key] . '" />';
		break;

		case 'dimension':
			$size = (int) $tpl_type[1];
			$maxlength = (int) $tpl_type[2];

			$tpl = '<input id="' . $key . '" type="text"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="config[' . $config_key . '_width]" value="' . $new[$config_key . '_width'] . '" /> x <input type="text"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="config[' . $config_key . '_height]" value="' . $new[$config_key . '_height'] . '" />';
		break;

		case 'textarea':
			$rows = (int) $tpl_type[1];
			$cols = (int) $tpl_type[2];

			$tpl = '<textarea id="' . $key . '" name="' . $name . '" rows="' . $rows . '" cols="' . $cols . '">' . $new[$config_key] . '</textarea>';
		break;

		case 'radio':
			$key_yes	= ($new[$config_key]) ? ' checked="checked"' : '';
			$key_no		= (!$new[$config_key]) ? ' checked="checked"' : '';

			$tpl_type_cond = explode('_', $tpl_type[1]);
			$type_no = ($tpl_type_cond[0] == 'disabled' || $tpl_type_cond[0] == 'enabled') ? false : true;

			$tpl_no = '<label><input type="radio" name="' . $name . '" value="0"' . $key_no . ' class="radio" /> ' . (($type_no) ? $user->lang['NO'] : $user->lang['DISABLED']) . '</label>';
			$tpl_yes = '<label><input type="radio" id="' . $key . '" name="' . $name . '" value="1"' . $key_yes . ' class="radio" /> ' . (($type_no) ? $user->lang['YES'] : $user->lang['ENABLED']) . '</label>';

			$tpl = ($tpl_type_cond[0] == 'yes' || $tpl_type_cond[0] == 'enabled') ? $tpl_yes . $tpl_no : $tpl_no . $tpl_yes;
		break;

		case 'select':
		case 'custom':

			$return = '';

			if (isset($vars['method']))
			{
				$call = array($module->module, $vars['method']);
			}
			else if (isset($vars['function']))
			{
				$call = $vars['function'];
			}
			else
			{
				break;
			}

			if (isset($vars['params']))
			{
				$args = array();
				foreach ($vars['params'] as $value)
				{
					switch ($value)
					{
						case '{CONFIG_VALUE}':
							$value = $new[$config_key];
						break;

						case '{KEY}':
							$value = $key;
						break;
					}

					$args[] = $value;
				}
			}
			else
			{
				$args = array($new[$config_key], $key);
			}

			$return = call_user_func_array($call, $args);

			if ($tpl_type[0] == 'select')
			{
				$tpl = '<select id="' . $key . '" name="' . $name . '">' . $return . '</select>';
			}
			else
			{
				$tpl = $return;
			}

		break;

		default:
		break;
	}

	if (isset($vars['append']))
	{
		$tpl .= $vars['append'];
	}

	return $tpl;
}

/**
* Going through a config array and validate values, writing errors to $error. The validation method  accepts parameters separated by ':' for string and int.
* The first parameter defines the type to be used, the second the lower bound and the third the upper bound. Only the type is required.
*/
function validate_config_vars($config_vars, &$cfg_array, &$error)
{
	global $phpbb_root_path, $user;
	$type	= 0;
	$min	= 1;
	$max	= 2;

	foreach ($config_vars as $config_name => $config_definition)
	{
		if (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false)
		{
			continue;
		}

		if (!isset($config_definition['validate']))
		{
			continue;
		}

		$validator = explode(':', $config_definition['validate']);

		// Validate a bit. ;) (0 = type, 1 = min, 2= max)
		switch ($validator[$type])
		{
			case 'string':
				$length = strlen($cfg_array[$config_name]);

				// the column is a VARCHAR
				$validator[$max] = (isset($validator[$max])) ? min(255, $validator[$max]) : 255;

				if (isset($validator[$min]) && $length < $validator[$min])
				{
					$error[] = sprintf($user->lang['SETTING_TOO_SHORT'], $user->lang[$config_definition['lang']], $validator[$min]);
				}
				else if (isset($validator[$max]) && $length > $validator[2])
				{
					$error[] = sprintf($user->lang['SETTING_TOO_LONG'], $user->lang[$config_definition['lang']], $validator[$max]);
				}
			break;

			case 'bool':
				$cfg_array[$config_name] = ($cfg_array[$config_name]) ? 1 : 0;
			break;

			case 'int':
				$cfg_array[$config_name] = (int) $cfg_array[$config_name];

				if (isset($validator[$min]) && $cfg_array[$config_name] < $validator[$min])
				{
					$error[] = sprintf($user->lang['SETTING_TOO_LOW'], $user->lang[$config_definition['lang']], $validator[$min]);
				}
				else if (isset($validator[$max]) && $cfg_array[$config_name] > $validator[$max])
				{
					$error[] = sprintf($user->lang['SETTING_TOO_BIG'], $user->lang[$config_definition['lang']], $validator[$max]);
				}

				if (strpos($config_name, '_max') !== false)
				{
					// Min/max pairs of settings should ensure that min <= max
					// Replace _max with _min to find the name of the minimum
					// corresponding configuration variable
					$min_name = str_replace('_max', '_min', $config_name);

					if (isset($cfg_array[$min_name]) && is_numeric($cfg_array[$min_name]) && $cfg_array[$config_name] < $cfg_array[$min_name])
					{
						// A minimum value exists and the maximum value is less than it
						$error[] = sprintf($user->lang['SETTING_TOO_LOW'], $user->lang[$config_definition['lang']], (int) $cfg_array[$min_name]);
					}
				}
			break;

			// Absolute path
			case 'script_path':
				if (!$cfg_array[$config_name])
				{
					break;
				}

				$destination = str_replace('\\', '/', $cfg_array[$config_name]);

				if ($destination !== '/')
				{
					// Adjust destination path (no trailing slash)
					if (substr($destination, -1, 1) == '/')
					{
						$destination = substr($destination, 0, -1);
					}

					$destination = str_replace(array('../', './'), '', $destination);

					if ($destination[0] != '/')
					{
						$destination = '/' . $destination;
					}
				}

				$cfg_array[$config_name] = trim($destination);

			break;

			// Absolute path
			case 'lang':
				if (!$cfg_array[$config_name])
				{
					break;
				}

				$cfg_array[$config_name] = basename($cfg_array[$config_name]);

				if (!file_exists($phpbb_root_path . 'language/' . $cfg_array[$config_name] . '/'))
				{
					$error[] = $user->lang['WRONG_DATA_LANG'];
				}
			break;

			// Relative path (appended $phpbb_root_path)
			case 'rpath':
			case 'rwpath':
				if (!$cfg_array[$config_name])
				{
					break;
				}

				$destination = $cfg_array[$config_name];

				// Adjust destination path (no trailing slash)
				if (substr($destination, -1, 1) == '/' || substr($destination, -1, 1) == '\\')
				{
					$destination = substr($destination, 0, -1);
				}

				$destination = str_replace(array('../', '..\\', './', '.\\'), '', $destination);
				if ($destination && ($destination[0] == '/' || $destination[0] == "\\"))
				{
					$destination = '';
				}

				$cfg_array[$config_name] = trim($destination);

			// Path being relative (still prefixed by phpbb_root_path), but with the ability to escape the root dir...
			case 'path':
			case 'wpath':

				if (!$cfg_array[$config_name])
				{
					break;
				}

				$cfg_array[$config_name] = trim($cfg_array[$config_name]);

				// Make sure no NUL byte is present...
				if (strpos($cfg_array[$config_name], "\0") !== false || strpos($cfg_array[$config_name], '%00') !== false)
				{
					$cfg_array[$config_name] = '';
					break;
				}

				if (!file_exists($phpbb_root_path . $cfg_array[$config_name]))
				{
					$error[] = sprintf($user->lang['DIRECTORY_DOES_NOT_EXIST'], $cfg_array[$config_name]);
				}

				if (file_exists($phpbb_root_path . $cfg_array[$config_name]) && !is_dir($phpbb_root_path . $cfg_array[$config_name]))
				{
					$error[] = sprintf($user->lang['DIRECTORY_NOT_DIR'], $cfg_array[$config_name]);
				}

				// Check if the path is writable
				if ($config_definition['validate'] == 'wpath' || $config_definition['validate'] == 'rwpath')
				{
					if (file_exists($phpbb_root_path . $cfg_array[$config_name]) && !phpbb_is_writable($phpbb_root_path . $cfg_array[$config_name]))
					{
						$error[] = sprintf($user->lang['DIRECTORY_NOT_WRITABLE'], $cfg_array[$config_name]);
					}
				}

			break;
		}
	}

	return;
}

/**
* Checks whatever or not a variable is OK for use in the Database
* param mixed $value_ary An array of the form array(array('lang' => ..., 'value' => ..., 'column_type' =>))'
* param mixed $error The error array
*/
function validate_range($value_ary, &$error)
{
	global $user;

	$column_types = array(
		'BOOL'	=> array('php_type' => 'int', 		'min' => 0, 				'max' => 1),
		'USINT'	=> array('php_type' => 'int',		'min' => 0, 				'max' => 65535),
		'UINT'	=> array('php_type' => 'int', 		'min' => 0, 				'max' => (int) 0x7fffffff),
		'INT'	=> array('php_type' => 'int', 		'min' => (int) 0x80000000, 	'max' => (int) 0x7fffffff),
		'TINT'	=> array('php_type' => 'int',		'min' => -128,				'max' => 127),

		'VCHAR'	=> array('php_type' => 'string', 	'min' => 0, 				'max' => 255),
	);
	foreach ($value_ary as $value)
	{
		$column = explode(':', $value['column_type']);
		$max = $min = 0;
		$type = 0;
		if (!isset($column_types[$column[0]]))
		{
			continue;
		}
		else
		{
			$type = $column_types[$column[0]];
		}

		switch ($type['php_type'])
		{
			case 'string' :
				$max = (isset($column[1])) ? min($column[1],$type['max']) : $type['max'];
				if (strlen($value['value']) > $max)
				{
					$error[] = sprintf($user->lang['SETTING_TOO_LONG'], $user->lang[$value['lang']], $max);
				}
			break;

			case 'int':
				$min = (isset($column[1])) ? max($column[1],$type['min']) : $type['min'];
				$max = (isset($column[2])) ? min($column[2],$type['max']) : $type['max'];
				if ($value['value'] < $min)
				{
					$error[] = sprintf($user->lang['SETTING_TOO_LOW'], $user->lang[$value['lang']], $min);
				}
				else if ($value['value'] > $max)
				{
					$error[] = sprintf($user->lang['SETTING_TOO_BIG'], $user->lang[$value['lang']], $max);
				}
			break;
		}
	}
}

?>
/includes/acp/auth.php

Code: Selecteer alles

<?php
/**
*
* @package phpBB3
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

/**
* ACP Permission/Auth class
* @package phpBB3
*/
class auth_admin extends auth
{
	/**
	* Init auth settings
	*/
	function auth_admin()
	{
		global $db, $cache;

		if (($this->acl_options = $cache->get('_acl_options')) === false)
		{
			$sql = 'SELECT auth_option_id, auth_option, is_global, is_local
				FROM ' . ACL_OPTIONS_TABLE . '
				ORDER BY auth_option_id';
			$result = $db->sql_query($sql);

			$global = $local = 0;
			$this->acl_options = array();
			while ($row = $db->sql_fetchrow($result))
			{
				if ($row['is_global'])
				{
					$this->acl_options['global'][$row['auth_option']] = $global++;
				}

				if ($row['is_local'])
				{
					$this->acl_options['local'][$row['auth_option']] = $local++;
				}

				$this->acl_options['id'][$row['auth_option']] = (int) $row['auth_option_id'];
				$this->acl_options['option'][(int) $row['auth_option_id']] = $row['auth_option'];
			}
			$db->sql_freeresult($result);

			$cache->put('_acl_options', $this->acl_options);
		}
	}

	/**
	* Get permission mask
	* This function only supports getting permissions of one type (for example a_)
	*
	* @param set|view $mode defines the permissions we get, view gets effective permissions (checking user AND group permissions), set only gets the user or group permission set alone
	* @param mixed $user_id user ids to search for (a user_id or a group_id has to be specified at least)
	* @param mixed $group_id group ids to search for, return group related settings (a user_id or a group_id has to be specified at least)
	* @param mixed $forum_id forum_ids to search for. Defining a forum id also means getting local settings
	* @param string $auth_option the auth_option defines the permission setting to look for (a_ for example)
	* @param local|global $scope the scope defines the permission scope. If local, a forum_id is additionally required
	* @param ACL_NEVER|ACL_NO|ACL_YES $acl_fill defines the mode those permissions not set are getting filled with
	*/
	function get_mask($mode, $user_id = false, $group_id = false, $forum_id = false, $auth_option = false, $scope = false, $acl_fill = ACL_NEVER)
	{
		global $db, $user;

		$hold_ary = array();
		$view_user_mask = ($mode == 'view' && $group_id === false) ? true : false;

		if ($auth_option === false || $scope === false)
		{
			return array();
		}

		$acl_user_function = ($mode == 'set') ? 'acl_user_raw_data' : 'acl_raw_data';

		if (!$view_user_mask)
		{
			if ($forum_id !== false)
			{
				$hold_ary = ($group_id !== false) ? $this->acl_group_raw_data($group_id, $auth_option . '%', $forum_id) : $this->$acl_user_function($user_id, $auth_option . '%', $forum_id);
			}
			else
			{
				$hold_ary = ($group_id !== false) ? $this->acl_group_raw_data($group_id, $auth_option . '%', ($scope == 'global') ? 0 : false) : $this->$acl_user_function($user_id, $auth_option . '%', ($scope == 'global') ? 0 : false);
			}
		}

		// Make sure hold_ary is filled with every setting (prevents missing forums/users/groups)
		$ug_id = ($group_id !== false) ? ((!is_array($group_id)) ? array($group_id) : $group_id) : ((!is_array($user_id)) ? array($user_id) : $user_id);
		$forum_ids = ($forum_id !== false) ? ((!is_array($forum_id)) ? array($forum_id) : $forum_id) : (($scope == 'global') ? array(0) : array());

		// Only those options we need
		$compare_options = array_diff(preg_replace('/^((?!' . $auth_option . ').+)|(' . $auth_option . ')$/', '', array_keys($this->acl_options[$scope])), array(''));

		// If forum_ids is false and the scope is local we actually want to have all forums within the array
		if ($scope == 'local' && !sizeof($forum_ids))
		{
			$sql = 'SELECT forum_id
				FROM ' . FORUMS_TABLE;
			$result = $db->sql_query($sql, 120);

			while ($row = $db->sql_fetchrow($result))
			{
				$forum_ids[] = (int) $row['forum_id'];
			}
			$db->sql_freeresult($result);
		}

		if ($view_user_mask)
		{
			$auth2 = null;

			$sql = 'SELECT user_id, user_permissions, user_type
				FROM ' . USERS_TABLE . '
				WHERE ' . $db->sql_in_set('user_id', $ug_id);
			$result = $db->sql_query($sql);

			while ($userdata = $db->sql_fetchrow($result))
			{
				if ($user->data['user_id'] != $userdata['user_id'])
				{
					$auth2 = new auth();
					$auth2->acl($userdata);
				}
				else
				{
					global $auth;
					$auth2 = &$auth;
				}


				$hold_ary[$userdata['user_id']] = array();
				foreach ($forum_ids as $f_id)
				{
					$hold_ary[$userdata['user_id']][$f_id] = array();
					foreach ($compare_options as $option)
					{
						$hold_ary[$userdata['user_id']][$f_id][$option] = $auth2->acl_get($option, $f_id);
					}
				}
			}
			$db->sql_freeresult($result);

			unset($userdata);
			unset($auth2);
		}

		foreach ($ug_id as $_id)
		{
			if (!isset($hold_ary[$_id]))
			{
				$hold_ary[$_id] = array();
			}

			foreach ($forum_ids as $f_id)
			{
				if (!isset($hold_ary[$_id][$f_id]))
				{
					$hold_ary[$_id][$f_id] = array();
				}
			}
		}

		// Now, we need to fill the gaps with $acl_fill. ;)

		// Now switch back to keys
		if (sizeof($compare_options))
		{
			$compare_options = array_combine($compare_options, array_fill(1, sizeof($compare_options), $acl_fill));
		}

		// Defining the user-function here to save some memory
		$return_acl_fill = create_function('$value', 'return ' . $acl_fill . ';');

		// Actually fill the gaps
		if (sizeof($hold_ary))
		{
			foreach ($hold_ary as $ug_id => $row)
			{
				foreach ($row as $id => $options)
				{
					// Do not include the global auth_option
					unset($options[$auth_option]);

					// Not a "fine" solution, but at all it's a 1-dimensional
					// array_diff_key function filling the resulting array values with zeros
					// The differences get merged into $hold_ary (all permissions having $acl_fill set)
					$hold_ary[$ug_id][$id] = array_merge($options,

						array_map($return_acl_fill,
							array_flip(
								array_diff(
									array_keys($compare_options), array_keys($options)
								)
							)
						)
					);
				}
			}
		}
		else
		{
			$hold_ary[($group_id !== false) ? $group_id : $user_id][(int) $forum_id] = $compare_options;
		}

		return $hold_ary;
	}

	/**
	* Get permission mask for roles
	* This function only supports getting masks for one role
	*/
	function get_role_mask($role_id)
	{
		global $db;

		$hold_ary = array();

		// Get users having this role set...
		$sql = 'SELECT user_id, forum_id
			FROM ' . ACL_USERS_TABLE . '
			WHERE auth_role_id = ' . $role_id . '
			ORDER BY forum_id';
		$result = $db->sql_query($sql);

		while ($row = $db->sql_fetchrow($result))
		{
			$hold_ary[$row['forum_id']]['users'][] = $row['user_id'];
		}
		$db->sql_freeresult($result);

		// Now grab groups...
		$sql = 'SELECT group_id, forum_id
			FROM ' . ACL_GROUPS_TABLE . '
			WHERE auth_role_id = ' . $role_id . '
			ORDER BY forum_id';
		$result = $db->sql_query($sql);

		while ($row = $db->sql_fetchrow($result))
		{
			$hold_ary[$row['forum_id']]['groups'][] = $row['group_id'];
		}
		$db->sql_freeresult($result);

		return $hold_ary;
	}

	/**
	* Display permission mask (assign to template)
	*/
	function display_mask($mode, $permission_type, &$hold_ary, $user_mode = 'user', $local = false, $group_display = true)
	{
		global $template, $user, $db, $phpbb_root_path, $phpEx;

		// Define names for template loops, might be able to be set
		$tpl_pmask = 'p_mask';
		$tpl_fmask = 'f_mask';
		$tpl_category = 'category';
		$tpl_mask = 'mask';

		$l_acl_type = (isset($user->lang['ACL_TYPE_' . (($local) ? 'LOCAL' : 'GLOBAL') . '_' . strtoupper($permission_type)])) ? $user->lang['ACL_TYPE_' . (($local) ? 'LOCAL' : 'GLOBAL') . '_' . strtoupper($permission_type)] : 'ACL_TYPE_' . (($local) ? 'LOCAL' : 'GLOBAL') . '_' . strtoupper($permission_type);

		// Allow trace for viewing permissions and in user mode
		$show_trace = ($mode == 'view' && $user_mode == 'user') ? true : false;

		// Get names
		if ($user_mode == 'user')
		{
			$sql = 'SELECT user_id as ug_id, username as ug_name
				FROM ' . USERS_TABLE . '
				WHERE ' . $db->sql_in_set('user_id', array_keys($hold_ary)) . '
				ORDER BY username_clean ASC';
		}
		else
		{
			$sql = 'SELECT group_id as ug_id, group_name as ug_name, group_type
				FROM ' . GROUPS_TABLE . '
				WHERE ' . $db->sql_in_set('group_id', array_keys($hold_ary)) . '
				ORDER BY group_type DESC, group_name ASC';
		}
		$result = $db->sql_query($sql);

		$ug_names_ary = array();
		while ($row = $db->sql_fetchrow($result))
		{
			$ug_names_ary[$row['ug_id']] = ($user_mode == 'user') ? $row['ug_name'] : (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['ug_name']] : $row['ug_name']);
		}
		$db->sql_freeresult($result);

		// Get used forums
		$forum_ids = array();
		foreach ($hold_ary as $ug_id => $row)
		{
			$forum_ids = array_merge($forum_ids, array_keys($row));
		}
		$forum_ids = array_unique($forum_ids);

		$forum_names_ary = array();
		if ($local)
		{
			$forum_names_ary = make_forum_select(false, false, true, false, false, false, true);

			// Remove the disabled ones, since we do not create an option field here...
			foreach ($forum_names_ary as $key => $value)
			{
				if (!$value['disabled'])
				{
					continue;
				}
				unset($forum_names_ary[$key]);
			}
		}
		else
		{
			$forum_names_ary[0] = $l_acl_type;
		}

		// Get available roles
		$sql = 'SELECT *
			FROM ' . ACL_ROLES_TABLE . "
			WHERE role_type = '" . $db->sql_escape($permission_type) . "'
			ORDER BY role_order ASC";
		$result = $db->sql_query($sql);

		$roles = array();
		while ($row = $db->sql_fetchrow($result))
		{
			$roles[$row['role_id']] = $row;
		}
		$db->sql_freeresult($result);

		$cur_roles = $this->acl_role_data($user_mode, $permission_type, array_keys($hold_ary));

		// Build js roles array (role data assignments)
		$s_role_js_array = '';

		if (sizeof($roles))
		{
			$s_role_js_array = array();

			// Make sure every role (even if empty) has its array defined
			foreach ($roles as $_role_id => $null)
			{
				$s_role_js_array[$_role_id] = "\n" . 'role_options[' . $_role_id . '] = new Array();' . "\n";
			}

			$sql = 'SELECT r.role_id, o.auth_option, r.auth_setting
				FROM ' . ACL_ROLES_DATA_TABLE . ' r, ' . ACL_OPTIONS_TABLE . ' o
				WHERE o.auth_option_id = r.auth_option_id
					AND ' . $db->sql_in_set('r.role_id', array_keys($roles));
			$result = $db->sql_query($sql);

			while ($row = $db->sql_fetchrow($result))
			{
				$flag = substr($row['auth_option'], 0, strpos($row['auth_option'], '_') + 1);
				if ($flag == $row['auth_option'])
				{
					continue;
				}

				$s_role_js_array[$row['role_id']] .= 'role_options[' . $row['role_id'] . '][\'' . addslashes($row['auth_option']) . '\'] = ' . $row['auth_setting'] . '; ';
			}
			$db->sql_freeresult($result);

			$s_role_js_array = implode('', $s_role_js_array);
		}

		$template->assign_var('S_ROLE_JS_ARRAY', $s_role_js_array);
		unset($s_role_js_array);

		// Now obtain memberships
		$user_groups_default = $user_groups_custom = array();
		if ($user_mode == 'user' && $group_display)
		{
			$sql = 'SELECT group_id, group_name, group_type
				FROM ' . GROUPS_TABLE . '
				ORDER BY group_type DESC, group_name ASC';
			$result = $db->sql_query($sql);

			$groups = array();
			while ($row = $db->sql_fetchrow($result))
			{
				$groups[$row['group_id']] = $row;
			}
			$db->sql_freeresult($result);

			$memberships = group_memberships(false, array_keys($hold_ary), false);

			// User is not a member of any group? Bad admin, bad bad admin...
			if ($memberships)
			{
				foreach ($memberships as $row)
				{
					if ($groups[$row['group_id']]['group_type'] == GROUP_SPECIAL)
					{
						$user_groups_default[$row['user_id']][] = $user->lang['G_' . $groups[$row['group_id']]['group_name']];
					}
					else
					{
						$user_groups_custom[$row['user_id']][] = $groups[$row['group_id']]['group_name'];
					}
				}
			}
			unset($memberships, $groups);
		}

		// If we only have one forum id to display or being in local mode and more than one user/group to display,
		// we switch the complete interface to group by user/usergroup instead of grouping by forum
		// To achieve this, we need to switch the array a bit
		if (sizeof($forum_ids) == 1 || ($local && sizeof($ug_names_ary) > 1))
		{
			$hold_ary_temp = $hold_ary;
			$hold_ary = array();
			foreach ($hold_ary_temp as $ug_id => $row)
			{
				foreach ($forum_names_ary as $forum_id => $forum_row)
				{
					if (isset($row[$forum_id]))
					{
						$hold_ary[$forum_id][$ug_id] = $row[$forum_id];
					}
				}
			}
			unset($hold_ary_temp);

			foreach ($hold_ary as $forum_id => $forum_array)
			{
				$content_array = $categories = array();
				$this->build_permission_array($hold_ary[$forum_id], $content_array, $categories, array_keys($ug_names_ary));

				$template->assign_block_vars($tpl_pmask, array(
					'NAME'			=> ($forum_id == 0) ? $forum_names_ary[0] : $forum_names_ary[$forum_id]['forum_name'],
					'PADDING'		=> ($forum_id == 0) ? '' : $forum_names_ary[$forum_id]['padding'],

					'CATEGORIES'	=> implode('</th><th>', $categories),

					'L_ACL_TYPE'	=> $l_acl_type,

					'S_LOCAL'		=> ($local) ? true : false,
					'S_GLOBAL'		=> (!$local) ? true : false,
					'S_NUM_CATS'	=> sizeof($categories),
					'S_VIEW'		=> ($mode == 'view') ? true : false,
					'S_NUM_OBJECTS'	=> sizeof($content_array),
					'S_USER_MODE'	=> ($user_mode == 'user') ? true : false,
					'S_GROUP_MODE'	=> ($user_mode == 'group') ? true : false)
				);

				@reset($content_array);
				while (list($ug_id, $ug_array) = each($content_array))
				{
					// Build role dropdown options
					$current_role_id = (isset($cur_roles[$ug_id][$forum_id])) ? $cur_roles[$ug_id][$forum_id] : 0;

					$s_role_options = '';

					@reset($roles);
					while (list($role_id, $role_row) = each($roles))
					{
						$role_description = (!empty($user->lang[$role_row['role_description']])) ? $user->lang[$role_row['role_description']] : nl2br($role_row['role_description']);
						$role_name = (!empty($user->lang[$role_row['role_name']])) ? $user->lang[$role_row['role_name']] : $role_row['role_name'];

						$title = ($role_description) ? ' title="' . $role_description . '"' : '';
						$s_role_options .= '<option value="' . $role_id . '"' . (($role_id == $current_role_id) ? ' selected="selected"' : '') . $title . '>' . $role_name . '</option>';
					}

					if ($s_role_options)
					{
						$s_role_options = '<option value="0"' . ((!$current_role_id) ? ' selected="selected"' : '') . ' title="' . htmlspecialchars($user->lang['NO_ROLE_ASSIGNED_EXPLAIN']) . '">' . $user->lang['NO_ROLE_ASSIGNED'] . '</option>' . $s_role_options;
					}

					if (!$current_role_id && $mode != 'view')
					{
						$s_custom_permissions = false;

						foreach ($ug_array as $key => $value)
						{
							if ($value['S_NEVER'] || $value['S_YES'])
							{
								$s_custom_permissions = true;
								break;
							}
						}
					}
					else
					{
						$s_custom_permissions = false;
					}

					$template->assign_block_vars($tpl_pmask . '.' . $tpl_fmask, array(
						'NAME'				=> $ug_names_ary[$ug_id],
						'S_ROLE_OPTIONS'	=> $s_role_options,
						'UG_ID'				=> $ug_id,
						'S_CUSTOM'			=> $s_custom_permissions,
						'FORUM_ID'			=> $forum_id)
					);

					$this->assign_cat_array($ug_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, $show_trace, ($mode == 'view'));

					unset($content_array[$ug_id]);
				}

				unset($hold_ary[$forum_id]);
			}
		}
		else
		{
			foreach ($ug_names_ary as $ug_id => $ug_name)
			{
				if (!isset($hold_ary[$ug_id]))
				{
					continue;
				}

				$content_array = $categories = array();
				$this->build_permission_array($hold_ary[$ug_id], $content_array, $categories, array_keys($forum_names_ary));

				$template->assign_block_vars($tpl_pmask, array(
					'NAME'			=> $ug_name,
					'CATEGORIES'	=> implode('</th><th>', $categories),

					'USER_GROUPS_DEFAULT'	=> ($user_mode == 'user' && isset($user_groups_default[$ug_id]) && sizeof($user_groups_default[$ug_id])) ? implode(', ', $user_groups_default[$ug_id]) : '',
					'USER_GROUPS_CUSTOM'	=> ($user_mode == 'user' && isset($user_groups_custom[$ug_id]) && sizeof($user_groups_custom[$ug_id])) ? implode(', ', $user_groups_custom[$ug_id]) : '',
					'L_ACL_TYPE'			=> $l_acl_type,

					'S_LOCAL'		=> ($local) ? true : false,
					'S_GLOBAL'		=> (!$local) ? true : false,
					'S_NUM_CATS'	=> sizeof($categories),
					'S_VIEW'		=> ($mode == 'view') ? true : false,
					'S_NUM_OBJECTS'	=> sizeof($content_array),
					'S_USER_MODE'	=> ($user_mode == 'user') ? true : false,
					'S_GROUP_MODE'	=> ($user_mode == 'group') ? true : false)
				);

				@reset($content_array);
				while (list($forum_id, $forum_array) = each($content_array))
				{
					// Build role dropdown options
					$current_role_id = (isset($cur_roles[$ug_id][$forum_id])) ? $cur_roles[$ug_id][$forum_id] : 0;

					$s_role_options = '';

					@reset($roles);
					while (list($role_id, $role_row) = each($roles))
					{
						$role_description = (!empty($user->lang[$role_row['role_description']])) ? $user->lang[$role_row['role_description']] : nl2br($role_row['role_description']);
						$role_name = (!empty($user->lang[$role_row['role_name']])) ? $user->lang[$role_row['role_name']] : $role_row['role_name'];

						$title = ($role_description) ? ' title="' . $role_description . '"' : '';
						$s_role_options .= '<option value="' . $role_id . '"' . (($role_id == $current_role_id) ? ' selected="selected"' : '') . $title . '>' . $role_name . '</option>';
					}

					if ($s_role_options)
					{
						$s_role_options = '<option value="0"' . ((!$current_role_id) ? ' selected="selected"' : '') . ' title="' . htmlspecialchars($user->lang['NO_ROLE_ASSIGNED_EXPLAIN']) . '">' . $user->lang['NO_ROLE_ASSIGNED'] . '</option>' . $s_role_options;
					}

					if (!$current_role_id && $mode != 'view')
					{
						$s_custom_permissions = false;

						foreach ($forum_array as $key => $value)
						{
							if ($value['S_NEVER'] || $value['S_YES'])
							{
								$s_custom_permissions = true;
								break;
							}
						}
					}
					else
					{
						$s_custom_permissions = false;
					}

					$template->assign_block_vars($tpl_pmask . '.' . $tpl_fmask, array(
						'NAME'				=> ($forum_id == 0) ? $forum_names_ary[0] : $forum_names_ary[$forum_id]['forum_name'],
						'PADDING'			=> ($forum_id == 0) ? '' : $forum_names_ary[$forum_id]['padding'],
						'S_ROLE_OPTIONS'	=> $s_role_options,
						'S_CUSTOM'			=> $s_custom_permissions,
						'UG_ID'				=> $ug_id,
						'FORUM_ID'			=> $forum_id)
					);

					$this->assign_cat_array($forum_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, $show_trace, ($mode == 'view'));
				}

				unset($hold_ary[$ug_id], $ug_names_ary[$ug_id]);
			}
		}
	}

	/**
	* Display permission mask for roles
	*/
	function display_role_mask(&$hold_ary)
	{
		global $db, $template, $user, $phpbb_root_path, $phpbb_admin_path, $phpEx;

		if (!sizeof($hold_ary))
		{
			return;
		}

		// Get forum names
		$sql = 'SELECT forum_id, forum_name
			FROM ' . FORUMS_TABLE . '
			WHERE ' . $db->sql_in_set('forum_id', array_keys($hold_ary)) . '
			ORDER BY left_id';
		$result = $db->sql_query($sql);

		// If the role is used globally, then reflect that
		$forum_names = (isset($hold_ary[0])) ? array(0 => '') : array();
		while ($row = $db->sql_fetchrow($result))
		{
			$forum_names[$row['forum_id']] = $row['forum_name'];
		}
		$db->sql_freeresult($result);

		foreach ($forum_names as $forum_id => $forum_name)
		{
			$auth_ary = $hold_ary[$forum_id];

			$template->assign_block_vars('role_mask', array(
				'NAME'				=> ($forum_id == 0) ? $user->lang['GLOBAL_MASK'] : $forum_name,
				'FORUM_ID'			=> $forum_id)
			);

			if (isset($auth_ary['users']) && sizeof($auth_ary['users']))
			{
				$sql = 'SELECT user_id, username
					FROM ' . USERS_TABLE . '
					WHERE ' . $db->sql_in_set('user_id', $auth_ary['users']) . '
					ORDER BY username_clean ASC';
				$result = $db->sql_query($sql);

				while ($row = $db->sql_fetchrow($result))
				{
					$template->assign_block_vars('role_mask.users', array(
						'USER_ID'		=> $row['user_id'],
						'USERNAME'		=> $row['username'],
						'U_PROFILE'		=> append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=viewprofile&u={$row['user_id']}"))
					);
				}
				$db->sql_freeresult($result);
			}

			if (isset($auth_ary['groups']) && sizeof($auth_ary['groups']))
			{
				$sql = 'SELECT group_id, group_name, group_type
					FROM ' . GROUPS_TABLE . '
					WHERE ' . $db->sql_in_set('group_id', $auth_ary['groups']) . '
					ORDER BY group_type ASC, group_name';
				$result = $db->sql_query($sql);

				while ($row = $db->sql_fetchrow($result))
				{
					$template->assign_block_vars('role_mask.groups', array(
						'GROUP_ID'		=> $row['group_id'],
						'GROUP_NAME'	=> ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'],
						'U_PROFILE'		=> append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=group&g={$row['group_id']}"))
					);
				}
				$db->sql_freeresult($result);
			}
		}
	}

	/**
	* NOTE: this function is not in use atm
	* Add a new option to the list ... $options is a hash of form ->
	* $options = array(
	*	'local'		=> array('option1', 'option2', ...),
	*	'global'	=> array('optionA', 'optionB', ...)
	* );
	*/
	function acl_add_option($options)
	{
		global $db, $cache;

		if (!is_array($options))
		{
			return false;
		}

		$cur_options = array();

		// Determine current options
		$sql = 'SELECT auth_option, is_global, is_local
			FROM ' . ACL_OPTIONS_TABLE . '
			ORDER BY auth_option_id';
		$result = $db->sql_query($sql);

		while ($row = $db->sql_fetchrow($result))
		{
			$cur_options[$row['auth_option']] = ($row['is_global'] && $row['is_local']) ? 'both' : (($row['is_global']) ? 'global' : 'local');
		}
		$db->sql_freeresult($result);

		// Here we need to insert new options ... this requires discovering whether
		// an options is global, local or both and whether we need to add an permission
		// set flag (x_)
		$new_options = array('local' => array(), 'global' => array());

		foreach ($options as $type => $option_ary)
		{
			$option_ary = array_unique($option_ary);

			foreach ($option_ary as $option_value)
			{
				$new_options[$type][] = $option_value;

				$flag = substr($option_value, 0, strpos($option_value, '_') + 1);

				if (!in_array($flag, $new_options[$type]))
				{
					$new_options[$type][] = $flag;
				}
			}
		}
		unset($options);

		$options = array();
		$options['local'] = array_diff($new_options['local'], $new_options['global']);
		$options['global'] = array_diff($new_options['global'], $new_options['local']);
		$options['both'] = array_intersect($new_options['local'], $new_options['global']);

		// Now check which options to add/update
		$add_options = $update_options = array();

		// First local ones...
		foreach ($options as $type => $option_ary)
		{
			foreach ($option_ary as $option)
			{
				if (!isset($cur_options[$option]))
				{
					$add_options[] = array(
						'auth_option'	=> (string) $option,
						'is_global'		=> ($type == 'global' || $type == 'both') ? 1 : 0,
						'is_local'		=> ($type == 'local' || $type == 'both') ? 1 : 0
					);

					continue;
				}

				// Else, update existing entry if it is changed...
				if ($type === $cur_options[$option])
				{
					continue;
				}

				// New type is always both:
				// If is now both, we set both.
				// If it was global the new one is local and we need to set it to both
				// If it was local the new one is global and we need to set it to both
				$update_options[] = $option;
			}
		}

		if (!empty($add_options))
		{
			$db->sql_multi_insert(ACL_OPTIONS_TABLE, $add_options);
		}

		if (!empty($update_options))
		{
			$sql = 'UPDATE ' . ACL_OPTIONS_TABLE . '
				SET is_global = 1, is_local = 1
				WHERE ' . $db->sql_in_set('auth_option', $update_options);
			$db->sql_query($sql);
		}

		$cache->destroy('_acl_options');
		$this->acl_clear_prefetch();

		// Because we just changed the options and also purged the options cache, we instantly update/regenerate it for later calls to succeed.
		$this->acl_options = array();
		$this->auth_admin();

		return true;
	}

	/**
	* Set a user or group ACL record
	*/
	function acl_set($ug_type, $forum_id, $ug_id, $auth, $role_id = 0, $clear_prefetch = true)
	{
		global $db;

		// One or more forums
		if (!is_array($forum_id))
		{
			$forum_id = array($forum_id);
		}

		// One or more users
		if (!is_array($ug_id))
		{
			$ug_id = array($ug_id);
		}

		$ug_id_sql = $db->sql_in_set($ug_type . '_id', array_map('intval', $ug_id));
		$forum_sql = $db->sql_in_set('forum_id', array_map('intval', $forum_id));

		// Instead of updating, inserting, removing we just remove all current settings and re-set everything...
		$table = ($ug_type == 'user') ? ACL_USERS_TABLE : ACL_GROUPS_TABLE;
		$id_field = $ug_type . '_id';

		// Get any flags as required
		reset($auth);
		$flag = key($auth);
		$flag = substr($flag, 0, strpos($flag, '_') + 1);

		// This ID (the any-flag) is set if one or more permissions are true...
		$any_option_id = (int) $this->acl_options['id'][$flag];

		// Remove any-flag from auth ary
		if (isset($auth[$flag]))
		{
			unset($auth[$flag]);
		}

		// Remove current auth options...
		$auth_option_ids = array((int)$any_option_id);
		foreach ($auth as $auth_option => $auth_setting)
		{
			$auth_option_ids[] = (int) $this->acl_options['id'][$auth_option];
		}

		$sql = "DELETE FROM $table
			WHERE $forum_sql
				AND $ug_id_sql
				AND " . $db->sql_in_set('auth_option_id', $auth_option_ids);
		$db->sql_query($sql);

		// Remove those having a role assigned... the correct type of course...
		$sql = 'SELECT role_id
			FROM ' . ACL_ROLES_TABLE . "
			WHERE role_type = '" . $db->sql_escape($flag) . "'";
		$result = $db->sql_query($sql);

		$role_ids = array();
		while ($row = $db->sql_fetchrow($result))
		{
			$role_ids[] = $row['role_id'];
		}
		$db->sql_freeresult($result);

		if (sizeof($role_ids))
		{
			$sql = "DELETE FROM $table
				WHERE $forum_sql
					AND $ug_id_sql
					AND auth_option_id = 0
					AND " . $db->sql_in_set('auth_role_id', $role_ids);
			$db->sql_query($sql);
		}

		// Ok, include the any-flag if one or more auth options are set to yes...
		foreach ($auth as $auth_option => $setting)
		{
			if ($setting == ACL_YES && (!isset($auth[$flag]) || $auth[$flag] == ACL_NEVER))
			{
				$auth[$flag] = ACL_YES;
			}
		}

		$sql_ary = array();
		foreach ($forum_id as $forum)
		{
			$forum = (int) $forum;

			if ($role_id)
			{
				foreach ($ug_id as $id)
				{
					$sql_ary[] = array(
						$id_field			=> (int) $id,
						'forum_id'			=> (int) $forum,
						'auth_option_id'	=> 0,
						'auth_setting'		=> 0,
						'auth_role_id'		=> (int) $role_id,
					);
				}
			}
			else
			{
				foreach ($auth as $auth_option => $setting)
				{
					$auth_option_id = (int) $this->acl_options['id'][$auth_option];

					if ($setting != ACL_NO)
					{
						foreach ($ug_id as $id)
						{
							$sql_ary[] = array(
								$id_field			=> (int) $id,
								'forum_id'			=> (int) $forum,
								'auth_option_id'	=> (int) $auth_option_id,
								'auth_setting'		=> (int) $setting
							);
						}
					}
				}
			}
		}

		$db->sql_multi_insert($table, $sql_ary);

		if ($clear_prefetch)
		{
			$this->acl_clear_prefetch();
		}
	}

	/**
	* Set a role-specific ACL record
	*/
	function acl_set_role($role_id, $auth)
	{
		global $db;

		// Get any-flag as required
		reset($auth);
		$flag = key($auth);
		$flag = substr($flag, 0, strpos($flag, '_') + 1);

		// Remove any-flag from auth ary
		if (isset($auth[$flag]))
		{
			unset($auth[$flag]);
		}

		// Re-set any flag...
		foreach ($auth as $auth_option => $setting)
		{
			if ($setting == ACL_YES && (!isset($auth[$flag]) || $auth[$flag] == ACL_NEVER))
			{
				$auth[$flag] = ACL_YES;
			}
		}

		$sql_ary = array();
		foreach ($auth as $auth_option => $setting)
		{
			$auth_option_id = (int) $this->acl_options['id'][$auth_option];

			if ($setting != ACL_NO)
			{
				$sql_ary[] = array(
					'role_id'			=> (int) $role_id,
					'auth_option_id'	=> (int) $auth_option_id,
					'auth_setting'		=> (int) $setting
				);
			}
		}

		// If no data is there, we set the any-flag to ACL_NEVER...
		if (!sizeof($sql_ary))
		{
			$sql_ary[] = array(
				'role_id'			=> (int) $role_id,
				'auth_option_id'	=> (int) $this->acl_options['id'][$flag],
				'auth_setting'		=> ACL_NEVER
			);
		}

		// Remove current auth options...
		$sql = 'DELETE FROM ' . ACL_ROLES_DATA_TABLE . '
			WHERE role_id = ' . $role_id;
		$db->sql_query($sql);

		// Now insert the new values
		$db->sql_multi_insert(ACL_ROLES_DATA_TABLE, $sql_ary);

		$this->acl_clear_prefetch();
	}

	/**
	* Remove local permission
	*/
	function acl_delete($mode, $ug_id = false, $forum_id = false, $permission_type = false)
	{
		global $db;

		if ($ug_id === false && $forum_id === false)
		{
			return;
		}

		$option_id_ary = array();
		$table = ($mode == 'user') ? ACL_USERS_TABLE : ACL_GROUPS_TABLE;
		$id_field = $mode . '_id';

		$where_sql = array();

		if ($forum_id !== false)
		{
			$where_sql[] = (!is_array($forum_id)) ? 'forum_id = ' . (int) $forum_id : $db->sql_in_set('forum_id', array_map('intval', $forum_id));
		}

		if ($ug_id !== false)
		{
			$where_sql[] = (!is_array($ug_id)) ? $id_field . ' = ' . (int) $ug_id : $db->sql_in_set($id_field, array_map('intval', $ug_id));
		}

		// There seem to be auth options involved, therefore we need to go through the list and make sure we capture roles correctly
		if ($permission_type !== false)
		{
			// Get permission type
			$sql = 'SELECT auth_option, auth_option_id
				FROM ' . ACL_OPTIONS_TABLE . "
				WHERE auth_option " . $db->sql_like_expression($permission_type . $db->any_char);
			$result = $db->sql_query($sql);

			$auth_id_ary = array();
			while ($row = $db->sql_fetchrow($result))
			{
				$option_id_ary[] = $row['auth_option_id'];
				$auth_id_ary[$row['auth_option']] = ACL_NO;
			}
			$db->sql_freeresult($result);

			// First of all, lets grab the items having roles with the specified auth options assigned
			$sql = "SELECT auth_role_id, $id_field, forum_id
				FROM $table, " . ACL_ROLES_TABLE . " r
				WHERE auth_role_id <> 0
					AND auth_role_id = r.role_id
					AND r.role_type = '{$permission_type}'
					AND " . implode(' AND ', $where_sql) . '
				ORDER BY auth_role_id';
			$result = $db->sql_query($sql);

			$cur_role_auth = array();
			while ($row = $db->sql_fetchrow($result))
			{
				$cur_role_auth[$row['auth_role_id']][$row['forum_id']][] = $row[$id_field];
			}
			$db->sql_freeresult($result);

			// Get role data for resetting data
			if (sizeof($cur_role_auth))
			{
				$sql = 'SELECT ao.auth_option, rd.role_id, rd.auth_setting
					FROM ' . ACL_OPTIONS_TABLE . ' ao, ' . ACL_ROLES_DATA_TABLE . ' rd
					WHERE ao.auth_option_id = rd.auth_option_id
						AND ' . $db->sql_in_set('rd.role_id', array_keys($cur_role_auth));
				$result = $db->sql_query($sql);

				$auth_settings = array();
				while ($row = $db->sql_fetchrow($result))
				{
					// We need to fill all auth_options, else setting it will fail...
					if (!isset($auth_settings[$row['role_id']]))
					{
						$auth_settings[$row['role_id']] = $auth_id_ary;
					}
					$auth_settings[$row['role_id']][$row['auth_option']] = $row['auth_setting'];
				}
				$db->sql_freeresult($result);

				// Set the options
				foreach ($cur_role_auth as $role_id => $auth_row)
				{
					foreach ($auth_row as $f_id => $ug_row)
					{
						$this->acl_set($mode, $f_id, $ug_row, $auth_settings[$role_id], 0, false);
					}
				}
			}
		}

		// Now, normally remove permissions...
		if ($permission_type !== false)
		{
			$where_sql[] = $db->sql_in_set('auth_option_id', array_map('intval', $option_id_ary));
		}

		$sql = "DELETE FROM $table
			WHERE " . implode(' AND ', $where_sql);
		$db->sql_query($sql);

		$this->acl_clear_prefetch();
	}

	/**
	* Assign category to template
	* used by display_mask()
	*/
	function assign_cat_array(&$category_array, $tpl_cat, $tpl_mask, $ug_id, $forum_id, $show_trace = false, $s_view)
	{
		global $template, $user, $phpbb_admin_path, $phpEx;

		@reset($category_array);
		while (list($cat, $cat_array) = each($category_array))
		{
			$template->assign_block_vars($tpl_cat, array(
				'S_YES'		=> ($cat_array['S_YES'] && !$cat_array['S_NEVER'] && !$cat_array['S_NO']) ? true : false,
				'S_NEVER'	=> ($cat_array['S_NEVER'] && !$cat_array['S_YES'] && !$cat_array['S_NO']) ? true : false,
				'S_NO'		=> ($cat_array['S_NO'] && !$cat_array['S_NEVER'] && !$cat_array['S_YES']) ? true : false,

				'CAT_NAME'	=> $user->lang['permission_cat'][$cat])
			);

			/*	Sort permissions by name (more naturaly and user friendly than sorting by a primary key)
			*	Commented out due to it's memory consumption and time needed
			*
			$key_array = array_intersect(array_keys($user->lang), array_map(create_function('$a', 'return "acl_" . $a;'), array_keys($cat_array['permissions'])));
			$values_array = $cat_array['permissions'];

			$cat_array['permissions'] = array();

			foreach ($key_array as $key)
			{
				$key = str_replace('acl_', '', $key);
				$cat_array['permissions'][$key] = $values_array[$key];
			}
			unset($key_array, $values_array);
*/
			@reset($cat_array['permissions']);
			while (list($permission, $allowed) = each($cat_array['permissions']))
			{
				if ($s_view)
				{
					$template->assign_block_vars($tpl_cat . '.' . $tpl_mask, array(
						'S_YES'		=> ($allowed == ACL_YES) ? true : false,
						'S_NEVER'	=> ($allowed == ACL_NEVER) ? true : false,

						'UG_ID'			=> $ug_id,
						'FORUM_ID'		=> $forum_id,
						'FIELD_NAME'	=> $permission,
						'S_FIELD_NAME'	=> 'setting[' . $ug_id . '][' . $forum_id . '][' . $permission . ']',

						'U_TRACE'		=> ($show_trace) ? append_sid("{$phpbb_admin_path}index.$phpEx", "i=permissions&mode=trace&u=$ug_id&f=$forum_id&auth=$permission") : '',
						'UA_TRACE'		=> ($show_trace) ? append_sid("{$phpbb_admin_path}index.$phpEx", "i=permissions&mode=trace&u=$ug_id&f=$forum_id&auth=$permission", false) : '',

						'PERMISSION'	=> $user->lang['acl_' . $permission]['lang'])
					);
				}
				else
				{
					$template->assign_block_vars($tpl_cat . '.' . $tpl_mask, array(
						'S_YES'		=> ($allowed == ACL_YES) ? true : false,
						'S_NEVER'	=> ($allowed == ACL_NEVER) ? true : false,
						'S_NO'		=> ($allowed == ACL_NO) ? true : false,

						'UG_ID'			=> $ug_id,
						'FORUM_ID'		=> $forum_id,
						'FIELD_NAME'	=> $permission,
						'S_FIELD_NAME'	=> 'setting[' . $ug_id . '][' . $forum_id . '][' . $permission . ']',

						'U_TRACE'		=> ($show_trace) ? append_sid("{$phpbb_admin_path}index.$phpEx", "i=permissions&mode=trace&u=$ug_id&f=$forum_id&auth=$permission") : '',
						'UA_TRACE'		=> ($show_trace) ? append_sid("{$phpbb_admin_path}index.$phpEx", "i=permissions&mode=trace&u=$ug_id&f=$forum_id&auth=$permission", false) : '',

						'PERMISSION'	=> $user->lang['acl_' . $permission]['lang'])
					);
				}
			}
		}
	}

	/**
	* Building content array from permission rows with explicit key ordering
	* used by display_mask()
	*/
	function build_permission_array(&$permission_row, &$content_array, &$categories, $key_sort_array)
	{
		global $user;

		foreach ($key_sort_array as $forum_id)
		{
			if (!isset($permission_row[$forum_id]))
			{
				continue;
			}

			$permissions = $permission_row[$forum_id];
			ksort($permissions);

			@reset($permissions);
			while (list($permission, $auth_setting) = each($permissions))
			{
				if (!isset($user->lang['acl_' . $permission]))
				{
					$user->lang['acl_' . $permission] = array(
						'cat'	=> 'misc',
						'lang'	=> '{ acl_' . $permission . ' }'
					);
				}

				$cat = $user->lang['acl_' . $permission]['cat'];

				// Build our categories array
				if (!isset($categories[$cat]))
				{
					$categories[$cat] = $user->lang['permission_cat'][$cat];
				}

				// Build our content array
				if (!isset($content_array[$forum_id]))
				{
					$content_array[$forum_id] = array();
				}

				if (!isset($content_array[$forum_id][$cat]))
				{
					$content_array[$forum_id][$cat] = array(
						'S_YES'			=> false,
						'S_NEVER'		=> false,
						'S_NO'			=> false,
						'permissions'	=> array(),
					);
				}

				$content_array[$forum_id][$cat]['S_YES'] |= ($auth_setting == ACL_YES) ? true : false;
				$content_array[$forum_id][$cat]['S_NEVER'] |= ($auth_setting == ACL_NEVER) ? true : false;
				$content_array[$forum_id][$cat]['S_NO'] |= ($auth_setting == ACL_NO) ? true : false;

				$content_array[$forum_id][$cat]['permissions'][$permission] = $auth_setting;
			}
		}
	}

	/**
	* Use permissions from another user. This transferes a permission set from one user to another.
	* The other user is always able to revert back to his permission set.
	* This function does not check for lower/higher permissions, it is possible for the user to gain
	* "more" permissions by this.
	* Admin permissions will not be copied.
	*/
	function ghost_permissions($from_user_id, $to_user_id)
	{
		global $db;

		if ($to_user_id == ANONYMOUS)
		{
			return false;
		}

		$hold_ary = $this->acl_raw_data_single_user($from_user_id);

		// Key 0 in $hold_ary are global options, all others are forum_ids

		// We disallow copying admin permissions
		foreach ($this->acl_options['global'] as $opt => $id)
		{
			if (strpos($opt, 'a_') === 0)
			{
				$hold_ary[0][$this->acl_options['id'][$opt]] = ACL_NEVER;
			}
		}

		// Force a_switchperm to be allowed
		$hold_ary[0][$this->acl_options['id']['a_switchperm']] = ACL_YES;

		$user_permissions = $this->build_bitstring($hold_ary);

		if (!$user_permissions)
		{
			return false;
		}

		$sql = 'UPDATE ' . USERS_TABLE . "
			SET user_permissions = '" . $db->sql_escape($user_permissions) . "',
				user_perm_from = $from_user_id
			WHERE user_id = " . $to_user_id;
		$db->sql_query($sql);

		return true;
	}
}

?>
Met vriendelijke groet,
Afbeelding
phpBBservice.nl
Steeds tot uw dienst.

AfbeeldingSupport Tools | Afbeelding My Extensions | buy me a beer Afbeelding


Kevin
Vorig TeamLid
Berichten in topic: 4
Berichten: 3559
Lid geworden op: 03 nov 2007 20:36
Verstuurde bedankjes: 5 keren
Ontvangen bedankjes: 8 keren
Contacteer:

Re: Anti Spam ACP 1.0.3-PL1 [phpBB Debug]

Bericht door Kevin » 05 jan 2012 08:59

Dat is redelijk veel maar zou niets uit moeten maken.

Die 2 bestanden zien er goed uit, dan toch even een taalbestandje erbij pakken.
kun je voor ons language/en/acp/permissions_phpbb.php en language/nl/acp/permissions_phpbb.php

Als je ze opent in notepad++ kijk dan ook gelijk even bovenaan in het menu onder knop codering of beide bestanden gecodeerd zijn op "UTF8 zonder bom", dan is dat ook gelijk duidelijk.
Met vriendelijke groeten,
Kevin.

-----------------------------------------------------------------------------------------

Bent u tevreden over onze service?
Dan zouden wij het op prijs stellen als u ons zou willen beoordelen op Afbeelding.

Winnaar in de phpBB.nl awards 2009, 2010 en 2012 met AquaforA

Gebruikersavatar

Auteur
Denise
phpBBservice Teamlid
phpBBservice Teamlid
Berichten in topic: 9
Berichten: 1309
Lid geworden op: 04 jan 2012 13:44
Locatie: 127.0.0.1
Verstuurde bedankjes: 30 keren
Ontvangen bedankjes: 14 keren

Re: Anti Spam ACP 1.0.3-PL1 [phpBB Debug]

Bericht door Denise » 05 jan 2012 12:13

language/en/acp/permissions_phpbb.php

Code: Selecteer alles

<?php
/**
* acp_permissions_phpbb (phpBB Permission Set) [English]
*
* @package language
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/

/**
* DO NOT CHANGE
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

if (empty($lang) || !is_array($lang))
{
	$lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine

/**
*	MODDERS PLEASE NOTE
*
*	You are able to put your permission sets into a separate file too by
*	prefixing the new file with permissions_ and putting it into the acp
*	language folder.
*
*	An example of how the file could look like:
*
*	<code>
*
*	if (empty($lang) || !is_array($lang))
*	{
*		$lang = array();
*	}
*
*	// Adding new category
*	$lang['permission_cat']['bugs'] = 'Bugs';
*
*	// Adding new permission set
*	$lang['permission_type']['bug_'] = 'Bug Permissions';
*
*	// Adding the permissions
*	$lang = array_merge($lang, array(
*		'acl_bug_view'		=> array('lang' => 'Can view bug reports', 'cat' => 'bugs'),
*		'acl_bug_post'		=> array('lang' => 'Can post bugs', 'cat' => 'post'), // Using a phpBB category here
*	));
*
*	</code>
*/

// Define categories and permission types
$lang = array_merge($lang, array(
	'permission_cat'	=> array(
		'actions'		=> 'Actions',
		'content'		=> 'Content',
		'forums'		=> 'Forums',
		'misc'			=> 'Misc',
		'permissions'	=> 'Permissions',
		'pm'			=> 'Private messages',
		'polls'			=> 'Polls',
		'post'			=> 'Post',
		'post_actions'	=> 'Post actions',
		'posting'		=> 'Posting',
		'profile'		=> 'Profile',
		'settings'		=> 'Settings',
		'topic_actions'	=> 'Topic actions',
		'user_group'	=> 'Users & Groups',
	),

	// With defining 'global' here we are able to specify what is printed out if the permission is within the global scope.
	'permission_type'	=> array(
		'u_'			=> 'User permissions',
		'a_'			=> 'Admin permissions',
		'm_'			=> 'Moderator permissions',
		'f_'			=> 'Forum permissions',
		'global'		=> array(
			'm_'			=> 'Global moderator permissions',
		),
	),
));

// User Permissions
$lang = array_merge($lang, array(
	'acl_u_viewprofile'	=> array('lang' => 'Can view profiles, memberlist and online list', 'cat' => 'profile'),
	'acl_u_chgname'		=> array('lang' => 'Can change username', 'cat' => 'profile'),
	'acl_u_chgpasswd'	=> array('lang' => 'Can change password', 'cat' => 'profile'),
	'acl_u_chgemail'	=> array('lang' => 'Can change e-mail address', 'cat' => 'profile'),
	'acl_u_chgavatar'	=> array('lang' => 'Can change avatar', 'cat' => 'profile'),
	'acl_u_chggrp'		=> array('lang' => 'Can change default usergroup', 'cat' => 'profile'),

	'acl_u_attach'		=> array('lang' => 'Can attach files', 'cat' => 'post'),
	'acl_u_download'	=> array('lang' => 'Can download files', 'cat' => 'post'),
	'acl_u_savedrafts'	=> array('lang' => 'Can save drafts', 'cat' => 'post'),
	'acl_u_chgcensors'	=> array('lang' => 'Can disable word censors', 'cat' => 'post'),
	'acl_u_sig'			=> array('lang' => 'Can use signature', 'cat' => 'post'),

	'acl_u_sendpm'		=> array('lang' => 'Can send private messages', 'cat' => 'pm'),
	'acl_u_masspm'		=> array('lang' => 'Can send messages to multiple users', 'cat' => 'pm'),
	'acl_u_masspm_group'=> array('lang' => 'Can send messages to groups', 'cat' => 'pm'),
	'acl_u_readpm'		=> array('lang' => 'Can read private messages', 'cat' => 'pm'),
	'acl_u_pm_edit'		=> array('lang' => 'Can edit own private messages', 'cat' => 'pm'),
	'acl_u_pm_delete'	=> array('lang' => 'Can remove private messages from own folder', 'cat' => 'pm'),
	'acl_u_pm_forward'	=> array('lang' => 'Can forward private messages', 'cat' => 'pm'),
	'acl_u_pm_emailpm'	=> array('lang' => 'Can e-mail private messages', 'cat' => 'pm'),
	'acl_u_pm_printpm'	=> array('lang' => 'Can print private messages', 'cat' => 'pm'),
	'acl_u_pm_attach'	=> array('lang' => 'Can attach files in private messages', 'cat' => 'pm'),
	'acl_u_pm_download'	=> array('lang' => 'Can download files in private messages', 'cat' => 'pm'),
	'acl_u_pm_bbcode'	=> array('lang' => 'Can use BBCode in private messages', 'cat' => 'pm'),
	'acl_u_pm_smilies'	=> array('lang' => 'Can use smilies in private messages', 'cat' => 'pm'),
	'acl_u_pm_img'		=> array('lang' => 'Can use [img] BBCode tag in private messages', 'cat' => 'pm'),
	'acl_u_pm_flash'	=> array('lang' => 'Can use [flash] BBCode tag in private messages', 'cat' => 'pm'),

	'acl_u_sendemail'	=> array('lang' => 'Can send e-mails', 'cat' => 'misc'),
	'acl_u_sendim'		=> array('lang' => 'Can send instant messages', 'cat' => 'misc'),
	'acl_u_ignoreflood'	=> array('lang' => 'Can ignore flood limit', 'cat' => 'misc'),
	'acl_u_hideonline'	=> array('lang' => 'Can hide online status', 'cat' => 'misc'),
	'acl_u_viewonline'	=> array('lang' => 'Can view hidden online users', 'cat' => 'misc'),
	'acl_u_search'		=> array('lang' => 'Can search board', 'cat' => 'misc'),
));

// Forum Permissions
$lang = array_merge($lang, array(
	'acl_f_list'		=> array('lang' => 'Can see forum', 'cat' => 'post'),
	'acl_f_read'		=> array('lang' => 'Can read forum', 'cat' => 'post'),
	'acl_f_post'		=> array('lang' => 'Can start new topics', 'cat' => 'post'),
	'acl_f_reply'		=> array('lang' => 'Can reply to topics', 'cat' => 'post'),
	'acl_f_icons'		=> array('lang' => 'Can use topic/post icons', 'cat' => 'post'),
	'acl_f_announce'	=> array('lang' => 'Can post announcements', 'cat' => 'post'),
	'acl_f_sticky'		=> array('lang' => 'Can post stickies', 'cat' => 'post'),

	'acl_f_poll'		=> array('lang' => 'Can create polls', 'cat' => 'polls'),
	'acl_f_vote'		=> array('lang' => 'Can vote in polls', 'cat' => 'polls'),
	'acl_f_votechg'		=> array('lang' => 'Can change existing vote', 'cat' => 'polls'),

	'acl_f_attach'		=> array('lang' => 'Can attach files', 'cat' => 'content'),
	'acl_f_download'	=> array('lang' => 'Can download files', 'cat' => 'content'),
	'acl_f_sigs'		=> array('lang' => 'Can use signatures', 'cat' => 'content'),
	'acl_f_bbcode'		=> array('lang' => 'Can use BBCode', 'cat' => 'content'),
	'acl_f_smilies'		=> array('lang' => 'Can use smilies', 'cat' => 'content'),
	'acl_f_img'			=> array('lang' => 'Can use [img] BBCode tag', 'cat' => 'content'),
	'acl_f_flash'		=> array('lang' => 'Can use [flash] BBCode tag', 'cat' => 'content'),

	'acl_f_edit'		=> array('lang' => 'Can edit own posts', 'cat' => 'actions'),
	'acl_f_delete'		=> array('lang' => 'Can delete own posts', 'cat' => 'actions'),
	'acl_f_user_lock'	=> array('lang' => 'Can lock own topics', 'cat' => 'actions'),
	'acl_f_bump'		=> array('lang' => 'Can bump topics', 'cat' => 'actions'),
	'acl_f_report'		=> array('lang' => 'Can report posts', 'cat' => 'actions'),
	'acl_f_subscribe'	=> array('lang' => 'Can subscribe forum', 'cat' => 'actions'),
	'acl_f_print'		=> array('lang' => 'Can print topics', 'cat' => 'actions'),
	'acl_f_email'		=> array('lang' => 'Can e-mail topics', 'cat' => 'actions'),

	'acl_f_search'		=> array('lang' => 'Can search the forum', 'cat' => 'misc'),
	'acl_f_ignoreflood' => array('lang' => 'Can ignore flood limit', 'cat' => 'misc'),
	'acl_f_postcount'	=> array('lang' => 'Increment post counter<br /><em>Please note that this setting only affects new posts.</em>', 'cat' => 'misc'),
	'acl_f_noapprove'	=> array('lang' => 'Can post without approval', 'cat' => 'misc'),
));

// Moderator Permissions
$lang = array_merge($lang, array(
	'acl_m_edit'		=> array('lang' => 'Can edit posts', 'cat' => 'post_actions'),
	'acl_m_delete'		=> array('lang' => 'Can delete posts', 'cat' => 'post_actions'),
	'acl_m_approve'		=> array('lang' => 'Can approve posts', 'cat' => 'post_actions'),
	'acl_m_report'		=> array('lang' => 'Can close and delete reports', 'cat' => 'post_actions'),
	'acl_m_chgposter'	=> array('lang' => 'Can change post author', 'cat' => 'post_actions'),

	'acl_m_move'	=> array('lang' => 'Can move topics', 'cat' => 'topic_actions'),
	'acl_m_lock'	=> array('lang' => 'Can lock topics', 'cat' => 'topic_actions'),
	'acl_m_split'	=> array('lang' => 'Can split topics', 'cat' => 'topic_actions'),
	'acl_m_merge'	=> array('lang' => 'Can merge topics', 'cat' => 'topic_actions'),

	'acl_m_info'	=> array('lang' => 'Can view post details', 'cat' => 'misc'),
	'acl_m_warn'	=> array('lang' => 'Can issue warnings<br /><em>This setting is only assigned globally. It is not forum based.</em>', 'cat' => 'misc'), // This moderator setting is only global (and not local)
	'acl_m_ban'		=> array('lang' => 'Can manage bans<br /><em>This setting is only assigned globally. It is not forum based.</em>', 'cat' => 'misc'), // This moderator setting is only global (and not local)
));

// Admin Permissions
$lang = array_merge($lang, array(
	'acl_a_board'		=> array('lang' => 'Can alter board settings/check for updates', 'cat' => 'settings'),
	'acl_a_server'		=> array('lang' => 'Can alter server/communication settings', 'cat' => 'settings'),
	'acl_a_jabber'		=> array('lang' => 'Can alter Jabber settings', 'cat' => 'settings'),
	'acl_a_phpinfo'		=> array('lang' => 'Can view php settings', 'cat' => 'settings'),

	'acl_a_forum'		=> array('lang' => 'Can manage forums', 'cat' => 'forums'),
	'acl_a_forumadd'	=> array('lang' => 'Can add new forums', 'cat' => 'forums'),
	'acl_a_forumdel'	=> array('lang' => 'Can delete forums', 'cat' => 'forums'),
	'acl_a_prune'		=> array('lang' => 'Can prune forums', 'cat' => 'forums'),

	'acl_a_icons'		=> array('lang' => 'Can alter topic/post icons and smilies', 'cat' => 'posting'),
	'acl_a_words'		=> array('lang' => 'Can alter word censors', 'cat' => 'posting'),
	'acl_a_bbcode'		=> array('lang' => 'Can define BBCode tags', 'cat' => 'posting'),
	'acl_a_attach'		=> array('lang' => 'Can alter attachment related settings', 'cat' => 'posting'),

	'acl_a_user'		=> array('lang' => 'Can manage users<br /><em>This also includes seeing the users browser agent within the viewonline list.</em>', 'cat' => 'user_group'),
	'acl_a_userdel'		=> array('lang' => 'Can delete/prune users', 'cat' => 'user_group'),
	'acl_a_group'		=> array('lang' => 'Can manage groups', 'cat' => 'user_group'),
	'acl_a_groupadd'	=> array('lang' => 'Can add new groups', 'cat' => 'user_group'),
	'acl_a_groupdel'	=> array('lang' => 'Can delete groups', 'cat' => 'user_group'),
	'acl_a_ranks'		=> array('lang' => 'Can manage ranks', 'cat' => 'user_group'),
	'acl_a_profile'		=> array('lang' => 'Can manage custom profile fields', 'cat' => 'user_group'),
	'acl_a_names'		=> array('lang' => 'Can manage disallowed names', 'cat' => 'user_group'),
	'acl_a_ban'			=> array('lang' => 'Can manage bans', 'cat' => 'user_group'),

	'acl_a_viewauth'	=> array('lang' => 'Can view permission masks', 'cat' => 'permissions'),
	'acl_a_authgroups'	=> array('lang' => 'Can alter permissions for individual groups', 'cat' => 'permissions'),
	'acl_a_authusers'	=> array('lang' => 'Can alter permissions for individual users', 'cat' => 'permissions'),
	'acl_a_fauth'		=> array('lang' => 'Can alter forum permission class', 'cat' => 'permissions'),
	'acl_a_mauth'		=> array('lang' => 'Can alter moderator permission class', 'cat' => 'permissions'),
	'acl_a_aauth'		=> array('lang' => 'Can alter admin permission class', 'cat' => 'permissions'),
	'acl_a_uauth'		=> array('lang' => 'Can alter user permission class', 'cat' => 'permissions'),
	'acl_a_roles'		=> array('lang' => 'Can manage roles', 'cat' => 'permissions'),
	'acl_a_switchperm'	=> array('lang' => 'Can use others permissions', 'cat' => 'permissions'),

	'acl_a_styles'		=> array('lang' => 'Can manage styles', 'cat' => 'misc'),
	'acl_a_viewlogs'	=> array('lang' => 'Can view logs', 'cat' => 'misc'),
	'acl_a_clearlogs'	=> array('lang' => 'Can clear logs', 'cat' => 'misc'),
	'acl_a_modules'		=> array('lang' => 'Can manage modules', 'cat' => 'misc'),
	'acl_a_language'	=> array('lang' => 'Can manage language packs', 'cat' => 'misc'),
	'acl_a_email'		=> array('lang' => 'Can send mass e-mail', 'cat' => 'misc'),
	'acl_a_bots'		=> array('lang' => 'Can manage bots', 'cat' => 'misc'),
	'acl_a_reasons'		=> array('lang' => 'Can manage report/denial reasons', 'cat' => 'misc'),
	'acl_a_backup'		=> array('lang' => 'Can backup/restore database', 'cat' => 'misc'),
	'acl_a_search'		=> array('lang' => 'Can manage search backends and settings', 'cat' => 'misc'),
	//Begin: National_Flag 
	'acl_a_flags'		=> array('lang' => 'Can manage country flags', 'cat' => 'misc'),
//End: National_Flag 
));

?>
language/nl/acp/permissions_phpbb.php

Code: Selecteer alles

<?php
/**
* acp_permissions (phpBB Permission Set) [Dutch]
*
* @package language
* @version $Id: permissions_phpbb.php,v 1.0.0 2007/01/26 16:09:16 acydburn Exp $
* @copyright (c) 2005 phpBB Group modified by phpBB.nl (vertaalteam@phpbb.nl) in 2007
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/

/**
* DO NOT CHANGE
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

if (empty($lang) || !is_array($lang))
{
	$lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine

/**
*	MODDERS PLEASE NOTE
*
*	You are able to put your permission sets into a separate file too by
*	prefixing the new file with permissions_ and putting it into the acp
*	language folder.
*
*	An example of how the file could look like:
*
*	<code>
*
*	if (empty($lang) || !is_array($lang))
*	{
*		$lang = array();
*	}
*
*	// Adding new category
*	$lang['permission_cat']['bugs'] = 'Bugs';
*
*	// Adding new permission set
*	$lang['permission_type']['bug_'] = 'Bug Permissions';
*
*	// Adding the permissions
*	$lang = array_merge($lang, array(
*		'acl_bug_view'		=> array('lang' => 'Can view bug reports', 'cat' => 'bugs'),
*		'acl_bug_post'		=> array('lang' => 'Can post bugs', 'cat' => 'post'), // Using a phpBB category here
*	));
*
*	</code>
*/

// Define categories and permission types
$lang = array_merge($lang, array(
	'permission_cat'	=> array(
		'actions'		=> 'Acties',
		'content'		=> 'Inhoud',
		'forums'		=> 'Forums',
		'misc'			=> 'Andere',
		'permissions'	=> 'Permissies',
		'pm'			=> 'Privéberichten',
		'polls'			=> 'Polls',
		'post'			=> 'Bericht',
		'post_actions'	=> 'Berichtacties',
		'posting'		=> 'Plaatsen',
		'profile'		=> 'Profiel',
		'settings'		=> 'Instellingen',
		'topic_actions'	=> 'Onderwerpacties',
		'user_group'	=> 'Gebruikers & Groepen',
	),

	// With defining 'global' here we are able to specify what is printed out if the permission is within the global scope.
	'permission_type'	=> array(
		'u_'			=> 'Gebruikerspermissies',
		'a_'			=> 'Beheerderspermissies',
		'm_'			=> 'Moderatorpermissies',
		'f_'			=> 'Forumpermissies',
		'global'		=> array(
			'm_'			=> 'Globale moderatorpermissies',
		),
	),
));

// User Permissions
$lang = array_merge($lang, array(
	'acl_u_viewprofile'	=> array('lang' => 'Kan profielen bekijken, ledenlijst en `wie is er online´ lijst', 'cat' => 'profile'),
	'acl_u_chgname'		=> array('lang' => 'Kan gebruikersnaam wijzigen', 'cat' => 'profile'),
	'acl_u_chgpasswd'	=> array('lang' => 'Kan wachtwoord wijzigen', 'cat' => 'profile'),
	'acl_u_chgemail'	=> array('lang' => 'Kan e-mailadres wijzigen', 'cat' => 'profile'),
	'acl_u_chgavatar'	=> array('lang' => 'Kan avatar wijzigen', 'cat' => 'profile'),
	'acl_u_chggrp'		=> array('lang' => 'Kan standaard gebruikersgroep wijzigen', 'cat' => 'profile'),

	'acl_u_attach'		=> array('lang' => 'Kan bijlagen toevoegen', 'cat' => 'post'),
	'acl_u_download'	=> array('lang' => 'Kan bestanden downloaden', 'cat' => 'post'),
	'acl_u_savedrafts'	=> array('lang' => 'Kan concepten opslaan', 'cat' => 'post'),
	'acl_u_chgcensors'	=> array('lang' => 'Kan censuur uitschakelen', 'cat' => 'post'),
	'acl_u_sig'			=> array('lang' => 'Kan onderschrift gebruiken', 'cat' => 'post'),

	'acl_u_sendpm'		=> array('lang' => 'Kan privéberichten sturen', 'cat' => 'pm'),
	'acl_u_masspm'		=> array('lang' => 'Kan privéberichten naar meerdere gebruikers sturen', 'cat' => 'pm'),
	'acl_u_masspm_group'=> array('lang' => 'Kan privéberichten naar meerdere groepen sturen', 'cat' => 'pm'),
	'acl_u_readpm'		=> array('lang' => 'Kan privéberichten lezen', 'cat' => 'pm'),
	'acl_u_pm_edit'		=> array('lang' => 'Kan eigen privéberichten wijzigen', 'cat' => 'pm'),
	'acl_u_pm_delete'	=> array('lang' => 'Kan privéberichten uit eigen map verwijderen', 'cat' => 'pm'),
	'acl_u_pm_forward'	=> array('lang' => 'Kan privéberichten doorsturen', 'cat' => 'pm'),
	'acl_u_pm_emailpm'	=> array('lang' => 'Kan privéberichten e-mailen', 'cat' => 'pm'),
	'acl_u_pm_printpm'	=> array('lang' => 'Kan privéberichten afdrukken', 'cat' => 'pm'),
	'acl_u_pm_attach'	=> array('lang' => 'Kan bijlagen aan privéberichten toevoegen', 'cat' => 'pm'),
	'acl_u_pm_download'	=> array('lang' => 'Kan bestanden uit privéberichten downloaden', 'cat' => 'pm'),
	'acl_u_pm_bbcode'	=> array('lang' => 'Kan BBCode in privéberichten gebruiken', 'cat' => 'pm'),
	'acl_u_pm_smilies'	=> array('lang' => 'Kan smilies in privéberichten gebruiken', 'cat' => 'pm'),
	'acl_u_pm_img'		=> array('lang' => 'Kan [img] BBCode in privéberichten gebruiken', 'cat' => 'pm'),
	'acl_u_pm_flash'	=> array('lang' => 'Kan [flash] BBCode in privéberichten gebruiken', 'cat' => 'pm'),

	'acl_u_sendemail'	=> array('lang' => 'Kan e-mails versturen', 'cat' => 'misc'),
	'acl_u_sendim'		=> array('lang' => 'Kan IM berichten versturen', 'cat' => 'misc'),
	'acl_u_ignoreflood'	=> array('lang' => 'Kan minimum tijdsinterval overschrijden', 'cat' => 'misc'),
	'acl_u_hideonline'	=> array('lang' => 'Kan online status verbergen', 'cat' => 'misc'),
	'acl_u_viewonline'	=> array('lang' => 'Kan onzichtbare online gebruikers zien', 'cat' => 'misc'),
	'acl_u_search'		=> array('lang' => 'Kan het forum doorzoeken', 'cat' => 'misc'),
));

// Forum Permissions
$lang = array_merge($lang, array(
	'acl_f_list'		=> array('lang' => 'Kan forum zien', 'cat' => 'post'),
	'acl_f_read'		=> array('lang' => 'Kan forum lezen', 'cat' => 'post'),
	'acl_f_post'		=> array('lang' => 'Kan nieuwe onderwerpen openen', 'cat' => 'post'),
	'acl_f_reply'		=> array('lang' => 'Kan reageren op onderwerpen', 'cat' => 'post'),
	'acl_f_icons'		=> array('lang' => 'Kan bericht/onderwerp iconen gebruiken', 'cat' => 'post'),
	'acl_f_announce'	=> array('lang' => 'Kan mededelingen plaatsen', 'cat' => 'post'),
	'acl_f_sticky'		=> array('lang' => 'Kan sticky berichten plaatsen', 'cat' => 'post'),

	'acl_f_poll'		=> array('lang' => 'Kan polls starten', 'cat' => 'polls'),
	'acl_f_vote'		=> array('lang' => 'Kan stemmen op polls', 'cat' => 'polls'),
	'acl_f_votechg'		=> array('lang' => 'Kan zijn huidige stem wijzigen', 'cat' => 'polls'),

	'acl_f_attach'		=> array('lang' => 'Kan bestanden toevoegen', 'cat' => 'content'),
	'acl_f_download'	=> array('lang' => 'Kan bestanden downloaden', 'cat' => 'content'),
	'acl_f_sigs'		=> array('lang' => 'Kan onderschrift gebruiken', 'cat' => 'content'),
	'acl_f_bbcode'		=> array('lang' => 'Kan BBCode gebruiken', 'cat' => 'content'),
	'acl_f_smilies'		=> array('lang' => 'Kan smilies gebruiken', 'cat' => 'content'),
	'acl_f_img'			=> array('lang' => 'Kan [img] BBCode gebruiken', 'cat' => 'content'),
	'acl_f_flash'		=> array('lang' => 'Kan [flash] BBCode gebruiken', 'cat' => 'content'),

	'acl_f_edit'		=> array('lang' => 'Kan eigen berichten wijzigen', 'cat' => 'actions'),
	'acl_f_delete'		=> array('lang' => 'Kan eigen berichten verwijderen', 'cat' => 'actions'),
	'acl_f_user_lock'	=> array('lang' => 'Kan eigen onderwerpen sluiten', 'cat' => 'actions'),
	'acl_f_bump'		=> array('lang' => 'Kan onderwerpen bumpen', 'cat' => 'actions'),
	'acl_f_report'		=> array('lang' => 'Kan berichten melden', 'cat' => 'actions'),
	'acl_f_subscribe'	=> array('lang' => 'Kan abonneren op forums', 'cat' => 'actions'),
	'acl_f_print'		=> array('lang' => 'Kan onderwerpen afdrukken', 'cat' => 'actions'),
	'acl_f_email'		=> array('lang' => 'Kan onderwerpen e-mailen', 'cat' => 'actions'),

	'acl_f_search'		=> array('lang' => 'Kan forums doorzoeken', 'cat' => 'misc'),
	'acl_f_ignoreflood'	=> array('lang' => 'Kan minimum tijdsinterval overschrijden', 'cat' => 'misc'),
	'acl_f_postcount'	=> array('lang' => 'Verhoog berichtenteller<br /><em>Houd er rekening mee dat deze instelling alleen effect heeft op nieuwe berichten.</em>', 'cat' => 'misc'),
	'acl_f_noapprove'	=> array('lang' => 'Kan berichten plaatsen zonder goedkeuring', 'cat' => 'misc'),
));

// Moderator Permissions
$lang = array_merge($lang, array(
	'acl_m_edit'		=> array('lang' => 'Kan berichten wijzigen', 'cat' => 'post_actions'),
	'acl_m_delete'		=> array('lang' => 'Kan berichten verwijderen', 'cat' => 'post_actions'),
	'acl_m_approve'		=> array('lang' => 'Kan berichten goedkeuren', 'cat' => 'post_actions'),
	'acl_m_report'		=> array('lang' => 'Kan meldingen sluiten en verwijderen', 'cat' => 'post_actions'),
	'acl_m_chgposter'	=> array('lang' => 'Kan auteur van bericht wijzigen', 'cat' => 'post_actions'),

	'acl_m_move'	=> array('lang' => 'Kan onderwerpen verplaatsen', 'cat' => 'topic_actions'),
	'acl_m_lock'	=> array('lang' => 'Kan onderwerpen sluiten', 'cat' => 'topic_actions'),
	'acl_m_split'	=> array('lang' => 'Kan onderwerpen splitsen', 'cat' => 'topic_actions'),
	'acl_m_merge'	=> array('lang' => 'Kan onderwerpen samenvoegen', 'cat' => 'topic_actions'),

	'acl_m_info'	=> array('lang' => 'Kan berichtdetail bekijken', 'cat' => 'misc'),
	'acl_m_warn'	=> array('lang' => 'Kan waarschuwingen versturen<br /><em>Deze optie is alleen globaal in te stellen, dus niet per forum.</em>', 'cat' => 'misc'), // This moderator setting is only global (and not local)
	'acl_m_ban'		=> array('lang' => 'Kan bans beheren<br /><em>Deze optie is alleen globaal in te stellen, dus niet per forum.</em>', 'cat' => 'misc'), // This moderator setting is only global (and not local)
));

// Admin Permissions
$lang = array_merge($lang, array(
	'acl_a_board'		=> array('lang' => 'Kan foruminstellingen wijzigen en controleren voor updates', 'cat' => 'settings'),
	'acl_a_server'		=> array('lang' => 'Kan server- en communicatie-instellingen wijzigen', 'cat' => 'settings'),
	'acl_a_jabber'		=> array('lang' => 'Kan Jabber-instellingen wijzigen', 'cat' => 'settings'),
	'acl_a_phpinfo'		=> array('lang' => 'Kan PHP-instellingen bekijken', 'cat' => 'settings'),

	'acl_a_forum'		=> array('lang' => 'Kan forums beheren', 'cat' => 'forums'),
	'acl_a_forumadd'	=> array('lang' => 'Kan nieuwe forums toevoegen', 'cat' => 'forums'),
	'acl_a_forumdel'	=> array('lang' => 'Kan forums verwijderen', 'cat' => 'forums'),
	'acl_a_prune'		=> array('lang' => 'Kan forums opruimen', 'cat' => 'forums'),

	'acl_a_icons'		=> array('lang' => 'Kan bericht/onderwerp iconen en smilies wijzigen', 'cat' => 'posting'),
	'acl_a_words'		=> array('lang' => 'Kan censuur wijzigen', 'cat' => 'posting'),
	'acl_a_bbcode'		=> array('lang' => 'Kan BBCode tags definiëren', 'cat' => 'posting'),
	'acl_a_attach'		=> array('lang' => 'Kan bijlage gerelateerde instellingen wijzigen', 'cat' => 'posting'),

	'acl_a_user'		=> array('lang' => 'Kan gebruikers beheren<br /><em>Dit voegt ook de mogelijkheid toe om de gebruikers browser-agent te zien in de `wie is er online´ lijst.</em>', 'cat' => 'user_group'),
	'acl_a_userdel'		=> array('lang' => 'Kan gebruikers verwijderen/opruimen', 'cat' => 'user_group'),
	'acl_a_group'		=> array('lang' => 'Kan groepen beheren', 'cat' => 'user_group'),
	'acl_a_groupadd'	=> array('lang' => 'Kan nieuwe groepen toevoegen', 'cat' => 'user_group'),
	'acl_a_groupdel'	=> array('lang' => 'Kan groepen verwijderen', 'cat' => 'user_group'),
	'acl_a_ranks'		=> array('lang' => 'Kan rangen beheren', 'cat' => 'user_group'),
	'acl_a_profile'		=> array('lang' => 'Kan aangepaste profielvelden beheren', 'cat' => 'user_group'),
	'acl_a_names'		=> array('lang' => 'Kan geweigerde gebruikersnamen beheren', 'cat' => 'user_group'),
	'acl_a_ban'			=> array('lang' => 'Kan bans beheren', 'cat' => 'user_group'),

	'acl_a_viewauth'	=> array('lang' => 'Kan permissierollen bekijken', 'cat' => 'permissions'),
	'acl_a_authgroups'	=> array('lang' => 'Kan de permissies van individuele groepen wijzigen', 'cat' => 'permissions'),
	'acl_a_authusers'	=> array('lang' => 'Kan de permissies van individuele gebruikers wijzigen', 'cat' => 'permissions'),
	'acl_a_fauth'		=> array('lang' => 'Kan de klasse van forumpermissies wijzigen', 'cat' => 'permissions'),
	'acl_a_mauth'		=> array('lang' => 'Kan de klasse van moderator permissies wijzigen', 'cat' => 'permissions'),
	'acl_a_aauth'		=> array('lang' => 'Kan de klasse van beheerder permissies wijzigen', 'cat' => 'permissions'),
	'acl_a_uauth'		=> array('lang' => 'Kan de klasse van gebruikerspermissies wijzigen', 'cat' => 'permissions'),
	'acl_a_roles'		=> array('lang' => 'Kan rollen beheren', 'cat' => 'permissions'),
	'acl_a_switchperm'	=> array('lang' => 'Kan permissies van anderen gebruiken', 'cat' => 'permissions'),

	'acl_a_styles'		=> array('lang' => 'Kan stijlen beheren', 'cat' => 'misc'),
	'acl_a_viewlogs'	=> array('lang' => 'Kan logs bekijken', 'cat' => 'misc'),
	'acl_a_clearlogs'	=> array('lang' => 'Kan logs legen', 'cat' => 'misc'),
	'acl_a_modules'		=> array('lang' => 'Kan modules beheren', 'cat' => 'misc'),
	'acl_a_language'	=> array('lang' => 'Kan taalpakketten beheren', 'cat' => 'misc'),
	'acl_a_email'		=> array('lang' => 'Kan massa e-mails sturen', 'cat' => 'misc'),
	'acl_a_bots'		=> array('lang' => 'Kan bots beheren', 'cat' => 'misc'),
	'acl_a_reasons'		=> array('lang' => 'Kan meldings- en afkeurredenen beheren', 'cat' => 'misc'),
	'acl_a_backup'		=> array('lang' => 'Kan de database back-uppen en/of terugzetten', 'cat' => 'misc'),
	'acl_a_search'		=> array('lang' => 'Kan de zoekmethodes en -instellingen beheren', 'cat' => 'misc'),
	//Begin: National_Flag 
	'acl_a_flags'		=> array('lang' => 'Kan vlaggen beheren', 'cat' => 'misc'),
//End: National_Flag 
));

?>
Ik heb gekeken onder die knop en die stond geselecteerd op Ansi, (hoe dat nu weer kan)
Ik heb het nu geselecteerd op UTF-8 (zonder BOM)
Met vriendelijke groet,
Afbeelding
phpBBservice.nl
Steeds tot uw dienst.

AfbeeldingSupport Tools | Afbeelding My Extensions | buy me a beer Afbeelding


Kevin
Vorig TeamLid
Berichten in topic: 4
Berichten: 3559
Lid geworden op: 03 nov 2007 20:36
Verstuurde bedankjes: 5 keren
Ontvangen bedankjes: 8 keren
Contacteer:

Re: Anti Spam ACP 1.0.3-PL1 [phpBB Debug]

Bericht door Kevin » 05 jan 2012 21:28

Die lijken ook in orde te zijn. Is het probleem over als je de juiste codering meegeeft, hem opslaat en dan weer upload?
Was het bij beide bestanden het geval of alleen bij de nederlandse?
Met vriendelijke groeten,
Kevin.

-----------------------------------------------------------------------------------------

Bent u tevreden over onze service?
Dan zouden wij het op prijs stellen als u ons zou willen beoordelen op Afbeelding.

Winnaar in de phpBB.nl awards 2009, 2010 en 2012 met AquaforA


Raimon
Vorig TeamLid
Berichten in topic: 4
Berichten: 7673
Lid geworden op: 07 apr 2006 11:10
Locatie: http://www.raimon.nl
Contacteer:

Re: Anti Spam ACP 1.0.3-PL1 [phpBB Debug]

Bericht door Raimon » 06 jan 2012 01:04

Theriddler schreef:Wat ik trouwens ook heb en misschien is dit gerelateerd aan deze foutmelding,
als ik debug aanzet in config.php en ik ga naar algemene permissies >> beheerders en klik in beheerdersgroep op beheerders en dan wijzig permissies dan krijg ik het volgende te zien:

[phpBB Debug] PHP Notice: in file /includes/acp/auth.php on line 1208: Undefined index: instellingen
[phpBB Debug] PHP Notice: in file /includes/acp/auth.php on line 1208: Undefined index: instellingen
[phpBB Debug] PHP Notice: in file /includes/acp/auth.php on line 1208: Undefined index: instellingen
[phpBB Debug] PHP Notice: in file /includes/acp/auth.php on line 1208: Undefined index: instellingen
[phpBB Debug] PHP Notice: in file /includes/acp/auth.php on line 1208: Undefined index: instellingen
[phpBB Debug] PHP Notice: in file /includes/acp/auth.php on line 1208: Undefined index: instellingen
[phpBB Debug] PHP Notice: in file /includes/acp/auth.php on line 1114: Undefined index: instellingen
[phpBB Debug] PHP Notice: in file /adm/index.php on line 150: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 152: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 153: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 154: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
Dat is een fout in het taalpakket van de Anti Spam MOD;

open language/nl/mods/info_asacp.php

zoek:

Code: Selecteer alles

'cat'                  => 'instellingen',
en wijzig dat naar

Code: Selecteer alles

'cat'                  => 'settings',
Voor de actuele fout waarvan je onderwerp hebt gestart, kan je eens het bestand /antispam/spam_words.php plaatsen?
Gratis phpBB installatie of MODs/extensions hulp nodig? Bezoek http://www.raimon.nl/forums/

Gebruikersavatar

Auteur
Denise
phpBBservice Teamlid
phpBBservice Teamlid
Berichten in topic: 9
Berichten: 1309
Lid geworden op: 04 jan 2012 13:44
Locatie: 127.0.0.1
Verstuurde bedankjes: 30 keren
Ontvangen bedankjes: 14 keren

Re: Anti Spam ACP 1.0.3-PL1 [phpBB Debug]

Bericht door Denise » 06 jan 2012 17:50

Kevin schreef:Die lijken ook in orde te zijn. Is het probleem over als je de juiste codering meegeeft, hem opslaat en dan weer upload?
Was het bij beide bestanden het geval of alleen bij de nederlandse?
Ik heb het getest, en idd het leek alleen de nederlandse te zijn. Het probleem met de permissies, is voorbij en opgelost.

Waarvoor Heel veel dank.

Het probleem met de anti spam mod is nog niet voorbij helaas.

Ik kon het bestandje language/nl/mods/info_asacp.php niet vinden
wel kon ik language/nl/mods/info_acp_asacp.php vinden.
daarin heb ik alles ik moest vinden

Code: Selecteer alles

'cat'                  => 'instellingen',
Veranderd naar:

Code: Selecteer alles

'cat'                  => 'settings',
Maar helaas ook na dit blijf ik het onderstaande krijgen:

Code: Selecteer alles

[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /antispam/spam_words.php on line 62: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4625: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4627: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4628: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4629: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
Dit is het bestandje /antispam/spam_words.php

Code: Selecteer alles

<?php
/**
*
* @package Anti-Spam ACP
* @copyright (c) 2008 EXreaction
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

if (!defined('IN_PHPBB'))
{
        exit;
}

class spam_words
{
        public $messages = array();
        public $spam_words = array();
        public $spam_flags = 0; // number of times a message is flagged as spam

        public function __construct()
        {
                global $cache, $db;

                $this->spam_words = $cache->get('_spam_words');
                if ($this->spam_words === false)
                {
                        $this->spam_words = array();
                        $result = $db->sql_query('SELECT * FROM ' . SPAM_WORDS_TABLE);
                        while ($row = $db->sql_fetchrow($result))
                        {
                                if ($row['word_regex_auto'])
                                {
                                        $row['word_text'] = $this->build_regex($row['word_text']);
                                }

                                $this->spam_words[] = $row;
                        }
                        $db->sql_freeresult($result);
                        $cache->put('_spam_words', $this->spam_words);
                }
        }

        public function check_messages()
        {
                if (!sizeof($this->spam_words))
                {
                        return;
                }

                $str_from = array('<', '>', '[', ']', '.', ':');
                $str_to = array('<', '>', '&#91;', '&#93;', '&#46;', '&#58;');

                foreach ($this->messages as $text)
                {
                        $text = str_replace($str_to, $str_from, htmlspecialchars_decode($text));
                        foreach ($this->spam_words as $word)
                        {
                                if ($word['word_regex'] || $word['word_regex_auto'])
                                {
                                        $matches = array();
                                        preg_match_all($word['word_text'], $text, $matches);
                                        if (isset($matches[0]))
                                        {
                                                $this->spam_flags += sizeof($matches[0]);
                                        }
                                }
                                else
                                {
                                        $this->spam_flags += substr_count($text, $word['word_text']);
                                }
                        }
                }
        }

        public function build_regex($text)
        {
                $regex_ary = array(
                        'a'             => 'aA4',
                        'b'             => 'bB8',
                        'e'             => 'eE3',
                        'i'             => 'iI1!',
                        'l'             => 'lL1',
                        'o'             => 'oO0',
                        's'             => 'sS$',
                        't'             => 'tT7',
                        '0'             => 'oO0',
                        '1'             => 'iIlL1!',
                        '3'             => 'eE3',
                        '4'             => 'aA4',
                        '7'             => 'tT7',
                        '8'             => 'bB8',
                        '$'             => 'sS$',
                        ' '             => '([\s\-_+]+)?',
                        '.'             => '\.',
                        ']'             => '\]',
                        '*'             => '\*',
                );

                $len = utf8_strlen($text);
                $new_text = '';
                for ($i = 0; $i < $len; $i++)
                {
                        $char = utf8_strtolower(utf8_substr($text, $i, 1));

                        if (!isset($regex_ary[$char]))
                        {
                                $new_text .= '([' . $char . (($char != utf8_strtoupper($char)) ? utf8_strtoupper($char) : '') . ']+)';
                        }
                        else
                        {
                                $new_text .= (strpos($regex_ary[$char], '([') === false) ? '([' . $regex_ary[$char] . ']+)' : $regex_ary[$char];
                        }
                }

                $endings = array('#', '%', '!', '@', '$', '%', '^', '&', '/', '|');

                foreach ($endings as $ending)
                {
                        if (!strpos($new_text, $ending))
                        {
                                return $ending . $new_text . $ending;
                                break;
                        }
                }
        }

        public function reset()
        {
                $this->messages = array();
                $this->spam = false;
        }
}
?>
De spamwoorden instelling van antispam acp heb ik inmiddels weer uit staan zodat nieuwe leden er geen last van hebben.
Met vriendelijke groet,
Afbeelding
phpBBservice.nl
Steeds tot uw dienst.

AfbeeldingSupport Tools | Afbeelding My Extensions | buy me a beer Afbeelding

Gesloten