mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
- more acp additions and changes...
git-svn-id: file:///svn/phpbb/trunk@5310 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
9f1f945d5d
commit
0202eb8a66
18 changed files with 1477 additions and 57 deletions
|
@ -49,6 +49,7 @@ class acp_attachments
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->tpl_name = 'acp_attachments';
|
$this->tpl_name = 'acp_attachments';
|
||||||
|
$this->page_title = $l_title;
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'L_TITLE' => $user->lang[$l_title],
|
'L_TITLE' => $user->lang[$l_title],
|
||||||
|
@ -117,7 +118,7 @@ class acp_attachments
|
||||||
|
|
||||||
if ($submit)
|
if ($submit)
|
||||||
{
|
{
|
||||||
add_log('admin', 'LOG_' . strtoupper($mode) . '_CONFIG');
|
add_log('admin', 'LOG_CONFIG_ATTACH');
|
||||||
|
|
||||||
// Check Settings
|
// Check Settings
|
||||||
$this->test_upload($error, $new['upload_path'], false);
|
$this->test_upload($error, $new['upload_path'], false);
|
||||||
|
@ -1077,7 +1078,7 @@ class acp_attachments
|
||||||
);
|
);
|
||||||
|
|
||||||
$message_parser->filename_data['filecomment'] = '';
|
$message_parser->filename_data['filecomment'] = '';
|
||||||
$filedata['post_attach'] = FALSE;
|
$filedata['post_attach'] = false;
|
||||||
|
|
||||||
// Submit Attachment
|
// Submit Attachment
|
||||||
$attach_sql = $message_parser->attachment_data;
|
$attach_sql = $message_parser->attachment_data;
|
||||||
|
|
356
phpBB/includes/acp/acp_bbcodes.php
Normal file
356
phpBB/includes/acp/acp_bbcodes.php
Normal file
|
@ -0,0 +1,356 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @package acp
|
||||||
|
* @version $Id$
|
||||||
|
* @copyright (c) 2005 phpBB Group
|
||||||
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package acp
|
||||||
|
*/
|
||||||
|
class acp_bbcodes
|
||||||
|
{
|
||||||
|
function main($id, $mode)
|
||||||
|
{
|
||||||
|
global $db, $user, $auth, $template, $cache;
|
||||||
|
global $config, $SID, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||||
|
|
||||||
|
$user->add_lang('acp/posting');
|
||||||
|
|
||||||
|
// Set up general vars
|
||||||
|
$action = request_var('action', '');
|
||||||
|
$bbcode_id = request_var('bbcode', 0);
|
||||||
|
|
||||||
|
$this->tpl_name = 'acp_bbcodes';
|
||||||
|
|
||||||
|
$u_action = "{$phpbb_admin_path}index.$phpEx$SID&i=$id&mode=$mode";
|
||||||
|
|
||||||
|
// Set up mode-specific vars
|
||||||
|
switch ($action)
|
||||||
|
{
|
||||||
|
case 'add':
|
||||||
|
$bbcode_match = $bbcode_tpl = '';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'edit':
|
||||||
|
$sql = 'SELECT bbcode_match, bbcode_tpl
|
||||||
|
FROM ' . BBCODES_TABLE . '
|
||||||
|
WHERE bbcode_id = ' . $bbcode_id;
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
if (!$row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
trigger_error('BBCODE_NOT_EXIST');
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
$bbcode_match = $row['bbcode_match'];
|
||||||
|
$bbcode_tpl = htmlspecialchars($row['bbcode_tpl']);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'modify':
|
||||||
|
$sql = 'SELECT bbcode_id
|
||||||
|
FROM ' . BBCODES_TABLE . '
|
||||||
|
WHERE bbcode_id = ' . $bbcode_id;
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
if (!$row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
trigger_error('BBCODE_NOT_EXIST');
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
// No break here
|
||||||
|
|
||||||
|
case 'create':
|
||||||
|
$bbcode_match = (isset($_POST['bbcode_match'])) ? htmlspecialchars(stripslashes($_POST['bbcode_match'])) : '';
|
||||||
|
$bbcode_tpl = (isset($_POST['bbcode_tpl'])) ? stripslashes($_POST['bbcode_tpl']) : '';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Do major work
|
||||||
|
switch ($action)
|
||||||
|
{
|
||||||
|
case 'edit':
|
||||||
|
case 'add':
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'S_EDIT_BBCODE' => true,
|
||||||
|
'U_BACK' => $u_action,
|
||||||
|
'U_ACTION' => $u_action . '&action=' . (($action == 'add') ? 'create' : 'modify') . (($bbcode_id) ? "&bbcode=$bbcode_id" : ''),
|
||||||
|
|
||||||
|
'BBCODE_MATCH' => $bbcode_match,
|
||||||
|
'BBCODE_TPL' => $bbcode_tpl,
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach ($user->lang['tokens'] as $token => $token_explain)
|
||||||
|
{
|
||||||
|
$template->assign_block_vars('token', array(
|
||||||
|
'TOKEN' => '{' . $token . '}',
|
||||||
|
'EXPLAIN' => $token_explain)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'modify':
|
||||||
|
case 'create':
|
||||||
|
|
||||||
|
$data = $this->build_regexp($bbcode_match, $bbcode_tpl);
|
||||||
|
|
||||||
|
$sql_ary = array(
|
||||||
|
'bbcode_tag' => $data['bbcode_tag'],
|
||||||
|
'bbcode_match' => $bbcode_match,
|
||||||
|
'bbcode_tpl' => $bbcode_tpl,
|
||||||
|
'first_pass_match' => $data['first_pass_match'],
|
||||||
|
'first_pass_replace' => $data['first_pass_replace'],
|
||||||
|
'second_pass_match' => $data['second_pass_match'],
|
||||||
|
'second_pass_replace' => $data['second_pass_replace']
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($action == 'create')
|
||||||
|
{
|
||||||
|
$sql = 'SELECT MAX(bbcode_id) as bbcode_id
|
||||||
|
FROM ' . BBCODES_TABLE;
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
$row = $db->sql_fetchrow($result);
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
if ($row)
|
||||||
|
{
|
||||||
|
$bbcode_id = $row['bbcode_id'] + 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$sql = 'SELECT MIN(bbcode_id) AS min_id, MAX(bbcode_id) AS max_id
|
||||||
|
FROM ' . BBCODES_TABLE;
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
$row = $db->sql_fetchrow($result);
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
if (empty($row['min_id']) || $row['min_id'] >= NUM_CORE_BBCODES)
|
||||||
|
{
|
||||||
|
$bbcode_id = NUM_CORE_BBCODES + 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$bbcode_id = $row['max_id'] + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($bbcode_id > 31)
|
||||||
|
{
|
||||||
|
trigger_error('TOO_MANY_BBCODES');
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql_ary['bbcode_id'] = (int) $bbcode_id;
|
||||||
|
|
||||||
|
$db->sql_query('INSERT INTO ' . BBCODES_TABLE . $db->sql_build_array('INSERT', $sql_ary));
|
||||||
|
$lang = 'BBCODE_ADDED';
|
||||||
|
$log_action = 'LOG_BBCODE_ADD';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$db->sql_query('UPDATE ' . BBCODES_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' WHERE bbcode_id = ' . $bbcode_id);
|
||||||
|
$lang = 'BBCODE_EDITED';
|
||||||
|
$log_action = 'LOG_BBCODE_EDIT';
|
||||||
|
}
|
||||||
|
|
||||||
|
add_log('admin', $log_action, $data['bbcode_tag']);
|
||||||
|
|
||||||
|
trigger_error($user->lang[$lang] . adm_back_link($u_action));
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'delete':
|
||||||
|
$sql = 'SELECT bbcode_tag
|
||||||
|
FROM ' . BBCODES_TABLE . "
|
||||||
|
WHERE bbcode_id = $bbcode_id";
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
if ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
$db->sql_query('DELETE FROM ' . BBCODES_TABLE . " WHERE bbcode_id = $bbcode_id");
|
||||||
|
add_log('admin', 'LOG_BBCODE_DELETE', $row['bbcode_tag']);
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'U_ACTION' => $u_action . '&mode=add')
|
||||||
|
);
|
||||||
|
|
||||||
|
$sql = 'SELECT *
|
||||||
|
FROM ' . BBCODES_TABLE . '
|
||||||
|
ORDER BY bbcode_id';
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
while ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
$template->assign_block_vars('bbcodes', array(
|
||||||
|
'BBCODE_TAG' => $row['bbcode_tag'],
|
||||||
|
'U_EDIT' => $u_action . '&action=edit&bbcode=' . $row['bbcode_id'],
|
||||||
|
'U_DELETE' => $u_action . '&action=delete&bbcode=' . $row['bbcode_id'])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Build regular expression for custom bbcode
|
||||||
|
*/
|
||||||
|
function build_regexp($msg_bbcode, $msg_html)
|
||||||
|
{
|
||||||
|
$msg_bbcode = trim($msg_bbcode);
|
||||||
|
$msg_html = trim($msg_html);
|
||||||
|
|
||||||
|
$fp_match = preg_quote($msg_bbcode, '!');
|
||||||
|
$fp_replace = preg_replace('#^\[(.*?)\]#', '[$1:$uid]', $msg_bbcode);
|
||||||
|
$fp_replace = preg_replace('#\[/(.*?)\]$#', '[/$1:$uid]', $fp_replace);
|
||||||
|
|
||||||
|
$sp_match = preg_quote($msg_bbcode, '!');
|
||||||
|
$sp_match = preg_replace('#^\\\\\[(.*?)\\\\\]#', '\[$1:$uid\]', $sp_match);
|
||||||
|
$sp_match = preg_replace('#\\\\\[/(.*?)\\\\\]$#', '\[/$1:$uid\]', $sp_match);
|
||||||
|
$sp_replace = $msg_html;
|
||||||
|
|
||||||
|
// @todo Make sure to change this too if something changed in message parsing
|
||||||
|
$tokens = array(
|
||||||
|
'URL' => array(
|
||||||
|
'!([a-z0-9]+://)?([^?].*?[^ \t\n\r<"]*)!ie' => "(('\$1') ? '\$1\$2' : 'http://\$2')"
|
||||||
|
),
|
||||||
|
'LOCAL_URL' => array(
|
||||||
|
'!([^:]+/[^ \t\n\r<"]*)!' => '$1'
|
||||||
|
),
|
||||||
|
'EMAIL' => array(
|
||||||
|
'!([a-z0-9]+[a-z0-9\-\._]*@(?:(?:[0-9]{1,3}\.){3,5}[0-9]{1,3}|[a-z0-9]+[a-z0-9\-\._]*\.[a-z]+))!i' => '$1'
|
||||||
|
),
|
||||||
|
'TEXT' => array(
|
||||||
|
'!(.*?)!es' => "str_replace('\\\"', '"', str_replace('\\'', ''', '\$1'))"
|
||||||
|
),
|
||||||
|
'COLOR' => array(
|
||||||
|
'!([a-z]+|#[0-9abcdef]+!i' => '$1'
|
||||||
|
),
|
||||||
|
'NUMBER' => array(
|
||||||
|
'!([0-9]+)!' => '$1'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (preg_match_all('/\{(' . implode('|', array_keys($tokens)) . ')[0-9]*\}/i', $msg_bbcode, $m))
|
||||||
|
{
|
||||||
|
$pad = 0;
|
||||||
|
$modifiers = 'i';
|
||||||
|
|
||||||
|
foreach ($m[0] as $n => $token)
|
||||||
|
{
|
||||||
|
$token_type = $m[1][$n];
|
||||||
|
|
||||||
|
reset($tokens[$token_type]);
|
||||||
|
list($match, $replace) = each($tokens[$token_type]);
|
||||||
|
|
||||||
|
// Pad backreference numbers from tokens
|
||||||
|
if (preg_match_all('/(?<!\\\\)\$([0-9]+)/', $replace, $repad))
|
||||||
|
{
|
||||||
|
$repad = $pad + sizeof(array_unique($repad[0]));
|
||||||
|
$replace = preg_replace('/(?<!\\\\)\$([0-9]+)/e', "'\$' . (\$1 + \$pad)", $replace);
|
||||||
|
$pad = $repad;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Obtain pattern modifiers to use and alter the regex accordingly
|
||||||
|
$regex = preg_replace('/!(.*)!([a-z]*)/', '$1', $match);
|
||||||
|
$regex_modifiers = preg_replace('/!(.*)!([a-z]*)/', '$2', $match);
|
||||||
|
|
||||||
|
for ($i = 0, $size = strlen($regex_modifiers); $i < $size; ++$i)
|
||||||
|
{
|
||||||
|
if (strpos($modifiers, $regex_modifiers[$i]) === false)
|
||||||
|
{
|
||||||
|
$modifiers .= $regex_modifiers[$i];
|
||||||
|
|
||||||
|
if ($regex_modifiers[$i] == 'e')
|
||||||
|
{
|
||||||
|
$fp_replace = "'" . str_replace("'", "\\'", $fp_replace) . "'";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($regex_modifiers[$i] == 'e')
|
||||||
|
{
|
||||||
|
$replace = "'.$replace.'";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$fp_match = str_replace(preg_quote($token, '!'), $regex, $fp_match);
|
||||||
|
$fp_replace = str_replace($token, $replace, $fp_replace);
|
||||||
|
|
||||||
|
$sp_match = str_replace(preg_quote($token, '!'), '(.*?)', $sp_match);
|
||||||
|
$sp_replace = str_replace($token, '$' . ($n + 1), $sp_replace);
|
||||||
|
}
|
||||||
|
|
||||||
|
$fp_match = '!' . $fp_match . '!' . $modifiers;
|
||||||
|
$sp_match = '!' . $sp_match . '!s';
|
||||||
|
|
||||||
|
if (strpos($fp_match, 'e') !== false)
|
||||||
|
{
|
||||||
|
$fp_replace = str_replace("'.'", '', $fp_replace);
|
||||||
|
$fp_replace = str_replace(".''.", '.', $fp_replace);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// No replacement is present, no need for a second-pass pattern replacement
|
||||||
|
// A simple str_replace will suffice
|
||||||
|
$fp_match = '!' . $fp_match . '!' . $modifiers;
|
||||||
|
$sp_match = $fp_replace;
|
||||||
|
$sp_replace = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Lowercase tags
|
||||||
|
$bbcode_tag = preg_replace('/.*?\[([a-z]+).*/i', '$1', $msg_bbcode);
|
||||||
|
$fp_match = preg_replace('#\[/?' . $bbcode_tag . '#ie', "strtolower('\$0')", $fp_match);
|
||||||
|
$fp_replace = preg_replace('#\[/?' . $bbcode_tag . '#ie', "strtolower('\$0')", $fp_replace);
|
||||||
|
$sp_match = preg_replace('#\[/?' . $bbcode_tag . '#ie', "strtolower('\$0')", $sp_match);
|
||||||
|
$sp_replace = preg_replace('#\[/?' . $bbcode_tag . '#ie', "strtolower('\$0')", $sp_replace);
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'bbcode_tag' => $bbcode_tag,
|
||||||
|
'first_pass_match' => $fp_match,
|
||||||
|
'first_pass_replace' => $fp_replace,
|
||||||
|
'second_pass_match' => $sp_match,
|
||||||
|
'second_pass_replace' => $sp_replace
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package module_install
|
||||||
|
*/
|
||||||
|
class acp_bbcodes_info
|
||||||
|
{
|
||||||
|
function module()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'filename' => 'acp_bbcodes',
|
||||||
|
'title' => 'ACP_BBCODES',
|
||||||
|
'version' => '1.0.0',
|
||||||
|
'modes' => array(
|
||||||
|
'bbcodes' => array('title' => 'ACP_BBCODES', 'auth' => 'acl_a_bbcode'),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function install()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
function uninstall()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
|
@ -282,12 +282,13 @@ class acp_board
|
||||||
|
|
||||||
if ($submit)
|
if ($submit)
|
||||||
{
|
{
|
||||||
add_log('admin', 'LOG_' . strtoupper($mode) . '_CONFIG');
|
add_log('admin', 'LOG_CONFIG_' . strtoupper($mode));
|
||||||
|
|
||||||
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($u_action));
|
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($u_action));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->tpl_name = 'acp_board';
|
$this->tpl_name = 'acp_board';
|
||||||
|
$this->page_title = $display_vars['title'];
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'L_TITLE' => $user->lang[$display_vars['title']],
|
'L_TITLE' => $user->lang[$display_vars['title']],
|
||||||
|
@ -526,7 +527,7 @@ class acp_board_info
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
'filename' => 'acp_board',
|
'filename' => 'acp_board',
|
||||||
'title' => 'Board Management',
|
'title' => 'ACP_BOARD_MANAGEMENT',
|
||||||
'version' => '1.0.0',
|
'version' => '1.0.0',
|
||||||
'modes' => array(
|
'modes' => array(
|
||||||
'auth' => array('title' => 'ACP_AUTH_SETTINGS', 'auth' => 'acl_a_server'),
|
'auth' => array('title' => 'ACP_AUTH_SETTINGS', 'auth' => 'acl_a_server'),
|
||||||
|
|
|
@ -32,6 +32,7 @@ class acp_bots
|
||||||
|
|
||||||
$user->add_lang('acp/bots');
|
$user->add_lang('acp/bots');
|
||||||
$this->tpl_name = 'acp_bots';
|
$this->tpl_name = 'acp_bots';
|
||||||
|
$this->page_title = 'ACP_BOTS';
|
||||||
|
|
||||||
$u_action = "{$phpbb_admin_path}index.$phpEx$SID&i=$id&mode=$mode";
|
$u_action = "{$phpbb_admin_path}index.$phpEx$SID&i=$id&mode=$mode";
|
||||||
|
|
||||||
|
|
665
phpBB/includes/acp/acp_icons.php
Normal file
665
phpBB/includes/acp/acp_icons.php
Normal file
|
@ -0,0 +1,665 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @package acp
|
||||||
|
* @version $Id$
|
||||||
|
* @copyright (c) 2005 phpBB Group
|
||||||
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package acp
|
||||||
|
* @todo [smilies] check regular expressions for special char replacements (stored specialchared in db)
|
||||||
|
*/
|
||||||
|
class acp_icons
|
||||||
|
{
|
||||||
|
function main($id, $mode)
|
||||||
|
{
|
||||||
|
global $db, $user, $auth, $template, $cache;
|
||||||
|
global $config, $SID, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||||
|
|
||||||
|
$user->add_lang('acp/posting');
|
||||||
|
|
||||||
|
// Set up general vars
|
||||||
|
$action = request_var('action', '');
|
||||||
|
$action = (isset($_POST['add'])) ? 'add' : $action;
|
||||||
|
$action = (isset($_POST['edit'])) ? 'edit' : $action;
|
||||||
|
$icon_id = request_var('id', 0);
|
||||||
|
|
||||||
|
$this->tpl_name = 'acp_icons';
|
||||||
|
|
||||||
|
$u_action = "{$phpbb_admin_path}index.$phpEx$SID&i=$id&mode=$mode";
|
||||||
|
|
||||||
|
// What are we working on?
|
||||||
|
switch ($mode)
|
||||||
|
{
|
||||||
|
case 'smilies':
|
||||||
|
$table = SMILIES_TABLE;
|
||||||
|
$lang = 'SMILIES';
|
||||||
|
$fields = 'smiley';
|
||||||
|
$img_path = $config['smilies_path'];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'icons':
|
||||||
|
$table = ICONS_TABLE;
|
||||||
|
$lang = 'ICONS';
|
||||||
|
$fields = 'icons';
|
||||||
|
$img_path = $config['icons_path'];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->page_title = 'ACP_' . $lang;
|
||||||
|
|
||||||
|
// Clear some arrays
|
||||||
|
$_images = $_paks = array();
|
||||||
|
$notice = '';
|
||||||
|
|
||||||
|
// Grab file list of paks and images
|
||||||
|
if ($action == 'edit' || $action == 'add' || $action == 'import')
|
||||||
|
{
|
||||||
|
$imglist = filelist($phpbb_root_path . $img_path, '');
|
||||||
|
|
||||||
|
foreach ($imglist as $path => $img_ary)
|
||||||
|
{
|
||||||
|
foreach ($img_ary as $img)
|
||||||
|
{
|
||||||
|
$img_size = @getimagesize($phpbb_root_path . $img_path . '/' . $path . $img);
|
||||||
|
|
||||||
|
if (!$img_size[0] || !$img_size[1])
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$_images[$path . $img]['file'] = $path . $img;
|
||||||
|
$_images[$path . $img]['width'] = $img_size[0];
|
||||||
|
$_images[$path . $img]['height'] = $img_size[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
unset($imglist);
|
||||||
|
|
||||||
|
$dir = @opendir($phpbb_root_path . $img_path);
|
||||||
|
while ($file = @readdir($dir))
|
||||||
|
{
|
||||||
|
if (is_file($phpbb_root_path . $img_path . '/' . $file) && preg_match('#\.pak$#i', $file))
|
||||||
|
{
|
||||||
|
$_paks[] = $file;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@closedir($dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
// What shall we do today? Oops, I believe that's trademarked ...
|
||||||
|
switch ($action)
|
||||||
|
{
|
||||||
|
case 'edit':
|
||||||
|
unset($_images);
|
||||||
|
$_images = array();
|
||||||
|
|
||||||
|
case 'add':
|
||||||
|
|
||||||
|
$order_list = '';
|
||||||
|
|
||||||
|
$sql = "SELECT *
|
||||||
|
FROM $table
|
||||||
|
ORDER BY {$fields}_order " . (($icon_id || $action == 'add') ? 'DESC' : 'ASC');
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
if ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
do
|
||||||
|
{
|
||||||
|
if ($action == 'add')
|
||||||
|
{
|
||||||
|
unset($_images[$row[$fields . '_url']]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($row[$fields . '_id'] == $icon_id)
|
||||||
|
{
|
||||||
|
$after = true;
|
||||||
|
$data[$row[$fields . '_url']] = $row;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($action == 'edit' && !$icon_id)
|
||||||
|
{
|
||||||
|
$data[$row[$fields . '_url']] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
$selected = '';
|
||||||
|
if (!empty($after))
|
||||||
|
{
|
||||||
|
$selected = ' selected="selected"';
|
||||||
|
$after = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$after_txt = ($mode == 'smilies') ? $row['code'] : $row['icons_url'];
|
||||||
|
$order_list = '<option value="' . ($row[$fields . '_order']) . '"' . $selected . '>' . sprintf($user->lang['AFTER_' . $lang], ' -> ' . htmlspecialchars($after_txt)) . '</option>' . $order_list;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while ($row = $db->sql_fetchrow($result));
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
$order_list = '<option value="1"' . ((!isset($after)) ? ' selected="selected"' : '') . '>' . $user->lang['FIRST'] . '</option>' . $order_list;
|
||||||
|
|
||||||
|
if ($action == 'add')
|
||||||
|
{
|
||||||
|
$data = $_images;
|
||||||
|
}
|
||||||
|
|
||||||
|
$colspan = (($mode == 'smilies') ? '7' : '5');
|
||||||
|
$colspan += ($icon_id) ? 1 : 0;
|
||||||
|
$colspan += ($action == 'add') ? 2 : 0;
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'S_EDIT' => true,
|
||||||
|
'S_SMILIES' => ($mode == 'smilies') ? true : false,
|
||||||
|
'S_ADD' => ($action == 'add') ? true : false,
|
||||||
|
'S_ORDER_LIST' => $order_list,
|
||||||
|
|
||||||
|
'L_TITLE' => $user->lang['ACP_' . $lang],
|
||||||
|
'L_EXPLAIN' => $user->lang['ACP_' . $lang . '_EXPLAIN'],
|
||||||
|
'L_CONFIG' => $user->lang[$lang . '_CONFIG'],
|
||||||
|
'L_URL' => $user->lang[$lang . '_URL'],
|
||||||
|
'L_LOCATION' => $user->lang[$lang . '_LOCATION'],
|
||||||
|
'L_WIDTH' => $user->lang[$lang . '_WIDTH'],
|
||||||
|
'L_HEIGHT' => $user->lang[$lang . '_HEIGHT'],
|
||||||
|
'L_ORDER' => $user->lang[$lang . '_ORDER'],
|
||||||
|
|
||||||
|
'COLSPAN' => $colspan,
|
||||||
|
'ID' => $icon_id,
|
||||||
|
|
||||||
|
'U_BACK' => $u_action,
|
||||||
|
'U_ACTION' => $u_action . '&action=' . (($action == 'add') ? 'create' : 'modify'),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach ($data as $img => $img_row)
|
||||||
|
{
|
||||||
|
$template->assign_block_vars('items', array(
|
||||||
|
'IMG' => $img,
|
||||||
|
'IMG_SRC' => $phpbb_root_path . $img_path . '/' . $img,
|
||||||
|
|
||||||
|
'CODE' => ($mode == 'smilies' && isset($img_row['code'])) ? $img_row['code'] : '',
|
||||||
|
'EMOTION' => ($mode == 'smilies' && isset($img_row['emotion'])) ? $img_row['emotion'] : '',
|
||||||
|
|
||||||
|
'S_ID' => (isset($img_row[$fields . '_id'])) ? true : false,
|
||||||
|
'ID' => (isset($img_row[$fields . '_id'])) ? $img_row[$fields . '_id'] : 0,
|
||||||
|
'WIDTH' => (!empty($img_row[$fields .'_width'])) ? $img_row[$fields .'_width'] : $img_row['width'],
|
||||||
|
'HEIGHT' => (!empty($img_row[$fields .'_height'])) ? $img_row[$fields .'_height'] : $img_row['height'],
|
||||||
|
'POSTING_CHECKED' => (!empty($img_row['display_on_posting']) || $action == 'add') ? ' checked="checked"' : '')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'create':
|
||||||
|
case 'modify':
|
||||||
|
|
||||||
|
// Get items to create/modify
|
||||||
|
$images = (isset($_POST['image'])) ? array_keys(request_var('image', array('' => 0))) : array();
|
||||||
|
|
||||||
|
// Now really get the items
|
||||||
|
$image_id = (isset($_POST['id'])) ? array_map('intval', $_POST['id']) : array();
|
||||||
|
$image_order = (isset($_POST['order'])) ? array_map('intval', $_POST['order']) : array();
|
||||||
|
$image_width = (isset($_POST['width'])) ? array_map('intval', $_POST['width']) : array();
|
||||||
|
$image_height = (isset($_POST['height'])) ? array_map('intval', $_POST['height']) : array();
|
||||||
|
$image_add = (isset($_POST['add_img'])) ? array_map('intval', $_POST['add_img']) : array();
|
||||||
|
$image_emotion = request_var('emotion', '');
|
||||||
|
$image_code = request_var('code', '');
|
||||||
|
$image_display_on_posting = (isset($_POST['display_on_posting'])) ? array_map('intval', $_POST['display_on_posting']) : array();
|
||||||
|
|
||||||
|
foreach ($images as $image)
|
||||||
|
{
|
||||||
|
if (($mode == 'smilies' && ($image_emotion[$image] == '' || $image_code[$image] == '')) ||
|
||||||
|
($action == 'create' && !isset($image_add[$image])))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($image_width[$image] == 0 || $image_height[$image] == 0)
|
||||||
|
{
|
||||||
|
$img_size = @getimagesize($phpbb_root_path . $img_path . '/' . $image);
|
||||||
|
$image_width[$image] = $img_size[0];
|
||||||
|
$image_height[$image] = $img_size[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
$img_sql = array(
|
||||||
|
$fields . '_url' => $image,
|
||||||
|
$fields . '_width' => $image_width[$image],
|
||||||
|
$fields . '_height' => $image_height[$image],
|
||||||
|
'display_on_posting'=> (isset($image_display_on_posting[$image])) ? 1 : 0,
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($mode == 'smilies')
|
||||||
|
{
|
||||||
|
$img_sql = array_merge($img_sql, array(
|
||||||
|
'emotion' => $image_emotion[$image],
|
||||||
|
'code' => $image_code[$image])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($image_order[$image]))
|
||||||
|
{
|
||||||
|
$img_sql = array_merge($img_sql, array(
|
||||||
|
$fields . '_order' => $image_order[$image] . '.5')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($action == 'modify')
|
||||||
|
{
|
||||||
|
$sql = "UPDATE $table
|
||||||
|
SET " . $db->sql_build_array('UPDATE', $img_sql) . "
|
||||||
|
WHERE {$fields}_id = " . $image_id[$image];
|
||||||
|
$db->sql_query($sql);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$sql = "INSERT INTO $table " . $db->sql_build_array('INSERT', $img_sql);
|
||||||
|
$db->sql_query($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
$update = false;
|
||||||
|
|
||||||
|
if ($action == 'modify' && !empty($image_order[$image]))
|
||||||
|
{
|
||||||
|
$update = true;
|
||||||
|
|
||||||
|
$result = $db->sql_query("SELECT {$fields}_order
|
||||||
|
FROM $table
|
||||||
|
WHERE {$fields}_id = " . $image_id[$image]);
|
||||||
|
$order_old = $db->sql_fetchfield($fields . '_order', 0, $result);
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
if ($order_old == $image_order[$image])
|
||||||
|
{
|
||||||
|
$update = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($order_old > $image_order[$image])
|
||||||
|
{
|
||||||
|
$sign = '+';
|
||||||
|
$where = $fields . '_order >= ' . $image_order[$image] . " AND {$fields}_order < $order_old";
|
||||||
|
}
|
||||||
|
else if ($order_old < $image_order[$image])
|
||||||
|
{
|
||||||
|
$sign = '-';
|
||||||
|
$where = "{$fields}_order > $order_old AND {$fields}_order < " . $image_order[$image];
|
||||||
|
$sql[$fields . '_order'] = $image_order[$image] - 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($update)
|
||||||
|
{
|
||||||
|
$sql = "UPDATE $table
|
||||||
|
SET {$fields}_order = {$fields}_order $sign 1
|
||||||
|
WHERE $where";
|
||||||
|
$db->sql_query($sql);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$cache->destroy('icons');
|
||||||
|
|
||||||
|
if ($action == 'modify')
|
||||||
|
{
|
||||||
|
trigger_error($user->lang[$lang . '_EDITED'] . adm_back_link($u_action));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
trigger_error($user->lang[$lang . '_ADDED'] . adm_back_link($u_action));
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'import':
|
||||||
|
|
||||||
|
$pak = request_var('pak', '');
|
||||||
|
$current = request_var('current', '');
|
||||||
|
|
||||||
|
if ($pak != '')
|
||||||
|
{
|
||||||
|
$order = 0;
|
||||||
|
|
||||||
|
// The user has already selected a smilies_pak file
|
||||||
|
if ($current == 'delete')
|
||||||
|
{
|
||||||
|
$db->sql_query("TRUNCATE $table");
|
||||||
|
|
||||||
|
switch ($mode)
|
||||||
|
{
|
||||||
|
case 'smilies':
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'icons':
|
||||||
|
// Reset all icon_ids
|
||||||
|
$db->sql_query('UPDATE ' . TOPICS_TABLE . ' SET icon_id = 0');
|
||||||
|
$db->sql_query('UPDATE ' . POSTS_TABLE . ' SET icon_id = 0');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$cur_img = array();
|
||||||
|
|
||||||
|
$field_sql = ($mode == 'smilies') ? 'code' : 'icons_url';
|
||||||
|
$result = $db->sql_query("SELECT $field_sql FROM $table");
|
||||||
|
|
||||||
|
while ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
++$order;
|
||||||
|
$cur_img[$row[$field_sql]] = 1;
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!($pak_ary = @file($phpbb_root_path . $img_path . '/' . $pak)))
|
||||||
|
{
|
||||||
|
trigger_error($user->lang['PAK_FILE_NOT_READABLE'] . adm_back_link($u_action));
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($pak_ary as $pak_entry)
|
||||||
|
{
|
||||||
|
$data = array();
|
||||||
|
if (preg_match_all("#'(.*?)', #", $pak_entry, $data))
|
||||||
|
{
|
||||||
|
if ((sizeof($data[1]) != 3 && $mode == 'icons') ||
|
||||||
|
(sizeof($data[1]) != 5 && $mode == 'smilies'))
|
||||||
|
{
|
||||||
|
trigger_error($user->lang['WRONG_PAK_TYPE'] . adm_back_link($u_action));
|
||||||
|
}
|
||||||
|
|
||||||
|
$img = stripslashes($data[1][0]);
|
||||||
|
$width = stripslashes($data[1][1]);
|
||||||
|
$height = stripslashes($data[1][2]);
|
||||||
|
|
||||||
|
if (isset($data[1][3]) && isset($data[1][4]))
|
||||||
|
{
|
||||||
|
$emotion = stripslashes($data[1][3]);
|
||||||
|
$code = stripslashes($data[1][4]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($current == 'replace' &&
|
||||||
|
(($mode == 'smilies' && !empty($cur_img[$code])) ||
|
||||||
|
($mode == 'icons' && !empty($cur_img[$img]))))
|
||||||
|
{
|
||||||
|
$replace_sql = ($mode == 'smilies') ? $code : $img;
|
||||||
|
$sql = array(
|
||||||
|
$fields . '_url' => $img,
|
||||||
|
$fields . '_height' => (int) $height,
|
||||||
|
$fields . '_width' => (int) $width,
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($mode == 'smilies')
|
||||||
|
{
|
||||||
|
$sql = array_merge($sql, array(
|
||||||
|
'emotion' => $emotion
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
$db->sql_query("UPDATE $table SET " . $db->sql_build_array('UPDATE', $sql) . "
|
||||||
|
WHERE $field_sql = '" . $db->sql_escape($replace_sql) . "'");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
++$order;
|
||||||
|
|
||||||
|
$sql = array(
|
||||||
|
$fields . '_url' => $img,
|
||||||
|
$fields . '_height' => (int) $height,
|
||||||
|
$fields . '_width' => (int) $width,
|
||||||
|
$fields . '_order' => (int) $order,
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($mode == 'smilies')
|
||||||
|
{
|
||||||
|
$sql = array_merge($sql, array(
|
||||||
|
'code' => $code,
|
||||||
|
'emotion' => $emotion
|
||||||
|
));
|
||||||
|
}
|
||||||
|
$db->sql_query("INSERT INTO $table " . $db->sql_build_array('INSERT', $sql));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$cache->destroy('icons');
|
||||||
|
trigger_error($user->lang[$lang . '_IMPORT_SUCCESS'] . adm_back_link($u_action));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$pak_options = '';
|
||||||
|
|
||||||
|
foreach ($_paks as $pak)
|
||||||
|
{
|
||||||
|
$pak_options .= '<option value="' . $pak . '">' . htmlspecialchars($pak) . '</option>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'S_CHOOSE_PAK' => true,
|
||||||
|
'S_PAK_OPTIONS' => $pak_options,
|
||||||
|
|
||||||
|
'L_TITLE' => $user->lang['ACP_' . $lang],
|
||||||
|
'L_EXPLAIN' => $user->lang['ACP_' . $lang . '_EXPLAIN'],
|
||||||
|
'L_IMPORT' => $user->lang[$lang . '_IMPORT'],
|
||||||
|
'L_NO_PAK_OPTIONS' => $user->lang['NO_' . $lang . '_PAK'],
|
||||||
|
'L_CURRENT' => $user->lang['CURRENT_' . $lang],
|
||||||
|
'L_CURRENT_EXPLAIN' => $user->lang['CURRENT_' . $lang . '_EXPLAIN'],
|
||||||
|
'L_IMPORT_SUBMIT' => $user->lang['IMPORT_' . $lang],
|
||||||
|
|
||||||
|
'U_BACK' => $u_action,
|
||||||
|
'U_ACTION' => $u_action . '&action=import',
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'export':
|
||||||
|
|
||||||
|
$this->page_title = 'EXPORT_' . $lang;
|
||||||
|
$this->tpl_name = 'message_body';
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'MESSAGE_TITLE' => $user->lang['EXPORT_' . $lang],
|
||||||
|
'MESSAGE_TEXT' => sprintf($user->lang['EXPORT_' . $lang . '_EXPLAIN'], '<a href="' . $u_action . '&action=send">', '</a>'))
|
||||||
|
);
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'send':
|
||||||
|
|
||||||
|
$sql = "SELECT *
|
||||||
|
FROM $table
|
||||||
|
ORDER BY {$fields}_order";
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
$pak = '';
|
||||||
|
while ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
$pak .= "'" . addslashes($row[$fields . '_url']) . "', ";
|
||||||
|
$pak .= "'" . addslashes($row[$fields . '_height']) . "', ";
|
||||||
|
$pak .= "'" . addslashes($row[$fields . '_width']) . "', ";
|
||||||
|
if ($mode == 'smilies')
|
||||||
|
{
|
||||||
|
$pak .= "'" . addslashes($row['emotion']) . "', ";
|
||||||
|
$pak .= "'" . addslashes($row['code']) . "', ";
|
||||||
|
}
|
||||||
|
$pak .= "\n";
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
if ($pak != '')
|
||||||
|
{
|
||||||
|
$db->sql_close();
|
||||||
|
|
||||||
|
header('Pragma: public');
|
||||||
|
|
||||||
|
// Send out the Headers
|
||||||
|
header('Content-Type: text/x-delimtext; name="' . $fields . '.pak"');
|
||||||
|
header('Content-Disposition: inline; filename="' . $fields . '.pak"');
|
||||||
|
echo $pak;
|
||||||
|
|
||||||
|
flush();
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
trigger_error($user->lang['NO_' . $fields . '_EXPORT'] . adm_back_link($u_action));
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'delete':
|
||||||
|
|
||||||
|
$db->sql_query("DELETE FROM $table
|
||||||
|
WHERE {$fields}_id = $icon_id");
|
||||||
|
|
||||||
|
switch ($mode)
|
||||||
|
{
|
||||||
|
case 'smilies':
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'icons':
|
||||||
|
// Reset appropriate icon_ids
|
||||||
|
$db->sql_query('UPDATE ' . TOPICS_TABLE . "
|
||||||
|
SET icon_id = 0
|
||||||
|
WHERE icon_id = $icon_id");
|
||||||
|
|
||||||
|
$db->sql_query('UPDATE ' . POSTS_TABLE . "
|
||||||
|
SET icon_id = 0
|
||||||
|
WHERE icon_id = $icon_id");
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$notice = $user->lang[$lang . '_DELETED'];
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'move_up':
|
||||||
|
case 'move_down':
|
||||||
|
|
||||||
|
$image_order = intval($_GET['order']);
|
||||||
|
$order_total = $image_order * 2 + (($action == 'move_up') ? -1 : 1);
|
||||||
|
|
||||||
|
$sql = 'UPDATE ' . $table . '
|
||||||
|
SET ' . $fields . "_order = $order_total - " . $fields . '_order
|
||||||
|
WHERE ' . $fields . "_order IN ($image_order, " . (($action == 'move_up') ? $image_order - 1 : $image_order + 1) . ')';
|
||||||
|
$db->sql_query($sql);
|
||||||
|
|
||||||
|
$cache->destroy('icons');
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// By default, check that image_order is valid and fix it if necessary
|
||||||
|
$sql = "SELECT {$fields}_id AS order_id, {$fields}_order AS fields_order
|
||||||
|
FROM $table
|
||||||
|
ORDER BY {$fields}_order";
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
if ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
$order = 0;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
++$order;
|
||||||
|
if ($row['fields_order'] != $order)
|
||||||
|
{
|
||||||
|
$db->sql_query("UPDATE $table
|
||||||
|
SET {$fields}_order = $order
|
||||||
|
WHERE {$fields}_id = " . $row['order_id']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while ($row = $db->sql_fetchrow($result));
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'L_TITLE' => $user->lang['ACP_' . $lang],
|
||||||
|
'L_EXPLAIN' => $user->lang['ACP_' . $lang . '_EXPLAIN'],
|
||||||
|
'L_IMPORT' => $user->lang['IMPORT_' . $lang],
|
||||||
|
'L_EXPORT' => $user->lang['EXPORT_' . $lang],
|
||||||
|
'L_NOT_DISPLAYED' => $user->lang[$lang . '_NOT_DISPLAYED'],
|
||||||
|
'L_ICON_ADD' => $user->lang['ADD_' . $lang],
|
||||||
|
'L_ICON_EDIT' => $user->lang['EDIT_' . $lang],
|
||||||
|
|
||||||
|
'NOTICE' => $notice,
|
||||||
|
'COLSPAN' => ($mode == 'smilies') ? 5 : 3,
|
||||||
|
|
||||||
|
'S_SMILIES' => ($mode == 'smilies') ? true : false,
|
||||||
|
|
||||||
|
'U_ACTION' => $u_action,
|
||||||
|
'U_IMPORT' => $u_action . '&action=import',
|
||||||
|
'U_EXPORT' => $u_action . '&action=export',
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$spacer = false;
|
||||||
|
|
||||||
|
$sql = "SELECT *
|
||||||
|
FROM $table
|
||||||
|
ORDER BY display_on_posting DESC, {$fields}_order ASC";
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
while ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
$alt_text = ($mode == 'smilies') ? $row['code'] : '';
|
||||||
|
|
||||||
|
$template->assign_block_vars('items', array(
|
||||||
|
'S_SPACER' => (!$spacer && !$row['display_on_posting']) ? true : false,
|
||||||
|
'ALT_TEXT' => $alt_text,
|
||||||
|
'IMG_SRC' => $phpbb_root_path . $img_path . '/' . $row[$fields . '_url'],
|
||||||
|
'WIDTH' => $row[$fields . '_width'],
|
||||||
|
'HEIGHT' => $row[$fields . '_height'],
|
||||||
|
'CODE' => (isset($row['code'])) ? $row['code'] : '',
|
||||||
|
'EMOTION' => (isset($row['emotion'])) ? $row['emotion'] : '',
|
||||||
|
'U_EDIT' => $u_action . '&action=edit&id=' . $row[$fields . '_id'],
|
||||||
|
'U_DELETE' => $u_action . '&action=delete&id=' . $row[$fields . '_id'],
|
||||||
|
'U_MOVE_UP' => $u_action . '&action=move_up&order=' . $row[$fields . '_order'],
|
||||||
|
'U_MOVE_DOWN' => $u_action . '&action=move_down&order=' . $row[$fields . '_order'])
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!$spacer && !$row['display_on_posting'])
|
||||||
|
{
|
||||||
|
$spacer = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package module_install
|
||||||
|
*/
|
||||||
|
class acp_icons_info
|
||||||
|
{
|
||||||
|
function module()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'filename' => 'acp_icons',
|
||||||
|
'title' => 'ACP_ICONS_SMILIES',
|
||||||
|
'version' => '1.0.0',
|
||||||
|
'modes' => array(
|
||||||
|
'icons' => array('title' => 'ACP_ICONS', 'auth' => 'acl_a_icons'),
|
||||||
|
'smilies' => array('title' => 'ACP_SMILIES', 'auth' => 'acl_a_icons'),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function install()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
function uninstall()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
|
@ -33,6 +33,7 @@ class acp_jabber
|
||||||
|
|
||||||
$u_action = "{$phpbb_admin_path}index.$phpEx$SID&i=$id&mode=$mode";
|
$u_action = "{$phpbb_admin_path}index.$phpEx$SID&i=$id&mode=$mode";
|
||||||
$this->tpl_name = 'acp_jabber';
|
$this->tpl_name = 'acp_jabber';
|
||||||
|
$this->page_title = 'ACP_JABBER_SETTINGS';
|
||||||
|
|
||||||
$jab_enable = request_var('jab_enable', $config['jab_enable']);
|
$jab_enable = request_var('jab_enable', $config['jab_enable']);
|
||||||
$jab_host = request_var('jab_host', $config['jab_host']);
|
$jab_host = request_var('jab_host', $config['jab_host']);
|
||||||
|
|
|
@ -377,6 +377,7 @@ class acp_main
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->tpl_name = 'acp_main';
|
$this->tpl_name = 'acp_main';
|
||||||
|
$this->page_title = 'ACP_MAIN';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -389,10 +390,10 @@ class acp_main_info
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
'filename' => 'acp_main',
|
'filename' => 'acp_main',
|
||||||
'title' => 'ACP Index',
|
'title' => 'ACP_INDEX',
|
||||||
'version' => '1.0.0',
|
'version' => '1.0.0',
|
||||||
'modes' => array(
|
'modes' => array(
|
||||||
'main' => array('title' => 'Index', 'auth' => ''),
|
'main' => array('title' => 'ACP_INDEX', 'auth' => ''),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
*/
|
*/
|
||||||
class acp_modules
|
class acp_modules
|
||||||
{
|
{
|
||||||
var $mode = '';
|
var $module_class = '';
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
|
@ -45,6 +45,8 @@ class acp_modules
|
||||||
$user->add_lang('ucp');
|
$user->add_lang('ucp');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->page_title = strtoupper($this->module_class);
|
||||||
|
|
||||||
$u_action = "{$phpbb_admin_path}index.$phpEx$SID&i=$id&mode=$mode";
|
$u_action = "{$phpbb_admin_path}index.$phpEx$SID&i=$id&mode=$mode";
|
||||||
$parent_id = request_var('parent_id', 0);
|
$parent_id = request_var('parent_id', 0);
|
||||||
$module_id = request_var('m', 0);
|
$module_id = request_var('m', 0);
|
||||||
|
@ -590,6 +592,8 @@ class acp_modules
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
closedir($dh);
|
closedir($dh);
|
||||||
|
|
||||||
|
ksort($fileinfo);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -988,7 +992,7 @@ class acp_modules_info
|
||||||
'version' => '1.0.0',
|
'version' => '1.0.0',
|
||||||
'modes' => array(
|
'modes' => array(
|
||||||
'acp' => array('title' => 'ACP', 'auth' => 'acl_a_modules'),
|
'acp' => array('title' => 'ACP', 'auth' => 'acl_a_modules'),
|
||||||
'ucp' => array('title' => 'USER_CONTROL_PANEL', 'auth' => 'acl_a_modules'),
|
'ucp' => array('title' => 'UCP', 'auth' => 'acl_a_modules'),
|
||||||
'mcp' => array('title' => 'MCP', 'auth' => 'acl_a_modules'),
|
'mcp' => array('title' => 'MCP', 'auth' => 'acl_a_modules'),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -24,6 +24,7 @@ class acp_php_info
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->tpl_name = 'acp_php_info';
|
$this->tpl_name = 'acp_php_info';
|
||||||
|
$this->page_title = 'ACP_PHP_INFO';
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES | INFO_VARIABLES);
|
phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES | INFO_VARIABLES);
|
||||||
|
|
184
phpBB/includes/acp/acp_words.php
Normal file
184
phpBB/includes/acp/acp_words.php
Normal file
|
@ -0,0 +1,184 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @package acp
|
||||||
|
* @version $Id$
|
||||||
|
* @copyright (c) 2005 phpBB Group
|
||||||
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package acp
|
||||||
|
* @todo [words] check regular expressions for special char replacements (stored specialchared in db)
|
||||||
|
*/
|
||||||
|
class acp_words
|
||||||
|
{
|
||||||
|
function main($id, $mode)
|
||||||
|
{
|
||||||
|
global $db, $user, $auth, $template, $cache;
|
||||||
|
global $config, $SID, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||||
|
|
||||||
|
$user->add_lang('acp/posting');
|
||||||
|
|
||||||
|
// Set up general vars
|
||||||
|
$action = request_var('action', '');
|
||||||
|
$action = (isset($_POST['add'])) ? 'add' : ((isset($_POST['save'])) ? 'save' : $action);
|
||||||
|
|
||||||
|
$s_hidden_fields = '';
|
||||||
|
$word_info = array();
|
||||||
|
|
||||||
|
$this->tpl_name = 'acp_words';
|
||||||
|
$this->page_title = 'ACP_WORDS';
|
||||||
|
|
||||||
|
$u_action = "{$phpbb_admin_path}index.$phpEx$SID&i=$id&mode=$mode";
|
||||||
|
|
||||||
|
switch ($action)
|
||||||
|
{
|
||||||
|
case 'edit':
|
||||||
|
$word_id = request_var('id', 0);
|
||||||
|
|
||||||
|
if (!$word_id)
|
||||||
|
{
|
||||||
|
trigger_error($user->lang['NO_WORD'] . adm_back_link($u_action));
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = 'SELECT *
|
||||||
|
FROM ' . WORDS_TABLE . "
|
||||||
|
WHERE word_id = $word_id";
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
$word_info = $db->sql_fetchrow($result);
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
$s_hidden_fields .= '<input type="hidden" name="id" value="' . $word_id . '" />';
|
||||||
|
|
||||||
|
case 'add':
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'S_EDIT_WORD' => true,
|
||||||
|
'U_ACTION' => $u_action,
|
||||||
|
'U_BACK' => $u_action,
|
||||||
|
'WORD' => (isset($word_info['word'])) ? $word_info['word'] : '',
|
||||||
|
'REPLACEMENT' => (isset($word_info['replacement'])) ? $word_info['replacement'] : '',
|
||||||
|
'S_HIDDEN_FIELDS' => $s_hidden_fields)
|
||||||
|
);
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'save':
|
||||||
|
$word_id = request_var('id', 0);
|
||||||
|
$word = request_var('word', '');
|
||||||
|
$replacement = request_var('replacement', '');
|
||||||
|
|
||||||
|
if (!$word || !$replacement)
|
||||||
|
{
|
||||||
|
trigger_error($user->lang['ENTER_WORD'] . adm_back_link($u_action));
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql_ary = array(
|
||||||
|
'word' => $word,
|
||||||
|
'replacement' => $replacement
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($word_id)
|
||||||
|
{
|
||||||
|
$db->sql_query('UPDATE ' . WORDS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' WHERE word_id = ' . $word_id);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$db->sql_query('INSERT INTO ' . WORDS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
|
||||||
|
}
|
||||||
|
|
||||||
|
$cache->destroy('word_censors');
|
||||||
|
|
||||||
|
$log_action = ($word_id) ? 'LOG_WORD_EDIT' : 'LOG_WORD_ADD';
|
||||||
|
add_log('admin', $log_action, $word);
|
||||||
|
|
||||||
|
$message = ($word_id) ? $user->lang['WORD_UPDATED'] : $user->lang['WORD_ADDED'];
|
||||||
|
trigger_error($message . adm_back_link($u_action));
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'delete':
|
||||||
|
|
||||||
|
$word_id = request_var('id', 0);
|
||||||
|
|
||||||
|
if (!$word_id)
|
||||||
|
{
|
||||||
|
trigger_error($user->lang['NO_WORD'] . adm_back_link($u_action));
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = 'SELECT word
|
||||||
|
FROM ' . WORDS_TABLE . "
|
||||||
|
WHERE word_id = $word_id";
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
$deleted_word = $db->sql_fetchfield('word', 0, $result);
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
$sql = 'DELETE FROM ' . WORDS_TABLE . "
|
||||||
|
WHERE word_id = $word_id";
|
||||||
|
$db->sql_query($sql);
|
||||||
|
|
||||||
|
$cache->destroy('word_censors');
|
||||||
|
|
||||||
|
add_log('admin', 'LOG_WORD_DELETE', $deleted_word);
|
||||||
|
|
||||||
|
$message = $user->lang['WORD_REMOVE'];
|
||||||
|
trigger_error($message . adm_back_link($u_action));
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'U_ACTION' => $u_action,
|
||||||
|
'S_HIDDEN_FIELDS' => $s_hidden_fields)
|
||||||
|
);
|
||||||
|
|
||||||
|
$sql = 'SELECT *
|
||||||
|
FROM ' . WORDS_TABLE . '
|
||||||
|
ORDER BY word';
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
while ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
$template->assign_block_vars('words', array(
|
||||||
|
'WORD' => $row['word'],
|
||||||
|
'REPLACEMENT' => $row['replacement'],
|
||||||
|
'U_EDIT' => $u_action . '&action=edit&id=' . $row['word_id'],
|
||||||
|
'U_DELETE' => $u_action . '&action=delete&id=' . $row['word_id'])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package module_install
|
||||||
|
*/
|
||||||
|
class acp_words_info
|
||||||
|
{
|
||||||
|
function module()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'filename' => 'acp_words',
|
||||||
|
'title' => 'ACP_WORDS',
|
||||||
|
'version' => '1.0.0',
|
||||||
|
'modes' => array(
|
||||||
|
'words' => array('title' => 'ACP_WORDS', 'auth' => 'acl_a_words'),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function install()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
function uninstall()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
|
@ -71,24 +71,31 @@ function admin_ldap(&$new)
|
||||||
{
|
{
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
?>
|
/**
|
||||||
<tr>
|
* @todo Using same approach with cfg_build_template?
|
||||||
<td class="row1"><?php echo $user->lang['LDAP_SERVER']; ?>:<br /><span class="gensmall"><?php echo $user->lang['LDAP_SERVER_EXPLAIN']; ?></span></td>
|
*/
|
||||||
<td class="row2"><input type="text" size="40" name="ldap_server" value="<?php echo $new['ldap_server']; ?>" /></td>
|
|
||||||
</tr>
|
$tpl = '
|
||||||
<tr>
|
|
||||||
<td class="row1"><?php echo $user->lang['LDAP_DN']; ?>:<br /><span class="gensmall"><?php echo $user->lang['LDAP_DN_EXPLAIN']; ?></span></td>
|
<dl>
|
||||||
<td class="row2"><input type="text" size="40" name="ldap_base_dn" value="<?php echo $new['ldap_base_dn']; ?>" /></td>
|
<dt><label for="ldap_server">' . $user->lang['LDAP_SERVER'] . ':</label><br /><span>' . $user->lang['LDAP_SERVER_EXPLAIN'] . '</span></dt>
|
||||||
</tr>
|
<dd><input type="text" id="ldap_server" size="40" name="ldap_server" value="' . $new['ldap_server'] . '" /></dd>
|
||||||
<tr>
|
</dl>
|
||||||
<td class="row1"><?php echo $user->lang['LDAP_UID']; ?>:<br /><span class="gensmall"><?php echo $user->lang['LDAP_UID_EXPLAIN']; ?></span></td>
|
<dl>
|
||||||
<td class="row2"><input type="text" size="40" name="ldap_uid" value="<?php echo $new['ldap_uid']; ?>" /></td>
|
<dt><label for="ldap_dn">' . $user->lang['LDAP_DN'] . ':</label><br /><span>' . $user->lang['LDAP_DN_EXPLAIN'] . '</span></dt>
|
||||||
</tr>
|
<dd><input type="text" id="ldap_dn" size="40" name="ldap_base_dn" value="' . $new['ldap_base_dn'] . '" /></dd>
|
||||||
<?php
|
</dl>
|
||||||
|
<dl>
|
||||||
|
<dt><label for="ldap_uid">' . $user->lang['LDAP_UID'] . ':</label><br /><span>' . $user->lang['LDAP_UID_EXPLAIN'] . '</span></dt>
|
||||||
|
<dd><input type="text" id="ldap_uid" size="40" name="ldap_uid" value="' . $new['ldap_uid'] . '" /></dd>
|
||||||
|
</dl>
|
||||||
|
';
|
||||||
|
|
||||||
// These are fields required in the config table
|
// These are fields required in the config table
|
||||||
return array('ldap_server', 'ldap_base_dn', 'ldap_uid');
|
return array(
|
||||||
|
'tpl' => $tpl,
|
||||||
|
'config' => array('ldap_server', 'ldap_base_dn', 'ldap_uid')
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -351,6 +351,16 @@ class p_master
|
||||||
return $this->module->tpl_name . '.html';
|
return $this->module->tpl_name . '.html';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the desired page title
|
||||||
|
*/
|
||||||
|
function get_page_title()
|
||||||
|
{
|
||||||
|
global $user;
|
||||||
|
|
||||||
|
return (isset($user->lang[$this->module->page_title])) ? $user->lang[$this->module->page_title] : $this->module->page_title;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load module as the current active one without the need for registering it
|
* Load module as the current active one without the need for registering it
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -463,7 +463,7 @@ class session
|
||||||
// Note: if the user is currently browsing the board, his
|
// Note: if the user is currently browsing the board, his
|
||||||
// last_visit field won't be updated, which I believe should be
|
// last_visit field won't be updated, which I believe should be
|
||||||
// the normal behavior anyway
|
// the normal behavior anyway
|
||||||
$db->sql_return_on_error(TRUE);
|
$db->sql_return_on_error(true);
|
||||||
|
|
||||||
$sql = 'DELETE FROM ' . SESSIONS_TABLE . '
|
$sql = 'DELETE FROM ' . SESSIONS_TABLE . '
|
||||||
USING ' . SESSIONS_TABLE . ' s1, ' . SESSIONS_TABLE . ' s2
|
USING ' . SESSIONS_TABLE . ' s1, ' . SESSIONS_TABLE . ' s2
|
||||||
|
@ -471,7 +471,7 @@ class session
|
||||||
AND s1.session_time < s2.session_time';
|
AND s1.session_time < s2.session_time';
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
|
|
||||||
$db->sql_return_on_error(FALSE);
|
$db->sql_return_on_error(false);
|
||||||
|
|
||||||
// Update last visit time
|
// Update last visit time
|
||||||
$sql = 'UPDATE ' . USERS_TABLE. ' u, ' . SESSIONS_TABLE . ' s
|
$sql = 'UPDATE ' . USERS_TABLE. ' u, ' . SESSIONS_TABLE . ' s
|
||||||
|
@ -756,7 +756,7 @@ class user extends session
|
||||||
|
|
||||||
// We include common language file here to not load it every time a custom language file is included
|
// We include common language file here to not load it every time a custom language file is included
|
||||||
$lang = &$this->lang;
|
$lang = &$this->lang;
|
||||||
if ((@include $this->lang_path . "common.$phpEx") === FALSE)
|
if ((@include $this->lang_path . "common.$phpEx") === false)
|
||||||
{
|
{
|
||||||
die("Language file " . $this->lang_path . "common.$phpEx" . " couldn't be opened.");
|
die("Language file " . $this->lang_path . "common.$phpEx" . " couldn't be opened.");
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ class ucp_activate
|
||||||
{
|
{
|
||||||
set_config('newest_user_id', $row['user_id']);
|
set_config('newest_user_id', $row['user_id']);
|
||||||
set_config('newest_username', $row['username']);
|
set_config('newest_username', $row['username']);
|
||||||
set_config('num_users', $config['num_users'] + 1, TRUE);
|
set_config('num_users', $config['num_users'] + 1, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
meta_refresh(3, "{$phpbb_root_path}index.$phpEx$SID");
|
meta_refresh(3, "{$phpbb_root_path}index.$phpEx$SID");
|
||||||
|
|
|
@ -34,13 +34,17 @@ $lang += array(
|
||||||
'ACP_ATTACHMENT_SETTINGS' => 'Attachment Settings',
|
'ACP_ATTACHMENT_SETTINGS' => 'Attachment Settings',
|
||||||
'ACP_AUTH_SETTINGS' => 'Authentication',
|
'ACP_AUTH_SETTINGS' => 'Authentication',
|
||||||
'ACP_AVATAR_SETTINGS' => 'Avatar Settings',
|
'ACP_AVATAR_SETTINGS' => 'Avatar Settings',
|
||||||
|
'ACP_BBCODES' => 'BBCodes',
|
||||||
'ACP_BOARD_DEFAULTS' => 'Board Defaults',
|
'ACP_BOARD_DEFAULTS' => 'Board Defaults',
|
||||||
|
'ACP_BOARD_MANAGEMENT' => 'Board Management',
|
||||||
'ACP_BOARD_SETTINGS' => 'Board Settings',
|
'ACP_BOARD_SETTINGS' => 'Board Settings',
|
||||||
'ACP_BOTS' => 'Spiders/Robots',
|
'ACP_BOTS' => 'Spiders/Robots',
|
||||||
'ACP_CAT_GENERAL' => 'General',
|
'ACP_CAT_GENERAL' => 'General',
|
||||||
'ACP_COOKIE_SETTINGS' => 'Cookie Settings',
|
'ACP_COOKIE_SETTINGS' => 'Cookie Settings',
|
||||||
'ACP_EMAIL_SETTINGS' => 'Email Settings',
|
'ACP_EMAIL_SETTINGS' => 'Email Settings',
|
||||||
'ACP_EXTENSION_GROUPS' => 'Manage Extension Groups',
|
'ACP_EXTENSION_GROUPS' => 'Manage Extension Groups',
|
||||||
|
'ACP_ICONS' => 'Topic Icons',
|
||||||
|
'ACP_ICONS_SMILIES' => 'Topic Icons/Smilies',
|
||||||
'ACP_JABBER_SETTINGS' => 'Jabber Settings',
|
'ACP_JABBER_SETTINGS' => 'Jabber Settings',
|
||||||
'ACP_LOAD_SETTINGS' => 'Load Settings',
|
'ACP_LOAD_SETTINGS' => 'Load Settings',
|
||||||
'ACP_MAIN' => 'Admin index',
|
'ACP_MAIN' => 'Admin index',
|
||||||
|
@ -51,9 +55,12 @@ $lang += array(
|
||||||
'ACP_PHP_INFO' => 'PHP Information',
|
'ACP_PHP_INFO' => 'PHP Information',
|
||||||
'ACP_POSTING' => 'Posting',
|
'ACP_POSTING' => 'Posting',
|
||||||
'ACP_SERVER_SETTINGS' => 'Server Settings',
|
'ACP_SERVER_SETTINGS' => 'Server Settings',
|
||||||
|
'ACP_SMILIES' => 'Smilies',
|
||||||
|
'ACP_WORDS' => 'Word Censoring',
|
||||||
|
|
||||||
'ACTION' => 'Action',
|
'ACTION' => 'Action',
|
||||||
'ACTIVATE' => 'Activate',
|
'ACTIVATE' => 'Activate',
|
||||||
|
'ADD' => 'Add',
|
||||||
'ADMIN' => 'Administration',
|
'ADMIN' => 'Administration',
|
||||||
'ADMIN_INDEX' => 'Admin Index',
|
'ADMIN_INDEX' => 'Admin Index',
|
||||||
'ADMIN_PANEL' => 'Administration Control Panel',
|
'ADMIN_PANEL' => 'Administration Control Panel',
|
||||||
|
@ -63,7 +70,9 @@ $lang += array(
|
||||||
'CONFIG_UPDATED' => 'Configuration updated successfully',
|
'CONFIG_UPDATED' => 'Configuration updated successfully',
|
||||||
|
|
||||||
'DEACTIVATE' => 'Deactivate',
|
'DEACTIVATE' => 'Deactivate',
|
||||||
|
'DIMENSIONS' => 'Dimensions',
|
||||||
'DISABLE' => 'Disable',
|
'DISABLE' => 'Disable',
|
||||||
|
'DISPLAY' => 'Display',
|
||||||
|
|
||||||
'EDIT' => 'Edit',
|
'EDIT' => 'Edit',
|
||||||
'ENABLE' => 'Enable',
|
'ENABLE' => 'Enable',
|
||||||
|
@ -84,14 +93,17 @@ $lang += array(
|
||||||
'MOVE_DOWN' => 'Move Down',
|
'MOVE_DOWN' => 'Move Down',
|
||||||
'MOVE_UP' => 'Move Up',
|
'MOVE_UP' => 'Move Up',
|
||||||
|
|
||||||
|
'NOTIFY' => 'Notification',
|
||||||
'NO_ADMIN' => 'You are not authorised to administer this board.',
|
'NO_ADMIN' => 'You are not authorised to administer this board.',
|
||||||
|
|
||||||
'OFF' => 'OFF',
|
'OFF' => 'OFF',
|
||||||
'ON' => 'ON',
|
'ON' => 'ON',
|
||||||
|
|
||||||
'REMIND' => 'Remind',
|
'REMIND' => 'Remind',
|
||||||
|
'REORDER' => 'Reorder',
|
||||||
'RETURN_TO' => 'Return to ...',
|
'RETURN_TO' => 'Return to ...',
|
||||||
|
|
||||||
|
'UCP' => 'User Control Panel',
|
||||||
'USER_CONTROL_PANEL' => 'User Control Panel',
|
'USER_CONTROL_PANEL' => 'User Control Panel',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -147,10 +159,31 @@ $lang += array(
|
||||||
|
|
||||||
// Log
|
// Log
|
||||||
$lang += array(
|
$lang += array(
|
||||||
|
'LOG_ATTACH_EXT_ADD' => '<b>Added or edited attachment extension</b><br />» %s',
|
||||||
|
'LOG_ATTACH_EXT_DEL' => '<b>Removed attachment extension</b><br />» %s',
|
||||||
|
'LOG_ATTACH_EXT_UPDATE' => '<b>Updated attachment extension</b><br />» %s',
|
||||||
|
'LOG_ATTACH_EXTGROUP_ADD' => '<b>Added extension group</b><br />» %s',
|
||||||
|
'LOG_ATTACH_EXTGROUP_EDIT' => '<b>Edited extension group</b><br />» %s',
|
||||||
|
'LOG_ATTACH_EXTGROUP_DEL' => '<b>Removed extension group</b><br />» %s',
|
||||||
|
'LOG_ATTACH_FILEUPLOAD' => '<b>Orphan File uploaded to Post Number %1$d - %2$s</b>',
|
||||||
|
'LOG_ATTACH_ORPHAN_DEL' => '<b>Orphan Files deleted</b><br />» %s',
|
||||||
|
|
||||||
|
'LOG_BBCODE_ADD' => '<b>Added new BBCode</b><br />» %s',
|
||||||
|
'LOG_BBCODE_EDIT' => '<b>Edited BBCode</b><br />» %s',
|
||||||
|
'LOG_BBCODE_DELETE' => '<b>Deleted BBCode</b><br />» %s',
|
||||||
|
|
||||||
'LOG_BOT_ADDED' => '<b>New bot added</b><br />» %s',
|
'LOG_BOT_ADDED' => '<b>New bot added</b><br />» %s',
|
||||||
'LOG_BOT_DELETE' => '<b>Deleted bot</b><br />» %s',
|
'LOG_BOT_DELETE' => '<b>Deleted bot</b><br />» %s',
|
||||||
'LOG_BOT_UPDATED' => '<b>Existing bot updated</b><br />» %s',
|
'LOG_BOT_UPDATED' => '<b>Existing bot updated</b><br />» %s',
|
||||||
|
|
||||||
|
'LOG_DOWNLOAD_EXCLUDE_IP' => '<b>Exluded ip/hostname from download list</b><br />» %s',
|
||||||
|
'LOG_DOWNLOAD_IP' => '<b>Added ip/hostname to download list</b><br />» %s',
|
||||||
|
'LOG_DOWNLOAD_REMOVE_IP' => '<b>Removed ip/hostname from download list</b><br />» %s',
|
||||||
|
|
||||||
|
'LOG_INDEX_ACTIVATE' => '<b>Activated inactive users</b><br />» %s',
|
||||||
|
'LOG_INDEX_DELETE' => '<b>Deleted inactive users</b><br />» %s',
|
||||||
|
'LOG_INDEX_REMIND' => '<b>Sent reminder emails to inactive users</b><br />» %s',
|
||||||
|
|
||||||
'LOG_JAB_CHANGED' => '<b>Jabber account changed</b>',
|
'LOG_JAB_CHANGED' => '<b>Jabber account changed</b>',
|
||||||
'LOG_JAB_PASSCHG' => '<b>Jabber password changed</b>',
|
'LOG_JAB_PASSCHG' => '<b>Jabber password changed</b>',
|
||||||
'LOG_JAB_REGISTER' => '<b>Jabber account registered</b>',
|
'LOG_JAB_REGISTER' => '<b>Jabber account registered</b>',
|
||||||
|
@ -168,33 +201,21 @@ $lang += array(
|
||||||
'LOG_RESYNC_POSTCOUNTS' => '<b>User postcounts synced</b>',
|
'LOG_RESYNC_POSTCOUNTS' => '<b>User postcounts synced</b>',
|
||||||
'LOG_RESYNC_STATS' => '<b>Post, topic and user stats reset</b>',
|
'LOG_RESYNC_STATS' => '<b>Post, topic and user stats reset</b>',
|
||||||
|
|
||||||
'LOG_INDEX_ACTIVATE' => '<b>Activated inactive users</b><br />» %s',
|
'LOG_CONFIG_ATTACH' => '<b>Altered attachment settings</b>',
|
||||||
'LOG_INDEX_DELETE' => '<b>Deleted inactive users</b><br />» %s',
|
'LOG_CONFIG_AUTH' => '<b>Altered authentication settings</b>',
|
||||||
'LOG_INDEX_REMIND' => '<b>Sent reminder emails to inactive users</b><br />» %s',
|
'LOG_CONFIG_AVATAR' => '<b>Altered avatar settings</b>',
|
||||||
|
'LOG_CONFIG_COOKIE' => '<b>Altered cookie settings</b>',
|
||||||
|
'LOG_CONFIG_DEFAULT' => '<b>Altered board defaults</b>',
|
||||||
|
'LOG_CONFIG_EMAIL' => '<b>Altered email settings</b>',
|
||||||
|
'LOG_CONFIG_LOAD' => '<b>Altered load settings</b>',
|
||||||
|
'LOG_CONFIG_MESSAGE' => '<b>Altered private message settings</b>',
|
||||||
|
'LOG_CONFIG_SERVER' => '<b>Altered server settings</b>',
|
||||||
|
'LOG_CONFIG_SETTINGS' => '<b>Altered board settings</b>',
|
||||||
|
|
||||||
'LOG_DOWNLOAD_EXCLUDE_IP' => '<b>Exluded ip/hostname from download list</b><br />» %s',
|
'LOG_WORD_ADD' => '<b>Added word censor</b><br />» %s',
|
||||||
'LOG_DOWNLOAD_IP' => '<b>Added ip/hostname to download list</b><br />» %s',
|
'LOG_WORD_DELETE' => '<b>Deleted word censor</b><br />» %s',
|
||||||
'LOG_DOWNLOAD_REMOVE_IP' => '<b>Removed ip/hostname from download list</b><br />» %s',
|
'LOG_WORD_EDIT' => '<b>Edited word censor</b><br />» %s',
|
||||||
|
|
||||||
'LOG_SERVER_CONFIG' => '<b>Altered server settings</b>',
|
|
||||||
'LOG_DEFAULT_CONFIG' => '<b>Altered board defaults</b>',
|
|
||||||
'LOG_SETTINGS_CONFIG' => '<b>Altered board settings</b>',
|
|
||||||
'LOG_COOKIE_CONFIG' => '<b>Altered cookie settings</b>',
|
|
||||||
'LOG_EMAIL_CONFIG' => '<b>Altered email settings</b>',
|
|
||||||
'LOG_AVATAR_CONFIG' => '<b>Altered avatar settings</b>',
|
|
||||||
'LOG_AUTH_CONFIG' => '<b>Altered authentication settings</b>',
|
|
||||||
'LOG_LOAD_CONFIG' => '<b>Altered load settings</b>',
|
|
||||||
'LOG_MESSAGE_CONFIG' => '<b>Altered private message settings</b>',
|
|
||||||
|
|
||||||
'LOG_ATTACH_CONFIG' => '<b>Altered attachment settings</b>',
|
|
||||||
'LOG_ATTACH_EXT_ADD' => '<b>Added or edited attachment extension</b><br />» %s',
|
|
||||||
'LOG_ATTACH_EXT_DEL' => '<b>Removed attachment extension</b><br />» %s',
|
|
||||||
'LOG_ATTACH_EXT_UPDATE' => '<b>Updated attachment extension</b><br />» %s',
|
|
||||||
'LOG_ATTACH_EXTGROUP_ADD' => '<b>Added extension group</b><br />» %s',
|
|
||||||
'LOG_ATTACH_EXTGROUP_EDIT' => '<b>Edited extension group</b><br />» %s',
|
|
||||||
'LOG_ATTACH_EXTGROUP_DEL' => '<b>Removed extension group</b><br />» %s',
|
|
||||||
'LOG_ATTACH_FILEUPLOAD' => '<b>Orphan File uploaded to Post Number %1$d - %2$s</b>',
|
|
||||||
'LOG_ATTACH_ORPHAN_DEL' => '<b>Orphan Files deleted</b><br />» %s',
|
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
?>
|
167
phpBB/language/en/acp/posting.php
Normal file
167
phpBB/language/en/acp/posting.php
Normal file
|
@ -0,0 +1,167 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* acp_modules [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 (empty($lang) || !is_array($lang))
|
||||||
|
{
|
||||||
|
$lang = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
// DEVELOPERS PLEASE NOTE
|
||||||
|
//
|
||||||
|
// 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
|
||||||
|
|
||||||
|
// BBCodes
|
||||||
|
// Note to translators: you can translate everything but what's between { and }
|
||||||
|
$lang += array(
|
||||||
|
'ACP_BBCODES_EXPLAIN' => 'BBCode is a special implementation of HTML offering greater control over what and how something is displayed. Additionnally, you can save users from typing sometimes very long HTML code by providing them a single BBCode as replacement. From this page you can add, remove and edit custom BBCodes',
|
||||||
|
'ADD_BBCODE' => 'Add a new BBCode',
|
||||||
|
|
||||||
|
'BBCODE_ADDED' => 'BBCode added successfully',
|
||||||
|
'BBCODE_EDITED' => 'BBCode edited successfully',
|
||||||
|
'BBCODE_NOT_EXIST' => 'The BBCode you selected does not exist',
|
||||||
|
'BBCODE_TAG' => 'Tag',
|
||||||
|
'BBCODE_USAGE' => 'BBCode usage',
|
||||||
|
'BBCODE_USAGE_EXAMPLE' => '[colour={COLOR}]{TEXT}[/colour]<br /><br />[font={TEXT1}]{TEXT2}[/font]',
|
||||||
|
'BBCODE_USAGE_EXPLAIN' => 'Here you define how to use the bbcode. Replace any variable input by the corresponding token (see below)',
|
||||||
|
|
||||||
|
'EXAMPLE' => 'Example:',
|
||||||
|
'EXAMPLES' => 'Examples:',
|
||||||
|
|
||||||
|
'HTML_REPLACEMENT' => 'HTML replacement',
|
||||||
|
'HTML_REPLACEMENT_EXAMPLE' => '<font color="{COLOR}">{TEXT}</font><br /><br /><font face="{TEXT1}">{TEXT2}</font>',
|
||||||
|
'HTML_REPLACEMENT_EXPLAIN' => 'Here you define the default HTML replacement (each template can have its own HTML replacement). Do not forget to put back tokens you used above!',
|
||||||
|
|
||||||
|
'TOKEN' => 'Token',
|
||||||
|
'TOKENS' => 'Tokens',
|
||||||
|
'TOKENS_EXPLAIN' => 'Tokens are placeholders for user input. The input will be validated only if it matches the corresponding definition. If needed, you can number them by adding a number as the last character between the braces, e.g. {USERNAME1}, {USERNAME2}.<br /><br />In addition to these tokens you can use any of lang string present in your language/ directory like this: {L_<i><stringname></i>} where <i><stringname></i> is the name of the translated string you want to add. For example, {L_WROTE} will be displayed as "wrote" or its translation according to user\'s locale',
|
||||||
|
'TOKEN_DEFINITION' => 'What can it be?',
|
||||||
|
'TOO_MANY_BBCODES' => 'You cannot create any more BBCodes. Please remove one or more BBCodes then try again',
|
||||||
|
|
||||||
|
'tokens' => array(
|
||||||
|
'TEXT' => 'Any text, including foreign characters, numbers, etc...',
|
||||||
|
'NUMBER' => 'Any serie of digits',
|
||||||
|
'EMAIL' => 'A valid email address',
|
||||||
|
'URL' => 'A valid URL using any protocol (http, ftp, etc... cannot be used for javascript exploits). If none is given, "http://" is prepended to to the string',
|
||||||
|
'LOCAL_URL' => 'A local URL. The URL must be relative to the topic page and cannot contain a server name or protocol',
|
||||||
|
'COLOR' => 'A HTML color, can be either in the numeric form #FF1234 or an english name such as "blue"'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Smilies and topic icons
|
||||||
|
$lang += array(
|
||||||
|
'ACP_ICONS_EXPLAIN' => 'From this page you can add, remove and edit the icons users may add to their topics or posts. These icons are generally displayed next to topic titles on the forum listing, or the post subjects in topic listings. You can also install and create new packages of icons.',
|
||||||
|
'ACP_SMILIES_EXPLAIN' => 'Smilies or emoticons are typically small, sometimes animated images used to convey an emotion or feeling. From this page you can add, remove and edit the emoticons users can use in their posts and private messages. You can also install and create new packages of smilies.',
|
||||||
|
'ADD_SMILIES' => 'Add multiple smilies',
|
||||||
|
'ADD_ICONS' => 'Add multiple icons',
|
||||||
|
'AFTER_ICONS' => 'After %s',
|
||||||
|
'AFTER_SMILIES' => 'After %s',
|
||||||
|
|
||||||
|
'CODE' => 'Code',
|
||||||
|
'CURRENT_ICONS' => 'Current icons',
|
||||||
|
'CURRENT_SMILIES' => 'Current smilies',
|
||||||
|
|
||||||
|
'DELETE_ALL' => 'Delete all',
|
||||||
|
'DISPLAY_ON_POSTING' => 'Display on posting',
|
||||||
|
|
||||||
|
'EDIT_ICONS' => 'Edit Icons',
|
||||||
|
'EDIT_SMILIES' => 'Edit smilies',
|
||||||
|
'EMOTION' => 'Emotion',
|
||||||
|
'EXPORT_ICONS' => 'Create icons pak',
|
||||||
|
'EXPORT_ICONS_EXPLAIN' => 'To create a package of your currently installed icons, click %sHERE%s to download the icons package file. Once downloaded create a zip or tgz file containing all of your icons plus this .pak configuration file.',
|
||||||
|
'EXPORT_SMILIES' => 'Create smilies pak',
|
||||||
|
'EXPORT_SMILIES_EXPLAIN' => 'To create a package of your currently installed smilies, click %sHERE%s to download the smilies.pak file. Once downloaded create a zip or tgz file containing all of your smilies plus this .pak configuration file.',
|
||||||
|
|
||||||
|
'FIRST' => 'First',
|
||||||
|
|
||||||
|
'ICONS_ADD' => 'Add a new Icon',
|
||||||
|
'ICONS_ADDED' => 'The icon has been added successfully.',
|
||||||
|
'ICONS_CONFIG' => 'Icon configuration',
|
||||||
|
'ICONS_DELETED' => 'The icon has been removed successfully.',
|
||||||
|
'ICONS_EDIT' => 'Edit Icon',
|
||||||
|
'ICONS_EDITED' => 'The icon has been updated successfully.',
|
||||||
|
'ICONS_HEIGHT' => 'Icon height',
|
||||||
|
'ICONS_IMAGE' => 'Icon image',
|
||||||
|
'ICONS_IMPORTED' => 'The icons pack has been installed successfully.',
|
||||||
|
'ICONS_IMPORT_SUCCESS' => 'The icons pack was imported successfully',
|
||||||
|
'ICONS_LOCATION' => 'Icon location',
|
||||||
|
'ICONS_NOT_DISPLAYED' => 'The following icons are not displayed on the posting page',
|
||||||
|
'ICONS_ORDER' => 'Icon order',
|
||||||
|
'ICONS_URL' => 'Icon image file',
|
||||||
|
'ICONS_WIDTH' => 'Icon width',
|
||||||
|
'IMPORT_ICONS' => 'Install icons pak',
|
||||||
|
'IMPORT_SMILIES' => 'Install smilies pak',
|
||||||
|
|
||||||
|
'KEEP_ALL' => 'Keep all',
|
||||||
|
|
||||||
|
'MASS_ADD_SMILIES' => 'Add multiple smilies',
|
||||||
|
|
||||||
|
'NO_ICONS_EXPORT' => 'You have no icons with which to create a package.',
|
||||||
|
'NO_ICONS_PAK' => 'No icon packages found.',
|
||||||
|
'NO_SMILIES_EXPORT' => 'You have no smilies with which to create a package.',
|
||||||
|
'NO_SMILIES_PAK' => 'No smiley packages found.',
|
||||||
|
|
||||||
|
'PAK_FILE_NOT_READABLE' => 'Could not read pak file',
|
||||||
|
|
||||||
|
'REPLACE_MATCHES' => 'Replace matches',
|
||||||
|
|
||||||
|
'SELECT_PACKAGE' => 'Select a package file',
|
||||||
|
'SMILIES_ADD' => 'Add a new Smiley',
|
||||||
|
'SMILIES_ADDED' => 'The smiley has been added successfully.',
|
||||||
|
'SMILIES_CODE' => 'Smiley code',
|
||||||
|
'SMILIES_CONFIG' => 'Smiley configuration',
|
||||||
|
'SMILIES_DELETED' => 'The smiley has been removed successfully.',
|
||||||
|
'SMILIES_EDIT' => 'Edit Smiley',
|
||||||
|
'SMILIES_EDITED' => 'The smiley has been updated successfully.',
|
||||||
|
'SMILIES_EMOTION' => 'Emotion',
|
||||||
|
'SMILIES_HEIGHT' => 'Smiley height',
|
||||||
|
'SMILIES_IMAGE' => 'Smiley image',
|
||||||
|
'SMILIES_IMPORTED' => 'The smilies pack has been installed successfully.',
|
||||||
|
'SMILIES_IMPORT_SUCCESS' => 'The smilies pack was imported successfully',
|
||||||
|
'SMILIES_LOCATION' => 'Smiley location',
|
||||||
|
'SMILIES_NOT_DISPLAYED' => 'The following smilies are not displayed on the posting page',
|
||||||
|
'SMILIES_ORDER' => 'Smiley order',
|
||||||
|
'SMILIES_URL' => 'Smiley image file',
|
||||||
|
'SMILIES_WIDTH' => 'Smiley width',
|
||||||
|
|
||||||
|
'WRONG_PAK_TYPE' => 'The specified package does not contain the appropriate data.',
|
||||||
|
);
|
||||||
|
|
||||||
|
// Word censors
|
||||||
|
$lang += array(
|
||||||
|
'ACP_WORDS_EXPLAIN' => 'From this control panel you can add, edit, and remove words that will be automatically censored on your forums. In addition people will not be allowed to register with usernames containing these words. Wildcards (*) are accepted in the word field, eg. *test* will match detestable, test* would match testing, *test would match detest.',
|
||||||
|
'ADD_WORD' => 'Add new word',
|
||||||
|
|
||||||
|
'EDIT_WORD' => 'Edit word censor',
|
||||||
|
'ENTER_WORD' => 'You must enter a word and its replacement',
|
||||||
|
|
||||||
|
'NO_WORD' => 'No word selected for editing',
|
||||||
|
|
||||||
|
'REPLACEMENT' => 'Replacement',
|
||||||
|
|
||||||
|
'UPDATE_WORD' => 'Update word censor',
|
||||||
|
|
||||||
|
'WORD' => 'Word',
|
||||||
|
'WORD_ADDED' => 'The word censor has been successfully added',
|
||||||
|
'WORD_REMOVED' => 'The selected word censor has been successfully removed',
|
||||||
|
'WORD_UPDATED' => 'The selected word censor has been successfully updated',
|
||||||
|
);
|
||||||
|
|
||||||
|
?>
|
Loading…
Add table
Reference in a new issue