mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
- added "display_on_posting" setting to custom bbcodes (creates a button with the bbcode tag)
- fixed forum editing and parent id selection - completely removed HTML support (it only creates security problems) - changed cache_moderators() to reflect permission changes git-svn-id: file:///svn/phpbb/trunk@5603 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
14b6714c93
commit
c01597499c
42 changed files with 324 additions and 330 deletions
|
@ -15,7 +15,6 @@ define('NEED_SID', true);
|
||||||
|
|
||||||
// Include files
|
// Include files
|
||||||
$phpbb_root_path = './../';
|
$phpbb_root_path = './../';
|
||||||
$phpbb_admin_path = './';
|
|
||||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||||
require($phpbb_root_path . 'common.'.$phpEx);
|
require($phpbb_root_path . 'common.'.$phpEx);
|
||||||
require($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
|
require($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
|
||||||
|
@ -46,8 +45,9 @@ if (!$auth->acl_get('a_'))
|
||||||
trigger_error($user->lang['NO_ADMIN']);
|
trigger_error($user->lang['NO_ADMIN']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// We define it now, because the user is now able to use the admin related features...
|
// We define the admin variables now, because the user is now able to use the admin related features...
|
||||||
define('IN_ADMIN', true);
|
define('IN_ADMIN', true);
|
||||||
|
$phpbb_admin_path = './';
|
||||||
|
|
||||||
// Some oft used variables
|
// Some oft used variables
|
||||||
$safe_mode = (@ini_get('safe_mode') || @strtolower(ini_get('safe_mode')) == 'on') ? true : false;
|
$safe_mode = (@ini_get('safe_mode') || @strtolower(ini_get('safe_mode')) == 'on') ? true : false;
|
||||||
|
|
|
@ -30,11 +30,20 @@
|
||||||
</dl>
|
</dl>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset>
|
||||||
|
<legend>{L_SETTINGS}</legend>
|
||||||
|
<dl>
|
||||||
|
<dt><label for="display_on_posting">{L_DISPLAY_ON_POSTING}</label></dt>
|
||||||
|
<dd><input type="checkbox" name="display_on_posting" id="display_on_posting" value="1"<!-- IF DISPLAY_ON_POSTING --> checked="checked"<!-- ENDIF --> /></dd>
|
||||||
|
</dl>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
<fieldset class="submit-buttons">
|
<fieldset class="submit-buttons">
|
||||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
<br />
|
||||||
<table cellspacing="1">
|
<table cellspacing="1">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label for="parent">{L_FORUM_PARENT}:</label></dt>
|
<dt><label for="parent">{L_FORUM_PARENT}:</label></dt>
|
||||||
<dd><select id="parent" name="parent_id"><option value="0"<!-- IF not S_PARENT_ID --> selected="selected"<!-- ENDIF -->>{L_NO_PARENT}</option>{S_PARENT_OPTIONS}</select></dd>
|
<dd><select id="parent" name="forum_parent_id"><option value="0"<!-- IF not S_FORUM_PARENT_ID --> selected="selected"<!-- ENDIF -->>{L_NO_PARENT}</option>{S_PARENT_OPTIONS}</select></dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label for="forum_name">{L_FORUM_NAME}:</label></dt>
|
<dt><label for="forum_name">{L_FORUM_NAME}:</label></dt>
|
||||||
|
|
|
@ -362,10 +362,6 @@
|
||||||
<dt><label for="bbcode">{L_DEFAULT_BBCODE}:</label></dt>
|
<dt><label for="bbcode">{L_DEFAULT_BBCODE}:</label></dt>
|
||||||
<dd><input type="radio" class="radio" name="bbcode" value="1"<!-- IF BBCODE --> id="bbcode" checked="checked"<!-- ENDIF --> /> {L_YES} <input type="radio" class="radio" name="bbcode" value="0"<!-- IF not BBCODE --> id="bbcode" checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
|
<dd><input type="radio" class="radio" name="bbcode" value="1"<!-- IF BBCODE --> id="bbcode" checked="checked"<!-- ENDIF --> /> {L_YES} <input type="radio" class="radio" name="bbcode" value="0"<!-- IF not BBCODE --> id="bbcode" checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
|
||||||
<dt><label for="html">{L_DEFAULT_HTML}:</label></dt>
|
|
||||||
<dd><input type="radio" class="radio" name="html" value="1"<!-- IF HTML --> id="html" checked="checked"<!-- ENDIF --> /> {L_YES} <input type="radio" class="radio" name="html" value="0"<!-- IF HTML --> id="html" checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
|
|
||||||
</dl>
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label for="smilies">{L_DEFAULT_SMILIES}:</label></dt>
|
<dt><label for="smilies">{L_DEFAULT_SMILIES}:</label></dt>
|
||||||
<dd><input type="radio" class="radio" name="smilies" value="1"<!-- IF SMILIES --> id="smilies" checked="checked"<!-- ENDIF --> /> {L_YES} <input type="radio" class="radio" name="smilies" value="0"<!-- IF not SMILIES --> id="smilies" checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
|
<dd><input type="radio" class="radio" name="smilies" value="1"<!-- IF SMILIES --> id="smilies" checked="checked"<!-- ENDIF --> /> {L_YES} <input type="radio" class="radio" name="smilies" value="0"<!-- IF not SMILIES --> id="smilies" checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
|
||||||
|
@ -603,11 +599,10 @@
|
||||||
</dt>
|
</dt>
|
||||||
<dd style="text-align: left; margin-left: 110px;"><textarea name="signature" rows="10" cols="60" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{SIGNATURE}</textarea></dd>
|
<dd style="text-align: left; margin-left: 110px;"><textarea name="signature" rows="10" cols="60" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{SIGNATURE}</textarea></dd>
|
||||||
<dd style="text-align: left; margin-left: 110px;">
|
<dd style="text-align: left; margin-left: 110px;">
|
||||||
<!-- IF S_HTML_ALLOWED --><input type="checkbox" name="disable_html"{S_HTML_CHECKED} /> {L_DISABLE_HTML} <!-- ENDIF -->
|
|
||||||
<!-- IF S_BBCODE_ALLOWED --><input type="checkbox" name="disable_bbcode"{S_BBCODE_CHECKED} /> {L_DISABLE_BBCODE} <!-- ENDIF -->
|
<!-- IF S_BBCODE_ALLOWED --><input type="checkbox" name="disable_bbcode"{S_BBCODE_CHECKED} /> {L_DISABLE_BBCODE} <!-- ENDIF -->
|
||||||
<!-- IF S_SMILIES_ALLOWED --><input type="checkbox" name="disable_smilies"{S_SMILIES_CHECKED} /> {L_DISABLE_SMILIES} <!-- ENDIF -->
|
<!-- IF S_SMILIES_ALLOWED --><input type="checkbox" name="disable_smilies"{S_SMILIES_CHECKED} /> {L_DISABLE_SMILIES} <!-- ENDIF -->
|
||||||
<input type="checkbox" name="disable_magic_url"{S_MAGIC_URL_CHECKED} /> {L_DISABLE_MAGIC_URL}
|
<input type="checkbox" name="disable_magic_url"{S_MAGIC_URL_CHECKED} /> {L_DISABLE_MAGIC_URL}
|
||||||
<br /><br /><strong>{L_OPTIONS}: </strong>{HTML_STATUS} :: {BBCODE_STATUS} :: {IMG_STATUS} :: {FLASH_STATUS} :: {SMILIES_STATUS}
|
<br /><br /><strong>{L_OPTIONS}: </strong>{BBCODE_STATUS} :: {IMG_STATUS} :: {FLASH_STATUS} :: {SMILIES_STATUS}
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
|
@ -34,10 +34,11 @@ class acp_bbcodes
|
||||||
{
|
{
|
||||||
case 'add':
|
case 'add':
|
||||||
$bbcode_match = $bbcode_tpl = '';
|
$bbcode_match = $bbcode_tpl = '';
|
||||||
|
$display_on_posting = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'edit':
|
case 'edit':
|
||||||
$sql = 'SELECT bbcode_match, bbcode_tpl
|
$sql = 'SELECT bbcode_match, bbcode_tpl, display_on_posting
|
||||||
FROM ' . BBCODES_TABLE . '
|
FROM ' . BBCODES_TABLE . '
|
||||||
WHERE bbcode_id = ' . $bbcode_id;
|
WHERE bbcode_id = ' . $bbcode_id;
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
@ -50,6 +51,7 @@ class acp_bbcodes
|
||||||
|
|
||||||
$bbcode_match = $row['bbcode_match'];
|
$bbcode_match = $row['bbcode_match'];
|
||||||
$bbcode_tpl = htmlspecialchars($row['bbcode_tpl']);
|
$bbcode_tpl = htmlspecialchars($row['bbcode_tpl']);
|
||||||
|
$display_on_posting = $row['display_on_posting'];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'modify':
|
case 'modify':
|
||||||
|
@ -67,6 +69,8 @@ class acp_bbcodes
|
||||||
// No break here
|
// No break here
|
||||||
|
|
||||||
case 'create':
|
case 'create':
|
||||||
|
$display_on_posting = request_var('display_on_posting', 0);
|
||||||
|
|
||||||
$bbcode_match = (isset($_POST['bbcode_match'])) ? htmlspecialchars(stripslashes($_POST['bbcode_match'])) : '';
|
$bbcode_match = (isset($_POST['bbcode_match'])) ? htmlspecialchars(stripslashes($_POST['bbcode_match'])) : '';
|
||||||
$bbcode_tpl = (isset($_POST['bbcode_tpl'])) ? stripslashes($_POST['bbcode_tpl']) : '';
|
$bbcode_tpl = (isset($_POST['bbcode_tpl'])) ? stripslashes($_POST['bbcode_tpl']) : '';
|
||||||
break;
|
break;
|
||||||
|
@ -83,9 +87,9 @@ class acp_bbcodes
|
||||||
'U_BACK' => $this->u_action,
|
'U_BACK' => $this->u_action,
|
||||||
'U_ACTION' => $this->u_action . '&action=' . (($action == 'add') ? 'create' : 'modify') . (($bbcode_id) ? "&bbcode=$bbcode_id" : ''),
|
'U_ACTION' => $this->u_action . '&action=' . (($action == 'add') ? 'create' : 'modify') . (($bbcode_id) ? "&bbcode=$bbcode_id" : ''),
|
||||||
|
|
||||||
'BBCODE_MATCH' => $bbcode_match,
|
'BBCODE_MATCH' => $bbcode_match,
|
||||||
'BBCODE_TPL' => $bbcode_tpl,
|
'BBCODE_TPL' => $bbcode_tpl,
|
||||||
)
|
'DISPLAY_ON_POSTING' => $display_on_posting)
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach ($user->lang['tokens'] as $token => $token_explain)
|
foreach ($user->lang['tokens'] as $token => $token_explain)
|
||||||
|
@ -109,6 +113,7 @@ class acp_bbcodes
|
||||||
'bbcode_tag' => $data['bbcode_tag'],
|
'bbcode_tag' => $data['bbcode_tag'],
|
||||||
'bbcode_match' => $bbcode_match,
|
'bbcode_match' => $bbcode_match,
|
||||||
'bbcode_tpl' => $bbcode_tpl,
|
'bbcode_tpl' => $bbcode_tpl,
|
||||||
|
'display_on_posting' => $display_on_posting,
|
||||||
'first_pass_match' => $data['first_pass_match'],
|
'first_pass_match' => $data['first_pass_match'],
|
||||||
'first_pass_replace' => $data['first_pass_replace'],
|
'first_pass_replace' => $data['first_pass_replace'],
|
||||||
'second_pass_match' => $data['second_pass_match'],
|
'second_pass_match' => $data['second_pass_match'],
|
||||||
|
@ -170,6 +175,7 @@ class acp_bbcodes
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'delete':
|
case 'delete':
|
||||||
|
|
||||||
$sql = 'SELECT bbcode_tag
|
$sql = 'SELECT bbcode_tag
|
||||||
FROM ' . BBCODES_TABLE . "
|
FROM ' . BBCODES_TABLE . "
|
||||||
WHERE bbcode_id = $bbcode_id";
|
WHERE bbcode_id = $bbcode_id";
|
||||||
|
@ -186,7 +192,7 @@ class acp_bbcodes
|
||||||
}
|
}
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'U_ACTION' => $this->u_action . '&mode=add')
|
'U_ACTION' => $this->u_action . '&action=add')
|
||||||
);
|
);
|
||||||
|
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
|
@ -312,7 +318,7 @@ class acp_bbcodes
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lowercase tags
|
// Lowercase tags
|
||||||
$bbcode_tag = preg_replace('/.*?\[([a-z]+).*/i', '$1', $msg_bbcode);
|
$bbcode_tag = preg_replace('/.*?\[([a-z]+=?).*/i', '$1', $msg_bbcode);
|
||||||
$fp_match = preg_replace('#\[/?' . $bbcode_tag . '#ie', "strtolower('\$0')", $fp_match);
|
$fp_match = preg_replace('#\[/?' . $bbcode_tag . '#ie', "strtolower('\$0')", $fp_match);
|
||||||
$fp_replace = preg_replace('#\[/?' . $bbcode_tag . '#ie', "strtolower('\$0')", $fp_replace);
|
$fp_replace = preg_replace('#\[/?' . $bbcode_tag . '#ie', "strtolower('\$0')", $fp_replace);
|
||||||
$sp_match = preg_replace('#\[/?' . $bbcode_tag . '#ie', "strtolower('\$0')", $sp_match);
|
$sp_match = preg_replace('#\[/?' . $bbcode_tag . '#ie', "strtolower('\$0')", $sp_match);
|
||||||
|
|
|
@ -117,7 +117,6 @@ class acp_board
|
||||||
'default_dateformat' => array('lang' => 'DEFAULT_DATE_FORMAT', 'type' => 'text::255', 'explain' => true),
|
'default_dateformat' => array('lang' => 'DEFAULT_DATE_FORMAT', 'type' => 'text::255', 'explain' => true),
|
||||||
'board_timezone' => array('lang' => 'SYSTEM_TIMEZONE', 'type' => 'select', 'function' => 'tz_select', 'params' => array('{CONFIG_VALUE}'), 'explain' => false),
|
'board_timezone' => array('lang' => 'SYSTEM_TIMEZONE', 'type' => 'select', 'function' => 'tz_select', 'params' => array('{CONFIG_VALUE}'), 'explain' => false),
|
||||||
'board_dst' => array('lang' => 'SYSTEM_DST', 'type' => 'radio:yes_no', 'explain' => false),
|
'board_dst' => array('lang' => 'SYSTEM_DST', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
'allow_html_tags' => array('lang' => 'ALLOWED_TAGS', 'type' => 'text:30:255', 'explain' => true),
|
|
||||||
'max_sig_chars' => array('lang' => 'MAX_SIG_LENGTH', 'type' => 'text:5:4', 'explain' => true),
|
'max_sig_chars' => array('lang' => 'MAX_SIG_LENGTH', 'type' => 'text:5:4', 'explain' => true),
|
||||||
'max_sig_urls' => array('lang' => 'MAX_SIG_URLS', 'type' => 'text:5:4', 'explain' => true),
|
'max_sig_urls' => array('lang' => 'MAX_SIG_URLS', 'type' => 'text:5:4', 'explain' => true),
|
||||||
'max_sig_font_size' => array('lang' => 'MAX_SIG_FONT_SIZE', 'type' => 'text:5:4', 'explain' => true),
|
'max_sig_font_size' => array('lang' => 'MAX_SIG_FONT_SIZE', 'type' => 'text:5:4', 'explain' => true),
|
||||||
|
@ -131,14 +130,12 @@ class acp_board
|
||||||
'allow_forum_notify' => array('lang' => 'ALLOW_FORUM_NOTIFY', 'type' => 'radio:yes_no', 'explain' => false),
|
'allow_forum_notify' => array('lang' => 'ALLOW_FORUM_NOTIFY', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
'allow_namechange' => array('lang' => 'ALLOW_NAME_CHANGE', 'type' => 'radio:yes_no', 'explain' => false),
|
'allow_namechange' => array('lang' => 'ALLOW_NAME_CHANGE', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
'allow_attachments' => array('lang' => 'ALLOW_ATTACHMENTS', 'type' => 'radio:yes_no', 'explain' => false),
|
'allow_attachments' => array('lang' => 'ALLOW_ATTACHMENTS', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
'allow_html' => array('lang' => 'ALLOW_HTML', 'type' => 'radio:yes_no', 'explain' => false),
|
|
||||||
'allow_bbcode' => array('lang' => 'ALLOW_BBCODE', 'type' => 'radio:yes_no', 'explain' => false),
|
'allow_bbcode' => array('lang' => 'ALLOW_BBCODE', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
'allow_smilies' => array('lang' => 'ALLOW_SMILIES', 'type' => 'radio:yes_no', 'explain' => false),
|
'allow_smilies' => array('lang' => 'ALLOW_SMILIES', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
'allow_sig' => array('lang' => 'ALLOW_SIG', 'type' => 'radio:yes_no', 'explain' => false),
|
'allow_sig' => array('lang' => 'ALLOW_SIG', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
'allow_sig_bbcode' => array('lang' => 'ALLOW_SIG_BBCODE', 'type' => 'radio:yes_no', 'explain' => false),
|
'allow_sig_bbcode' => array('lang' => 'ALLOW_SIG_BBCODE', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
'allow_sig_img' => array('lang' => 'ALLOW_SIG_IMG', 'type' => 'radio:yes_no', 'explain' => false),
|
'allow_sig_img' => array('lang' => 'ALLOW_SIG_IMG', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
'allow_sig_flash' => array('lang' => 'ALLOW_SIG_FLASH', 'type' => 'radio:yes_no', 'explain' => false),
|
'allow_sig_flash' => array('lang' => 'ALLOW_SIG_FLASH', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
'allow_sig_html' => array('lang' => 'ALLOW_SIG_HTML', 'type' => 'radio:yes_no', 'explain' => false),
|
|
||||||
'allow_sig_smilies' => array('lang' => 'ALLOW_SIG_SMILIES', 'type' => 'radio:yes_no', 'explain' => false),
|
'allow_sig_smilies' => array('lang' => 'ALLOW_SIG_SMILIES', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'type' => 'radio:yes_no', 'explain' => true),
|
'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'type' => 'radio:yes_no', 'explain' => true),
|
||||||
'allow_bookmarks' => array('lang' => 'ALLOW_BOOKMARKS', 'type' => 'radio:yes_no', 'explain' => true)
|
'allow_bookmarks' => array('lang' => 'ALLOW_BOOKMARKS', 'type' => 'radio:yes_no', 'explain' => true)
|
||||||
|
@ -253,7 +250,6 @@ class acp_board
|
||||||
|
|
||||||
'legend2' => 'GENERAL_OPTIONS',
|
'legend2' => 'GENERAL_OPTIONS',
|
||||||
'allow_mass_pm' => array('lang' => 'ALLOW_MASS_PM', 'type' => 'radio:yes_no', 'explain' => false),
|
'allow_mass_pm' => array('lang' => 'ALLOW_MASS_PM', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
'auth_html_pm' => array('lang' => 'ALLOW_HTML_PM', 'type' => 'radio:yes_no', 'explain' => false),
|
|
||||||
'auth_bbcode_pm' => array('lang' => 'ALLOW_BBCODE_PM', 'type' => 'radio:yes_no', 'explain' => false),
|
'auth_bbcode_pm' => array('lang' => 'ALLOW_BBCODE_PM', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
'auth_smilies_pm' => array('lang' => 'ALLOW_SMILIES_PM', 'type' => 'radio:yes_no', 'explain' => false),
|
'auth_smilies_pm' => array('lang' => 'ALLOW_SMILIES_PM', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'type' => 'radio:yes_no', 'explain' => false),
|
'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
|
|
|
@ -91,7 +91,7 @@ class acp_forums
|
||||||
case 'add':
|
case 'add':
|
||||||
|
|
||||||
$forum_data += array(
|
$forum_data += array(
|
||||||
'parent_id' => $this->parent_id,
|
'parent_id' => request_var('forum_parent_id', $this->parent_id),
|
||||||
'forum_type' => request_var('forum_type', FORUM_POST),
|
'forum_type' => request_var('forum_type', FORUM_POST),
|
||||||
'type_action' => request_var('type_action', ''),
|
'type_action' => request_var('type_action', ''),
|
||||||
'forum_status' => request_var('forum_status', ITEM_UNLOCKED),
|
'forum_status' => request_var('forum_status', ITEM_UNLOCKED),
|
||||||
|
@ -132,7 +132,7 @@ class acp_forums
|
||||||
$forum_data['forum_rules_flags'] = (($allow_bbcode) ? 1 : 0) + (($allow_smilies) ? 2 : 0) + (($allow_urls) ? 4 : 0);
|
$forum_data['forum_rules_flags'] = (($allow_bbcode) ? 1 : 0) + (($allow_smilies) ? 2 : 0) + (($allow_urls) ? 4 : 0);
|
||||||
|
|
||||||
$message_parser = new parse_message($forum_data['forum_rules']);
|
$message_parser = new parse_message($forum_data['forum_rules']);
|
||||||
$message_parser->parse(false, $allow_bbcode, $allow_urls, $allow_smilies);
|
$message_parser->parse($allow_bbcode, $allow_urls, $allow_smilies);
|
||||||
|
|
||||||
$forum_data['forum_rules'] = $message_parser->message;
|
$forum_data['forum_rules'] = $message_parser->message;
|
||||||
$forum_data['forum_rules_bbcode_uid'] = $message_parser->bbcode_uid;
|
$forum_data['forum_rules_bbcode_uid'] = $message_parser->bbcode_uid;
|
||||||
|
@ -363,7 +363,7 @@ class acp_forums
|
||||||
$forum_data = $row;
|
$forum_data = $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
$parents_list = make_forum_select($this->parent_id, $forum_id, false, false, false);
|
$parents_list = make_forum_select($forum_data['parent_id'], $forum_id, false, false, false);
|
||||||
|
|
||||||
$forum_data['forum_password_confirm'] = $forum_data['forum_password'];
|
$forum_data['forum_password_confirm'] = $forum_data['forum_password'];
|
||||||
}
|
}
|
||||||
|
@ -421,10 +421,10 @@ class acp_forums
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$message_parser->parse(false, ($forum_data['forum_rules_flags'] & 1), ($forum_data['forum_rules_flags'] & 4), ($forum_data['forum_rules_flags'] & 2));
|
$message_parser->parse(($forum_data['forum_rules_flags'] & 1), ($forum_data['forum_rules_flags'] & 4), ($forum_data['forum_rules_flags'] & 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
$forum_rules_preview = $message_parser->format_display(false, ($forum_data['forum_rules_flags'] & 1), ($forum_data['forum_rules_flags'] & 4), ($forum_data['forum_rules_flags'] & 2), false);
|
$forum_rules_preview = $message_parser->format_display(($forum_data['forum_rules_flags'] & 1), ($forum_data['forum_rules_flags'] & 4), ($forum_data['forum_rules_flags'] & 2), false);
|
||||||
$forum_rules_plain = $message_parser->decode_message('', false);
|
$forum_rules_plain = $message_parser->decode_message('', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -449,17 +449,17 @@ class acp_forums
|
||||||
if ($db->sql_fetchrow($result))
|
if ($db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_MOVE_FORUM_OPTIONS' => make_forum_select($this->parent_id, $forum_id, false, true, false))
|
'S_MOVE_FORUM_OPTIONS' => make_forum_select($forum_data['parent_id'], $forum_id, false, true, false))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
$s_show_display_on_index = false;
|
$s_show_display_on_index = false;
|
||||||
|
|
||||||
if ($action == 'edit' && $this->parent_id > 0)
|
if ($action == 'edit' && $forum_data['parent_id'] > 0)
|
||||||
{
|
{
|
||||||
// if this forum is a subforum put the "display on index" checkbox
|
// if this forum is a subforum put the "display on index" checkbox
|
||||||
if ($parent_info = $this->get_forum_info($this->parent_id))
|
if ($parent_info = $this->get_forum_info($forum_data['parent_id']))
|
||||||
{
|
{
|
||||||
if ($parent_info['parent_id'] > 0 || $parent_info['forum_type'] == FORUM_CAT)
|
if ($parent_info['parent_id'] > 0 || $parent_info['forum_type'] == FORUM_CAT)
|
||||||
{
|
{
|
||||||
|
@ -469,10 +469,11 @@ class acp_forums
|
||||||
}
|
}
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_EDIT_FORUM' => true,
|
'S_EDIT_FORUM' => true,
|
||||||
'S_ERROR' => (sizeof($errors)) ? true : false,
|
'S_ERROR' => (sizeof($errors)) ? true : false,
|
||||||
'S_PARENT_ID' => $this->parent_id,
|
'S_PARENT_ID' => $this->parent_id,
|
||||||
'S_ADD_ACTION' => ($action == 'add') ? true : false,
|
'S_FORUM_PARENT_ID' => $forum_data['parent_id'],
|
||||||
|
'S_ADD_ACTION' => ($action == 'add') ? true : false,
|
||||||
|
|
||||||
'U_BACK' => $this->u_action . '&parent_id=' . $this->parent_id,
|
'U_BACK' => $this->u_action . '&parent_id=' . $this->parent_id,
|
||||||
'U_EDIT_ACTION' => $this->u_action . "&parent_id={$this->parent_id}&action=$action&f=$forum_id",
|
'U_EDIT_ACTION' => $this->u_action . "&parent_id={$this->parent_id}&action=$action&f=$forum_id",
|
||||||
|
@ -545,7 +546,7 @@ class acp_forums
|
||||||
$subforums_id[] = $row['forum_id'];
|
$subforums_id[] = $row['forum_id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$forums_list = make_forum_select($this->parent_id, $subforums_id);
|
$forums_list = make_forum_select($forum_data['parent_id'], $subforums_id);
|
||||||
|
|
||||||
$sql = 'SELECT forum_id
|
$sql = 'SELECT forum_id
|
||||||
FROM ' . FORUMS_TABLE . '
|
FROM ' . FORUMS_TABLE . '
|
||||||
|
@ -556,14 +557,16 @@ class acp_forums
|
||||||
if ($db->sql_fetchrow($result))
|
if ($db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_MOVE_FORUM_OPTIONS' => make_forum_select($this->parent_id, $subforums_id)) // , false, true, false???
|
'S_MOVE_FORUM_OPTIONS' => make_forum_select($forum_data['parent_id'], $subforums_id)) // , false, true, false???
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
$parent_id = ($this->parent_id == $forum_id) ? 0 : $this->parent_id;
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_DELETE_FORUM' => true,
|
'S_DELETE_FORUM' => true,
|
||||||
'U_ACTION' => $this->u_action . "&parent_id={$this->parent_id}&action=delete&f=$forum_id",
|
'U_ACTION' => $this->u_action . "&parent_id={$parent_id}&action=delete&f=$forum_id",
|
||||||
'U_BACK' => $this->u_action . '&parent_id=' . $this->parent_id,
|
'U_BACK' => $this->u_action . '&parent_id=' . $this->parent_id,
|
||||||
|
|
||||||
'FORUM_NAME' => $forum_data['forum_name'],
|
'FORUM_NAME' => $forum_data['forum_name'],
|
||||||
|
@ -1209,6 +1212,10 @@ class acp_forums
|
||||||
case 'POSTS_':
|
case 'POSTS_':
|
||||||
add_log('admin', 'LOG_FORUM_DEL_POSTS', $forum_data['forum_name']);
|
add_log('admin', 'LOG_FORUM_DEL_POSTS', $forum_data['forum_name']);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
add_log('admin', 'LOG_FORUM_DEL_FORUM', $forum_data['forum_name']);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $errors;
|
return $errors;
|
||||||
|
|
|
@ -1015,7 +1015,6 @@ class acp_users
|
||||||
'view_wordcensor' => false,
|
'view_wordcensor' => false,
|
||||||
|
|
||||||
'bbcode' => true,
|
'bbcode' => true,
|
||||||
'html' => false,
|
|
||||||
'smilies' => true,
|
'smilies' => true,
|
||||||
'sig' => true,
|
'sig' => true,
|
||||||
'notify' => false,
|
'notify' => false,
|
||||||
|
@ -1050,7 +1049,6 @@ class acp_users
|
||||||
$this->optionset($user_row, 'viewavatars', $data['view_avatars']);
|
$this->optionset($user_row, 'viewavatars', $data['view_avatars']);
|
||||||
$this->optionset($user_row, 'viewcensors', $data['view_wordcensor']);
|
$this->optionset($user_row, 'viewcensors', $data['view_wordcensor']);
|
||||||
$this->optionset($user_row, 'bbcode', $data['bbcode']);
|
$this->optionset($user_row, 'bbcode', $data['bbcode']);
|
||||||
$this->optionset($user_row, 'html', $data['html']);
|
|
||||||
$this->optionset($user_row, 'smilies', $data['smilies']);
|
$this->optionset($user_row, 'smilies', $data['smilies']);
|
||||||
$this->optionset($user_row, 'attachsig', $data['sig']);
|
$this->optionset($user_row, 'attachsig', $data['sig']);
|
||||||
|
|
||||||
|
@ -1181,7 +1179,6 @@ class acp_users
|
||||||
'REPORT_PM_NOTIFY' => (isset($data['report_pm_notify'])) ? $data['report_pm_notify'] : $this->optionget($user_row, 'report_pm_notify'),
|
'REPORT_PM_NOTIFY' => (isset($data['report_pm_notify'])) ? $data['report_pm_notify'] : $this->optionget($user_row, 'report_pm_notify'),
|
||||||
'DST' => (isset($data['dst'])) ? $data['dst'] : $user_row['user_dst'],
|
'DST' => (isset($data['dst'])) ? $data['dst'] : $user_row['user_dst'],
|
||||||
'BBCODE' => (isset($data['bbcode'])) ? $data['bbcode'] : $this->optionget($user_row, 'bbcode'),
|
'BBCODE' => (isset($data['bbcode'])) ? $data['bbcode'] : $this->optionget($user_row, 'bbcode'),
|
||||||
'HTML' => (isset($data['html'])) ? $data['html'] : $this->optionget($user_row, 'html'),
|
|
||||||
'SMILIES' => (isset($data['smilies'])) ? $data['smilies'] : $this->optionget($user_row, 'smilies'),
|
'SMILIES' => (isset($data['smilies'])) ? $data['smilies'] : $this->optionget($user_row, 'smilies'),
|
||||||
'ATTACH_SIG' => (isset($data['sig'])) ? $data['sig'] : $this->optionget($user_row, 'attachsig'),
|
'ATTACH_SIG' => (isset($data['sig'])) ? $data['sig'] : $this->optionget($user_row, 'attachsig'),
|
||||||
'NOTIFY' => (isset($data['notify'])) ? $data['notify'] : $user_row['user_notify'],
|
'NOTIFY' => (isset($data['notify'])) ? $data['notify'] : $user_row['user_notify'],
|
||||||
|
@ -1398,7 +1395,6 @@ class acp_users
|
||||||
|
|
||||||
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
||||||
|
|
||||||
$enable_html = ($config['allow_sig_html']) ? request_var('enable_html', false) : false;
|
|
||||||
$enable_bbcode = ($config['allow_sig_bbcode']) ? request_var('enable_bbcode', $this->optionget($user_row, 'bbcode')) : false;
|
$enable_bbcode = ($config['allow_sig_bbcode']) ? request_var('enable_bbcode', $this->optionget($user_row, 'bbcode')) : false;
|
||||||
$enable_smilies = ($config['allow_sig_smilies']) ? request_var('enable_smilies', $this->optionget($user_row, 'smilies')) : false;
|
$enable_smilies = ($config['allow_sig_smilies']) ? request_var('enable_smilies', $this->optionget($user_row, 'smilies')) : false;
|
||||||
$enable_urls = request_var('enable_urls', true);
|
$enable_urls = request_var('enable_urls', true);
|
||||||
|
@ -1413,7 +1409,7 @@ class acp_users
|
||||||
$message_parser = new parse_message($signature);
|
$message_parser = new parse_message($signature);
|
||||||
|
|
||||||
// Allowing Quote BBCode
|
// Allowing Quote BBCode
|
||||||
$message_parser->parse($enable_html, $enable_bbcode, $enable_urls, $enable_smilies, $config['allow_sig_img'], $config['allow_sig_flash'], true, true, 'sig');
|
$message_parser->parse($enable_bbcode, $enable_urls, $enable_smilies, $config['allow_sig_img'], $config['allow_sig_flash'], true, true, 'sig');
|
||||||
|
|
||||||
if (sizeof($message_parser->warn_msg))
|
if (sizeof($message_parser->warn_msg))
|
||||||
{
|
{
|
||||||
|
@ -1445,7 +1441,7 @@ class acp_users
|
||||||
if ($preview)
|
if ($preview)
|
||||||
{
|
{
|
||||||
// Now parse it for displaying
|
// Now parse it for displaying
|
||||||
$signature_preview = $message_parser->format_display($enable_html, $enable_bbcode, $enable_urls, $enable_smilies, false);
|
$signature_preview = $message_parser->format_display($enable_bbcode, $enable_urls, $enable_smilies, false);
|
||||||
unset($message_parser);
|
unset($message_parser);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1457,12 +1453,10 @@ class acp_users
|
||||||
'SIGNATURE' => $signature,
|
'SIGNATURE' => $signature,
|
||||||
'SIGNATURE_PREVIEW' => $signature_preview,
|
'SIGNATURE_PREVIEW' => $signature_preview,
|
||||||
|
|
||||||
'S_HTML_CHECKED' => (!$enable_html) ? 'checked="checked"' : '',
|
|
||||||
'S_BBCODE_CHECKED' => (!$enable_bbcode) ? 'checked="checked"' : '',
|
'S_BBCODE_CHECKED' => (!$enable_bbcode) ? 'checked="checked"' : '',
|
||||||
'S_SMILIES_CHECKED' => (!$enable_smilies) ? 'checked="checked"' : '',
|
'S_SMILIES_CHECKED' => (!$enable_smilies) ? 'checked="checked"' : '',
|
||||||
'S_MAGIC_URL_CHECKED' => (!$enable_urls) ? 'checked="checked"' : '',
|
'S_MAGIC_URL_CHECKED' => (!$enable_urls) ? 'checked="checked"' : '',
|
||||||
|
|
||||||
'HTML_STATUS' => ($config['allow_sig_html']) ? $user->lang['HTML_IS_ON'] : $user->lang['HTML_IS_OFF'],
|
|
||||||
'BBCODE_STATUS' => ($config['allow_sig_bbcode']) ? sprintf($user->lang['BBCODE_IS_ON'], '<a href="' . $phpbb_root_path . "faq.$phpEx$SID&mode=bbcode" . '" onclick="target=\'_phpbbcode\';">', '</a>') : sprintf($user->lang['BBCODE_IS_OFF'], '<a href="' . "{$phpbb_root_path}faq.$phpEx$SID&mode=bbcode" . '" onclick="target=\'_phpbbcode\';">', '</a>'),
|
'BBCODE_STATUS' => ($config['allow_sig_bbcode']) ? sprintf($user->lang['BBCODE_IS_ON'], '<a href="' . $phpbb_root_path . "faq.$phpEx$SID&mode=bbcode" . '" onclick="target=\'_phpbbcode\';">', '</a>') : sprintf($user->lang['BBCODE_IS_OFF'], '<a href="' . "{$phpbb_root_path}faq.$phpEx$SID&mode=bbcode" . '" onclick="target=\'_phpbbcode\';">', '</a>'),
|
||||||
'SMILIES_STATUS' => ($config['allow_sig_smilies']) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'],
|
'SMILIES_STATUS' => ($config['allow_sig_smilies']) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'],
|
||||||
'IMG_STATUS' => ($config['allow_sig_img']) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'],
|
'IMG_STATUS' => ($config['allow_sig_img']) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'],
|
||||||
|
@ -1470,7 +1464,6 @@ class acp_users
|
||||||
|
|
||||||
'L_SIGNATURE_EXPLAIN' => sprintf($user->lang['SIGNATURE_EXPLAIN'], $config['max_sig_chars']),
|
'L_SIGNATURE_EXPLAIN' => sprintf($user->lang['SIGNATURE_EXPLAIN'], $config['max_sig_chars']),
|
||||||
|
|
||||||
'S_HTML_ALLOWED' => $config['allow_sig_html'],
|
|
||||||
'S_BBCODE_ALLOWED' => $config['allow_sig_bbcode'],
|
'S_BBCODE_ALLOWED' => $config['allow_sig_bbcode'],
|
||||||
'S_SMILIES_ALLOWED' => $config['allow_sig_smilies'],)
|
'S_SMILIES_ALLOWED' => $config['allow_sig_smilies'],)
|
||||||
);
|
);
|
||||||
|
|
|
@ -1771,95 +1771,136 @@ function split_sql_file($sql, $delimiter)
|
||||||
/**
|
/**
|
||||||
* Cache moderators, called whenever permissions are changed via admin_permissions. Changes of username
|
* Cache moderators, called whenever permissions are changed via admin_permissions. Changes of username
|
||||||
* and group names must be carried through for the moderators table
|
* and group names must be carried through for the moderators table
|
||||||
|
*
|
||||||
|
* @todo let the admin define if he wants to display moderators (forum-based) - display_on_index already present and checked for...
|
||||||
*/
|
*/
|
||||||
function cache_moderators()
|
function cache_moderators()
|
||||||
{
|
{
|
||||||
global $db, $cache;
|
global $db, $cache, $auth, $phpbb_root_path, $phpEx;
|
||||||
|
|
||||||
// Clear table
|
// Clear table
|
||||||
$sql = (SQL_LAYER != 'sqlite') ? 'TRUNCATE ' . MODERATOR_TABLE : 'DELETE FROM ' . MODERATOR_TABLE;
|
$sql = (SQL_LAYER != 'sqlite') ? 'TRUNCATE ' . MODERATOR_TABLE : 'DELETE FROM ' . MODERATOR_TABLE;
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
|
|
||||||
// Holding array
|
// We add moderators who have forum moderator permissions without an explicit ACL_NO setting
|
||||||
$m_sql = array();
|
$hold_ary = $ug_id_ary = $sql_ary = array();
|
||||||
$user_id_sql = '';
|
|
||||||
|
|
||||||
$sql = 'SELECT a.forum_id, u.user_id, u.username
|
// Grab all users having moderative options...
|
||||||
FROM ' . ACL_OPTIONS_TABLE . ' o, ' . ACL_USERS_TABLE . ' a, ' . USERS_TABLE . " u
|
$hold_ary = $auth->acl_user_raw_data(false, 'm_%', false);
|
||||||
WHERE o.auth_option = 'm_'
|
|
||||||
AND a.auth_option_id = o.auth_option_id
|
|
||||||
AND a.auth_setting = " . ACL_YES . '
|
|
||||||
AND u.user_id = a.user_id';
|
|
||||||
$result = $db->sql_query($sql);
|
|
||||||
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
// Add users?
|
||||||
|
if (sizeof($hold_ary))
|
||||||
{
|
{
|
||||||
$m_sql['f_' . $row['forum_id'] . '_u_' . $row['user_id']] = $row['forum_id'] . ', ' . $row['user_id'] . ", '" . $row['username'] . "', NULL, NULL";
|
// At least one moderative option warrants a display
|
||||||
$user_id_sql .= (($user_id_sql) ? ', ' : '') . $row['user_id'];
|
$ug_id_ary = array_keys($hold_ary);
|
||||||
}
|
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
// Remove users who have group memberships with DENY moderator permissions
|
// Remove users who have group memberships with DENY moderator permissions
|
||||||
if ($user_id_sql)
|
|
||||||
{
|
|
||||||
$sql = 'SELECT a.forum_id, ug.user_id
|
$sql = 'SELECT a.forum_id, ug.user_id
|
||||||
FROM ' . ACL_OPTIONS_TABLE . ' o, ' . ACL_GROUPS_TABLE . ' a, ' . USER_GROUP_TABLE . " ug
|
FROM (' . ACL_OPTIONS_TABLE . ' o, ' . ACL_GROUPS_TABLE . ' a, ' . USER_GROUP_TABLE . ' ug)
|
||||||
WHERE o.auth_option = 'm_'
|
LEFT JOIN ' . ACL_ROLES_DATA_TABLE . ' r ON (a.auth_role_id = r.role_id)
|
||||||
AND a.auth_option_id = o.auth_option_id
|
WHERE (o.auth_option_id = a.auth_option_id OR o.auth_option_id = r.auth_option_id)
|
||||||
AND a.auth_setting = " . ACL_NO . "
|
AND ((a.auth_setting = ' . ACL_NO . ' AND r.auth_setting IS NULL)
|
||||||
|
OR r.auth_setting = ' . ACL_NO . ')
|
||||||
AND a.group_id = ug.group_id
|
AND a.group_id = ug.group_id
|
||||||
AND ug.user_id IN ($user_id_sql)";
|
AND ug.user_id IN (' . implode(', ', $ug_id_ary) . ")
|
||||||
|
AND o.auth_option LIKE 'm\_%'";
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
unset($m_sql['f_' . $row['forum_id'] . '_u_' . $row['user_id']]);
|
if (isset($hold_ary[$row['user_id']][$row['forum_id']]))
|
||||||
|
{
|
||||||
|
unset($hold_ary[$row['user_id']][$row['forum_id']]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
if (sizeof($hold_ary))
|
||||||
|
{
|
||||||
|
// Get usernames...
|
||||||
|
$sql = 'SELECT user_id, username
|
||||||
|
FROM ' . USERS_TABLE . '
|
||||||
|
WHERE user_id IN (' . implode(', ', array_keys($hold_ary)) . ')';
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
$usernames_ary = array();
|
||||||
|
while ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
$usernames_ary[$row['user_id']] = $row['username'];
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($hold_ary as $user_id => $forum_id_ary)
|
||||||
|
{
|
||||||
|
foreach ($forum_id_ary as $forum_id => $auth_ary)
|
||||||
|
{
|
||||||
|
$sql_ary[] = array(
|
||||||
|
'forum_id' => $forum_id,
|
||||||
|
'user_id' => $user_id,
|
||||||
|
'username' => $usernames_ary[$user_id],
|
||||||
|
'group_id' => 0,
|
||||||
|
'groupname' => ''
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = 'SELECT a.forum_id, g.group_name, g.group_id
|
// Now to the groups...
|
||||||
FROM ' . ACL_OPTIONS_TABLE . ' o, ' . ACL_GROUPS_TABLE . ' a, ' . GROUPS_TABLE . " g
|
$hold_ary = $auth->acl_group_raw_data(false, 'm_%', false);
|
||||||
WHERE o.auth_option = 'm_'
|
|
||||||
AND a.auth_option_id = o.auth_option_id
|
|
||||||
AND a.auth_setting = " . ACL_YES . '
|
|
||||||
AND g.group_id = a.group_id
|
|
||||||
AND g.group_type NOT IN (' . GROUP_HIDDEN . ', ' . GROUP_SPECIAL . ')';
|
|
||||||
$result = $db->sql_query($sql);
|
|
||||||
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
if (sizeof($hold_ary))
|
||||||
{
|
{
|
||||||
$m_sql['f_' . $row['forum_id'] . '_g_' . $row['group_id']] = $row['forum_id'] . ', NULL, NULL, ' . $row['group_id'] . ", '" . $row['group_name'] . "'";
|
$ug_id_ary = array_keys($hold_ary);
|
||||||
}
|
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
if (sizeof($m_sql))
|
// Make sure not hidden or special groups are involved...
|
||||||
|
$sql = 'SELECT group_name, group_id, group_type
|
||||||
|
FROM ' . GROUPS_TABLE . '
|
||||||
|
WHERE group_id IN (' . implode(', ', $ug_id_ary) . ')';
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
$groupnames_ary = array();
|
||||||
|
while ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
if ($row['group_type'] == GROUP_HIDDEN || $row['group_type'] == GROUP_SPECIAL)
|
||||||
|
{
|
||||||
|
unset($hold_ary[$row['group_id']]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$groupnames_ary[$row['group_id']] = $row['group_name'];
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
foreach ($hold_ary as $group_id => $forum_id_ary)
|
||||||
|
{
|
||||||
|
foreach ($forum_id_ary as $forum_id => $auth_ary)
|
||||||
|
{
|
||||||
|
$sql_ary[] = array(
|
||||||
|
'forum_id' => $forum_id,
|
||||||
|
'user_id' => 0,
|
||||||
|
'username' => '',
|
||||||
|
'group_id' => $group_id,
|
||||||
|
'groupname' => $groupnames_ary[$group_id]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sizeof($sql_ary))
|
||||||
{
|
{
|
||||||
switch (SQL_LAYER)
|
switch (SQL_LAYER)
|
||||||
{
|
{
|
||||||
case 'mysql':
|
case 'mysql':
|
||||||
$sql = 'INSERT INTO ' . MODERATOR_TABLE . ' (forum_id, user_id, username, group_id, groupname)
|
|
||||||
VALUES ' . implode(', ', preg_replace('#^(.*)$#', '(\1)', $m_sql));
|
|
||||||
$db->sql_query($sql);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'mysql4':
|
case 'mysql4':
|
||||||
case 'mysqli':
|
case 'mysqli':
|
||||||
case 'mssql':
|
$db->sql_query('INSERT INTO ' . MODERATOR_TABLE . ' ' . $db->sql_build_array('MULTI_INSERT', $sql_ary));
|
||||||
case 'mssql_odbc':
|
break;
|
||||||
case 'sqlite':
|
|
||||||
$sql = 'INSERT INTO ' . MODERATOR_TABLE . ' (forum_id, user_id, username, group_id, groupname)
|
|
||||||
' . implode(' UNION ALL ', preg_replace('#^(.*)$#', 'SELECT \1', $m_sql));
|
|
||||||
$db->sql_query($sql);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
foreach ($m_sql as $k => $sql)
|
foreach ($sql_ary as $ary)
|
||||||
{
|
{
|
||||||
$sql = 'INSERT INTO ' . MODERATOR_TABLE . " (forum_id, user_id, username, group_id, groupname)
|
$db->sql_query('INSERT INTO ' . MODERATOR_TABLE . ' ' . $db->sql_build_array('INSERT', $ary));
|
||||||
VALUES ($sql)";
|
|
||||||
$db->sql_query($sql);
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -490,7 +490,6 @@ function decode_message(&$message, $bbcode_uid = '')
|
||||||
'#<!\-\- w \-\-><a href="http:\/\/(.*?)" target="_blank">.*?</a><!\-\- w \-\->#',
|
'#<!\-\- w \-\-><a href="http:\/\/(.*?)" target="_blank">.*?</a><!\-\- w \-\->#',
|
||||||
'#<!\-\- l \-\-><a href="(.*?)">.*?</a><!\-\- l \-\->#',
|
'#<!\-\- l \-\-><a href="(.*?)">.*?</a><!\-\- l \-\->#',
|
||||||
'#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/.*? \/><!\-\- s\1 \-\->#',
|
'#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/.*? \/><!\-\- s\1 \-\->#',
|
||||||
'#<!\-\- h \-\-><(.*?)><!\-\- h \-\->#',
|
|
||||||
'#<.*?>#s'
|
'#<.*?>#s'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -1164,7 +1164,6 @@ function submit_pm($mode, $subject, &$data, $update_message, $put_in_outbox = tr
|
||||||
'author_ip' => $data['from_user_ip'],
|
'author_ip' => $data['from_user_ip'],
|
||||||
'message_time' => $current_time,
|
'message_time' => $current_time,
|
||||||
'enable_bbcode' => $data['enable_bbcode'],
|
'enable_bbcode' => $data['enable_bbcode'],
|
||||||
'enable_html' => $data['enable_html'],
|
|
||||||
'enable_smilies' => $data['enable_smilies'],
|
'enable_smilies' => $data['enable_smilies'],
|
||||||
'enable_magic_url' => $data['enable_urls'],
|
'enable_magic_url' => $data['enable_urls'],
|
||||||
'enable_sig' => $data['enable_sig'],
|
'enable_sig' => $data['enable_sig'],
|
||||||
|
@ -1185,7 +1184,6 @@ function submit_pm($mode, $subject, &$data, $update_message, $put_in_outbox = tr
|
||||||
'icon_id' => $data['icon_id'],
|
'icon_id' => $data['icon_id'],
|
||||||
'message_edit_time' => $current_time,
|
'message_edit_time' => $current_time,
|
||||||
'enable_bbcode' => $data['enable_bbcode'],
|
'enable_bbcode' => $data['enable_bbcode'],
|
||||||
'enable_html' => $data['enable_html'],
|
|
||||||
'enable_smilies' => $data['enable_smilies'],
|
'enable_smilies' => $data['enable_smilies'],
|
||||||
'enable_magic_url' => $data['enable_urls'],
|
'enable_magic_url' => $data['enable_urls'],
|
||||||
'enable_sig' => $data['enable_sig'],
|
'enable_sig' => $data['enable_sig'],
|
||||||
|
|
|
@ -390,12 +390,14 @@ class custom_profile
|
||||||
{
|
{
|
||||||
case 'int':
|
case 'int':
|
||||||
return (int) $value;
|
return (int) $value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'string':
|
case 'string':
|
||||||
return str_replace("\n", '<br />', $value);
|
return str_replace("\n", '<br />', $value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'text':
|
case 'text':
|
||||||
// Prepare further, censor_text, smilies, bbcode, html, whatever
|
// Prepare further, censor_text, smilies, bbcode, whatever
|
||||||
if ($ident_ary['data']['bbcode_bitfield'])
|
if ($ident_ary['data']['bbcode_bitfield'])
|
||||||
{
|
{
|
||||||
$bbcode = new bbcode($ident_ary['data']['bbcode_bitfield']);
|
$bbcode = new bbcode($ident_ary['data']['bbcode_bitfield']);
|
||||||
|
@ -404,9 +406,11 @@ class custom_profile
|
||||||
$value = censor_text($value);
|
$value = censor_text($value);
|
||||||
}
|
}
|
||||||
return str_replace("\n", '<br />', $value);
|
return str_replace("\n", '<br />', $value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'date':
|
case 'date':
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'dropdown':
|
case 'dropdown':
|
||||||
$field_id = $ident_ary['data']['field_id'];
|
$field_id = $ident_ary['data']['field_id'];
|
||||||
$lang_id = $ident_ary['data']['lang_id'];
|
$lang_id = $ident_ary['data']['lang_id'];
|
||||||
|
@ -416,12 +420,14 @@ class custom_profile
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->options_lang[$field_id][$lang_id][(int) $value];
|
return $this->options_lang[$field_id][$lang_id][(int) $value];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'bool':
|
case 'bool':
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
trigger_error('Unknown profile type');
|
trigger_error('Unknown profile type');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -665,6 +671,7 @@ class custom_profile
|
||||||
switch ($profile_row['field_type'])
|
switch ($profile_row['field_type'])
|
||||||
{
|
{
|
||||||
case FIELD_DATE:
|
case FIELD_DATE:
|
||||||
|
|
||||||
if (!isset($_REQUEST[$var_name . '_day']))
|
if (!isset($_REQUEST[$var_name . '_day']))
|
||||||
{
|
{
|
||||||
if ($profile_row['field_default_value'] == 'now')
|
if ($profile_row['field_default_value'] == 'now')
|
||||||
|
@ -682,25 +689,30 @@ class custom_profile
|
||||||
}
|
}
|
||||||
|
|
||||||
$var = sprintf('%2d-%2d-%4d', $day, $month, $year);
|
$var = sprintf('%2d-%2d-%4d', $day, $month, $year);
|
||||||
break;
|
break;
|
||||||
case FIELD_TEXT:
|
|
||||||
include_once($phpbb_root_path . 'includes/message_parser.' . $phpEx);
|
|
||||||
|
|
||||||
$message_parser = new parse_message(request_var($var_name, ''));
|
case FIELD_TEXT:
|
||||||
|
include_once($phpbb_root_path . 'includes/message_parser.' . $phpEx);
|
||||||
|
|
||||||
|
$message_parser = new parse_message(request_var($var_name, ''));
|
||||||
|
|
||||||
// Get the allowed settings from the global settings. Magic URLs are always set to true.
|
/**
|
||||||
// TODO: It might be nice to make this a per field setting.
|
* Get the allowed settings from the global settings. Magic URLs are always set to true.
|
||||||
$message_parser->parse($config['allow_html'], $config['allow_bbcode'], true, $config['allow_smilies']);
|
* @todo It might be nice to make this a per field setting.
|
||||||
$var = array(
|
*/
|
||||||
$profile_row['field_ident'] => $message_parser->message,
|
$message_parser->parse($config['allow_bbcode'], true, $config['allow_smilies']);
|
||||||
$profile_row['field_ident'] . '_bbcode_uid' => $message_parser->bbcode_uid,
|
|
||||||
$profile_row['field_ident'] . '_bbcode_bitfield' => $message_parser->bbcode_bitfield,
|
$var = array(
|
||||||
'submitted' => request_var($var_name, '')
|
$profile_row['field_ident'] => $message_parser->message,
|
||||||
);
|
$profile_row['field_ident'] . '_bbcode_uid' => $message_parser->bbcode_uid,
|
||||||
break;
|
$profile_row['field_ident'] . '_bbcode_bitfield' => $message_parser->bbcode_bitfield,
|
||||||
|
'submitted' => request_var($var_name, '')
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$var = request_var($var_name, $profile_row['field_default_value']);
|
$var = request_var($var_name, $profile_row['field_default_value']);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $var;
|
return $var;
|
||||||
|
|
|
@ -1321,6 +1321,11 @@ function group_delete($group_id, $group_name = false)
|
||||||
WHERE group_id = $group_id";
|
WHERE group_id = $group_id";
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
|
|
||||||
|
// Delete auth entries from the groups table
|
||||||
|
$sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . "
|
||||||
|
WHERE group_id = $group_id";
|
||||||
|
$db->sql_query($sql);
|
||||||
|
|
||||||
add_log('admin', 'LOG_GROUP_DELETE', $group_name);
|
add_log('admin', 'LOG_GROUP_DELETE', $group_name);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -847,7 +847,6 @@ function mcp_fork_topic($topic_ids)
|
||||||
'post_approved' => 1,
|
'post_approved' => 1,
|
||||||
'post_reported' => 0,
|
'post_reported' => 0,
|
||||||
'enable_bbcode' => (int) $row['enable_bbcode'],
|
'enable_bbcode' => (int) $row['enable_bbcode'],
|
||||||
'enable_html' => (int) $row['enable_html'],
|
|
||||||
'enable_smilies' => (int) $row['enable_smilies'],
|
'enable_smilies' => (int) $row['enable_smilies'],
|
||||||
'enable_magic_url' => (int) $row['enable_magic_url'],
|
'enable_magic_url' => (int) $row['enable_magic_url'],
|
||||||
'enable_sig' => (int) $row['enable_sig'],
|
'enable_sig' => (int) $row['enable_sig'],
|
||||||
|
|
|
@ -105,13 +105,6 @@ function mcp_topic_view($id, $mode, $action)
|
||||||
$message = $row['post_text'];
|
$message = $row['post_text'];
|
||||||
$post_subject = ($row['post_subject'] != '') ? $row['post_subject'] : $topic_info['topic_title'];
|
$post_subject = ($row['post_subject'] != '') ? $row['post_subject'] : $topic_info['topic_title'];
|
||||||
|
|
||||||
// If the board has HTML off but the post has HTML
|
|
||||||
// on then we process it, else leave it alone
|
|
||||||
if (!$config['allow_html'] && $row['enable_html'])
|
|
||||||
{
|
|
||||||
$message = preg_replace('#(<)([\/]?.*?)(>)#is', '<\\2>', $message);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($row['bbcode_bitfield'])
|
if ($row['bbcode_bitfield'])
|
||||||
{
|
{
|
||||||
$bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
|
$bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
|
||||||
|
|
|
@ -262,12 +262,6 @@ function mcp_warn_post_view($id, $mode, $action)
|
||||||
// Parse the message and subject
|
// Parse the message and subject
|
||||||
$message = $userrow['post_text'];
|
$message = $userrow['post_text'];
|
||||||
|
|
||||||
// If the board has HTML off but the post has HTML on then we process it, else leave it alone
|
|
||||||
if (!$auth->acl_get('f_html', $userrow['forum_id']) && $row['enable_html'])
|
|
||||||
{
|
|
||||||
$message = preg_replace('#(<!\-\- h \-\-><)([\/]?.*?)(><!\-\- h \-\->)#is', "<\\2>", $message);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Second parse bbcode here
|
// Second parse bbcode here
|
||||||
if ($userrow['bbcode_bitfield'])
|
if ($userrow['bbcode_bitfield'])
|
||||||
{
|
{
|
||||||
|
@ -277,12 +271,6 @@ function mcp_warn_post_view($id, $mode, $action)
|
||||||
// Always process smilies after parsing bbcodes
|
// Always process smilies after parsing bbcodes
|
||||||
$message = smiley_text($message);
|
$message = smiley_text($message);
|
||||||
|
|
||||||
if ($userrow['enable_html'] && $auth->acl_get('f_html', $userrow['forum_id']))
|
|
||||||
{
|
|
||||||
// Remove Comments from post content
|
|
||||||
$message = preg_replace('#<!\-\-(.*?)\-\->#is', '', $message);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Replace naughty words such as farty pants
|
// Replace naughty words such as farty pants
|
||||||
$message = str_replace("\n", '<br />', censor_text($message));
|
$message = str_replace("\n", '<br />', censor_text($message));
|
||||||
|
|
||||||
|
@ -391,7 +379,7 @@ function add_warning($userrow, $warning, $send_pm = true, $post_id = 0)
|
||||||
$message_parser = new parse_message();
|
$message_parser = new parse_message();
|
||||||
$message_parser->message = sprintf($lang['WARNING_PM_BODY'], $warning);
|
$message_parser->message = sprintf($lang['WARNING_PM_BODY'], $warning);
|
||||||
$message_md5 = md5($message_parser->message);
|
$message_md5 = md5($message_parser->message);
|
||||||
$message_parser->parse(false, true, true, true, false, false, true);
|
$message_parser->parse(true, true, true, false, false, true);
|
||||||
|
|
||||||
$pm_data = array(
|
$pm_data = array(
|
||||||
'from_user_id' => $user->data['user_id'],
|
'from_user_id' => $user->data['user_id'],
|
||||||
|
@ -399,7 +387,6 @@ function add_warning($userrow, $warning, $send_pm = true, $post_id = 0)
|
||||||
'from_username' => $user->data['username'],
|
'from_username' => $user->data['username'],
|
||||||
'enable_sig' => false,
|
'enable_sig' => false,
|
||||||
'enable_bbcode' => true,
|
'enable_bbcode' => true,
|
||||||
'enable_html' => false,
|
|
||||||
'enable_smilies' => true,
|
'enable_smilies' => true,
|
||||||
'enable_urls' => false,
|
'enable_urls' => false,
|
||||||
'icon_id' => 0,
|
'icon_id' => 0,
|
||||||
|
|
|
@ -113,7 +113,13 @@ class bbcode_firstpass extends bbcode
|
||||||
'flash' => array('bbcode_id' => 11, 'regexp' => array('#\[flash=([0-9]+),([0-9]+)\](.*?)\[/flash\]#ie' => "\$this->bbcode_flash('\$1', '\$2', '\$3')"))
|
'flash' => array('bbcode_id' => 11, 'regexp' => array('#\[flash=([0-9]+),([0-9]+)\](.*?)\[/flash\]#ie' => "\$this->bbcode_flash('\$1', '\$2', '\$3')"))
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->parsed_items = array('code' => 0, 'quote' => 0, 'attachment' => 0, 'b' => 0, 'i' => 0, 'url' => 0, 'img' => 0, 'size' => 0, 'color' => 0, 'u' => 0, 'list' => 0, 'email' => 0, 'flash' => 0);
|
// Zero the parsed items array
|
||||||
|
$this->parsed_items = array();
|
||||||
|
|
||||||
|
foreach ($this->bbcodes as $tag => $bbcode_data)
|
||||||
|
{
|
||||||
|
$this->parsed_items[$tag] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (!is_array($rowset))
|
if (!is_array($rowset))
|
||||||
{
|
{
|
||||||
|
@ -128,8 +134,9 @@ class bbcode_firstpass extends bbcode
|
||||||
{
|
{
|
||||||
$rowset[] = $row;
|
$rowset[] = $row;
|
||||||
}
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($rowset as $row)
|
foreach ($rowset as $row)
|
||||||
{
|
{
|
||||||
$this->bbcodes[$row['bbcode_tag']] = array(
|
$this->bbcodes[$row['bbcode_tag']] = array(
|
||||||
|
@ -279,7 +286,6 @@ class bbcode_firstpass extends bbcode
|
||||||
'#<!\-\- w \-\-><a href="http:\/\/(.*?)" target="_blank">.*?</a><!\-\- w \-\->#',
|
'#<!\-\- w \-\-><a href="http:\/\/(.*?)" target="_blank">.*?</a><!\-\- w \-\->#',
|
||||||
'#<!\-\- l \-\-><a href="(.*?)">.*?</a><!\-\- l \-\->#',
|
'#<!\-\- l \-\-><a href="(.*?)">.*?</a><!\-\- l \-\->#',
|
||||||
'#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/.*? \/><!\-\- s\1 \-\->#',
|
'#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/.*? \/><!\-\- s\1 \-\->#',
|
||||||
'#<!\-\- h \-\-><(.*?)><!\-\- h \-\->#',
|
|
||||||
'#&\#([0-9]+);#',
|
'#&\#([0-9]+);#',
|
||||||
);
|
);
|
||||||
$htm_replace = array('\1', '\1', '\1', '\1', '\1', '<\1>', '&#\1;');
|
$htm_replace = array('\1', '\1', '\1', '\1', '\1', '<\1>', '&#\1;');
|
||||||
|
@ -694,7 +700,7 @@ class bbcode_firstpass extends bbcode
|
||||||
/**
|
/**
|
||||||
* @package phpBB3
|
* @package phpBB3
|
||||||
* Main message parser for posting, pm, etc. takes raw message
|
* Main message parser for posting, pm, etc. takes raw message
|
||||||
* and parses it for attachments, html, bbcode and smilies
|
* and parses it for attachments, bbcode and smilies
|
||||||
*/
|
*/
|
||||||
class parse_message extends bbcode_firstpass
|
class parse_message extends bbcode_firstpass
|
||||||
{
|
{
|
||||||
|
@ -723,7 +729,7 @@ class parse_message extends bbcode_firstpass
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse Message : public
|
// Parse Message : public
|
||||||
function parse($allow_html, $allow_bbcode, $allow_magic_url, $allow_smilies, $allow_img_bbcode = true, $allow_flash_bbcode = true, $allow_quote_bbcode = true, $update_this_message = true, $mode = 'post')
|
function parse($allow_bbcode, $allow_magic_url, $allow_smilies, $allow_img_bbcode = true, $allow_flash_bbcode = true, $allow_quote_bbcode = true, $update_this_message = true, $mode = 'post')
|
||||||
{
|
{
|
||||||
global $config, $db, $user;
|
global $config, $db, $user;
|
||||||
|
|
||||||
|
@ -766,12 +772,6 @@ class parse_message extends bbcode_firstpass
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse HTML
|
|
||||||
if ($allow_html && $config['allow_html_tags'])
|
|
||||||
{
|
|
||||||
$this->html($config['allow_html_tags']);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Parse smilies
|
// Parse smilies
|
||||||
if ($allow_smilies)
|
if ($allow_smilies)
|
||||||
{
|
{
|
||||||
|
@ -827,7 +827,7 @@ class parse_message extends bbcode_firstpass
|
||||||
}
|
}
|
||||||
|
|
||||||
// Formatting text for display
|
// Formatting text for display
|
||||||
function format_display($allow_html, $allow_bbcode, $allow_magic_url, $allow_smilies, $update_this_message = true)
|
function format_display($allow_bbcode, $allow_magic_url, $allow_smilies, $update_this_message = true)
|
||||||
{
|
{
|
||||||
// If false, then the parsed message get returned but internal message not processed.
|
// If false, then the parsed message get returned but internal message not processed.
|
||||||
if (!$update_this_message)
|
if (!$update_this_message)
|
||||||
|
@ -839,7 +839,7 @@ class parse_message extends bbcode_firstpass
|
||||||
if ($this->message_status == 'plain')
|
if ($this->message_status == 'plain')
|
||||||
{
|
{
|
||||||
// Force updating message - of course.
|
// Force updating message - of course.
|
||||||
$this->parse($allow_html, $allow_bbcode, $allow_magic_url, $allow_smilies, $this->allow_img_bbcode, $this->allow_flash_bbcode, $this->allow_quote_bbcode, true);
|
$this->parse($allow_bbcode, $allow_magic_url, $allow_smilies, $this->allow_img_bbcode, $this->allow_flash_bbcode, $this->allow_quote_bbcode, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse BBcode
|
// Parse BBcode
|
||||||
|
@ -889,19 +889,6 @@ class parse_message extends bbcode_firstpass
|
||||||
$this->message_status = 'plain';
|
$this->message_status = 'plain';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse HTML
|
|
||||||
function html($allowed_tags)
|
|
||||||
{
|
|
||||||
// If $allow_html is true then "allowed_tags" are converted back from entity
|
|
||||||
// form, others remain
|
|
||||||
$allowed_tags = split(',', $allowed_tags);
|
|
||||||
|
|
||||||
if (sizeof($allowed_tags))
|
|
||||||
{
|
|
||||||
$this->message = preg_replace('#<(\/?)(' . str_replace('*', '.*?', implode('|', $allowed_tags)) . ')>#is', '<!-- h --><$1$2><!-- h -->', $this->message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Replace magic urls of form http://xxx.xxx., www.xxx. and xxx@xxx.xxx.
|
// Replace magic urls of form http://xxx.xxx., www.xxx. and xxx@xxx.xxx.
|
||||||
// Cuts down displayed size of link if over 50 chars, turns absolute links
|
// Cuts down displayed size of link if over 50 chars, turns absolute links
|
||||||
// into relative versions when the server/script path matches the link
|
// into relative versions when the server/script path matches the link
|
||||||
|
@ -916,7 +903,7 @@ class parse_message extends bbcode_firstpass
|
||||||
// Be sure to not let the matches cross over. ;)
|
// Be sure to not let the matches cross over. ;)
|
||||||
|
|
||||||
// relative urls for this board
|
// relative urls for this board
|
||||||
$match[] = '#(^|[\n ]|\()(' . preg_quote($server_url, '#') . ')/([^ \t\n\r<"\'\)&]+|&(?!lt;))*)#i';
|
$match[] = '#(^|[\n ]|\()(' . preg_quote($server_url, '#') . ')/([^ \t\n\r<"\'\)&]+|&(?!lt;))*#i';
|
||||||
$replace[] = '$1<!-- l --><a href="$2/$3">$3</a><!-- l -->';
|
$replace[] = '$1<!-- l --><a href="$2/$3">$3</a><!-- l -->';
|
||||||
|
|
||||||
// matches a xxxx://aaaaa.bbb.cccc. ...
|
// matches a xxxx://aaaaa.bbb.cccc. ...
|
||||||
|
@ -1184,7 +1171,7 @@ class parse_message extends bbcode_firstpass
|
||||||
$this->message = $poll['poll_option_text'];
|
$this->message = $poll['poll_option_text'];
|
||||||
$bbcode_bitfield = $this->bbcode_bitfield;
|
$bbcode_bitfield = $this->bbcode_bitfield;
|
||||||
|
|
||||||
$poll['poll_option_text'] = $this->parse($poll['enable_html'], $poll['enable_bbcode'], $poll['enable_urls'], $poll['enable_smilies'], $poll['img_status'], false, false, false);
|
$poll['poll_option_text'] = $this->parse($poll['enable_bbcode'], $poll['enable_urls'], $poll['enable_smilies'], $poll['img_status'], false, false, false);
|
||||||
|
|
||||||
$this->bbcode_bitfield |= $bbcode_bitfield;
|
$this->bbcode_bitfield |= $bbcode_bitfield;
|
||||||
$this->message = $tmp_message;
|
$this->message = $tmp_message;
|
||||||
|
@ -1194,7 +1181,7 @@ class parse_message extends bbcode_firstpass
|
||||||
$this->message = $poll['poll_title'];
|
$this->message = $poll['poll_title'];
|
||||||
$bbcode_bitfield = $this->bbcode_bitfield;
|
$bbcode_bitfield = $this->bbcode_bitfield;
|
||||||
|
|
||||||
$poll['poll_title'] = $this->parse($poll['enable_html'], $poll['enable_bbcode'], $poll['enable_urls'], $poll['enable_smilies'], $poll['img_status'], false, false, false);
|
$poll['poll_title'] = $this->parse($poll['enable_bbcode'], $poll['enable_urls'], $poll['enable_smilies'], $poll['img_status'], false, false, false);
|
||||||
|
|
||||||
$this->bbcode_bitfield |= $bbcode_bitfield;
|
$this->bbcode_bitfield |= $bbcode_bitfield;
|
||||||
$this->message = $tmp_message;
|
$this->message = $tmp_message;
|
||||||
|
|
|
@ -772,7 +772,8 @@ class user extends session
|
||||||
var $lang_path;
|
var $lang_path;
|
||||||
var $img_lang;
|
var $img_lang;
|
||||||
|
|
||||||
var $keyoptions = array('viewimg' => 0, 'viewflash' => 1, 'viewsmilies' => 2, 'viewsigs' => 3, 'viewavatars' => 4, 'viewcensors' => 5, 'attachsig' => 6, 'html' => 7, 'bbcode' => 8, 'smilies' => 9, 'popuppm' => 10, 'report_pm_notify' => 11);
|
// Able to add new option (id 7)
|
||||||
|
var $keyoptions = array('viewimg' => 0, 'viewflash' => 1, 'viewsmilies' => 2, 'viewsigs' => 3, 'viewavatars' => 4, 'viewcensors' => 5, 'attachsig' => 6, 'bbcode' => 8, 'smilies' => 9, 'popuppm' => 10, 'report_pm_notify' => 11);
|
||||||
var $keyvalues = array();
|
var $keyvalues = array();
|
||||||
|
|
||||||
function setup($lang_set = false, $style = false)
|
function setup($lang_set = false, $style = false)
|
||||||
|
|
|
@ -97,7 +97,7 @@ function compose_pm($id, $mode, $action)
|
||||||
|
|
||||||
if ($action == 'quotepost')
|
if ($action == 'quotepost')
|
||||||
{
|
{
|
||||||
$sql = 'SELECT p.post_id as msg_id, p.post_text as message_text, p.poster_id as author_id, p.post_time as message_time, p.bbcode_bitfield, p.bbcode_uid, p.enable_sig, p.enable_html, p.enable_smilies, p.enable_magic_url, t.topic_title as message_subject, u.username as quote_username
|
$sql = 'SELECT p.post_id as msg_id, p.post_text as message_text, p.poster_id as author_id, p.post_time as message_time, p.bbcode_bitfield, p.bbcode_uid, p.enable_sig, p.enable_smilies, p.enable_magic_url, t.topic_title as message_subject, u.username as quote_username
|
||||||
FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . " u
|
FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . " u
|
||||||
WHERE p.post_id = $msg_id
|
WHERE p.post_id = $msg_id
|
||||||
AND t.topic_id = p.topic_id
|
AND t.topic_id = p.topic_id
|
||||||
|
@ -210,7 +210,7 @@ function compose_pm($id, $mode, $action)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$check_value = (($post['enable_html']+1) << 16) + (($post['enable_bbcode']+1) << 8) + (($post['enable_smilies']+1) << 4) + (($enable_urls+1) << 2) + (($post['enable_sig']+1) << 1);
|
$check_value = (($post['enable_bbcode']+1) << 8) + (($post['enable_smilies']+1) << 4) + (($enable_urls+1) << 2) + (($post['enable_sig']+1) << 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -347,7 +347,6 @@ function compose_pm($id, $mode, $action)
|
||||||
$message_parser->bbcode_uid = $bbcode_uid;
|
$message_parser->bbcode_uid = $bbcode_uid;
|
||||||
}
|
}
|
||||||
|
|
||||||
$html_status = ($config['allow_html'] && $config['auth_html_pm'] && $auth->acl_get('u_pm_html'));
|
|
||||||
$bbcode_status = ($config['allow_bbcode'] && $config['auth_bbcode_pm'] && $auth->acl_get('u_pm_bbcode'));
|
$bbcode_status = ($config['allow_bbcode'] && $config['auth_bbcode_pm'] && $auth->acl_get('u_pm_bbcode'));
|
||||||
$smilies_status = ($config['allow_smilies'] && $config['auth_smilies_pm'] && $auth->acl_get('u_pm_smilies'));
|
$smilies_status = ($config['allow_smilies'] && $config['auth_smilies_pm'] && $auth->acl_get('u_pm_smilies'));
|
||||||
$img_status = ($config['auth_img_pm'] && $auth->acl_get('u_pm_img'));
|
$img_status = ($config['auth_img_pm'] && $auth->acl_get('u_pm_img'));
|
||||||
|
@ -422,13 +421,11 @@ function compose_pm($id, $mode, $action)
|
||||||
}
|
}
|
||||||
$subject = preg_replace('#&(\#[0-9]+;)#', '&\1', $subject);
|
$subject = preg_replace('#&(\#[0-9]+;)#', '&\1', $subject);
|
||||||
|
|
||||||
|
|
||||||
$message_parser->message = (isset($_POST['message'])) ? htmlspecialchars(str_replace(array('\\\'', '\\"', '\\0', '\\\\'), array('\'', '"', '\0', '\\'), $_POST['message'])) : '';
|
$message_parser->message = (isset($_POST['message'])) ? htmlspecialchars(str_replace(array('\\\'', '\\"', '\\0', '\\\\'), array('\'', '"', '\0', '\\'), $_POST['message'])) : '';
|
||||||
$message_parser->message = preg_replace('#&(\#[0-9]+;)#', '&\1', $message_parser->message);
|
$message_parser->message = preg_replace('#&(\#[0-9]+;)#', '&\1', $message_parser->message);
|
||||||
|
|
||||||
$icon_id = request_var('icon', 0);
|
$icon_id = request_var('icon', 0);
|
||||||
|
|
||||||
$enable_html = (!$html_status || isset($_POST['disable_html'])) ? false : true;
|
|
||||||
$enable_bbcode = (!$bbcode_status || isset($_POST['disable_bbcode'])) ? false : true;
|
$enable_bbcode = (!$bbcode_status || isset($_POST['disable_bbcode'])) ? false : true;
|
||||||
$enable_smilies = (!$smilies_status || isset($_POST['disable_smilies'])) ? false : true;
|
$enable_smilies = (!$smilies_status || isset($_POST['disable_smilies'])) ? false : true;
|
||||||
$enable_urls = (isset($_POST['disable_magic_url'])) ? 0 : 1;
|
$enable_urls = (isset($_POST['disable_magic_url'])) ? 0 : 1;
|
||||||
|
@ -436,7 +433,7 @@ function compose_pm($id, $mode, $action)
|
||||||
|
|
||||||
if ($submit)
|
if ($submit)
|
||||||
{
|
{
|
||||||
$status_switch = (($enable_html+1) << 16) + (($enable_bbcode+1) << 8) + (($enable_smilies+1) << 4) + (($enable_urls+1) << 2) + (($enable_sig+1) << 1);
|
$status_switch = (($enable_bbcode+1) << 8) + (($enable_smilies+1) << 4) + (($enable_urls+1) << 2) + (($enable_sig+1) << 1);
|
||||||
$status_switch = ($status_switch != $check_value);
|
$status_switch = ($status_switch != $check_value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -455,7 +452,7 @@ function compose_pm($id, $mode, $action)
|
||||||
|
|
||||||
if ($update_message)
|
if ($update_message)
|
||||||
{
|
{
|
||||||
$message_parser->parse($enable_html, $enable_bbcode, $enable_urls, $enable_smilies, $img_status, $flash_status, true);
|
$message_parser->parse($enable_bbcode, $enable_urls, $enable_smilies, $img_status, $flash_status, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -505,7 +502,6 @@ function compose_pm($id, $mode, $action)
|
||||||
'icon_id' => (int) $icon_id,
|
'icon_id' => (int) $icon_id,
|
||||||
'enable_sig' => (bool) $enable_sig,
|
'enable_sig' => (bool) $enable_sig,
|
||||||
'enable_bbcode' => (bool) $enable_bbcode,
|
'enable_bbcode' => (bool) $enable_bbcode,
|
||||||
'enable_html' => (bool) $enable_html,
|
|
||||||
'enable_smilies' => (bool) $enable_smilies,
|
'enable_smilies' => (bool) $enable_smilies,
|
||||||
'enable_urls' => (bool) $enable_urls,
|
'enable_urls' => (bool) $enable_urls,
|
||||||
'message_md5' => (int) $message_md5,
|
'message_md5' => (int) $message_md5,
|
||||||
|
@ -537,7 +533,7 @@ function compose_pm($id, $mode, $action)
|
||||||
{
|
{
|
||||||
$post_time = ($action == 'edit') ? $post_time : $current_time;
|
$post_time = ($action == 'edit') ? $post_time : $current_time;
|
||||||
|
|
||||||
$preview_message = $message_parser->format_display($enable_html, $enable_bbcode, $enable_urls, $enable_smilies, false);
|
$preview_message = $message_parser->format_display($enable_bbcode, $enable_urls, $enable_smilies, false);
|
||||||
|
|
||||||
$preview_signature = $user->data['user_sig'];
|
$preview_signature = $user->data['user_sig'];
|
||||||
$preview_signature_uid = $user->data['user_sig_bbcode_uid'];
|
$preview_signature_uid = $user->data['user_sig_bbcode_uid'];
|
||||||
|
@ -550,7 +546,7 @@ function compose_pm($id, $mode, $action)
|
||||||
$parse_sig->bbcode_uid = $preview_signature_uid;
|
$parse_sig->bbcode_uid = $preview_signature_uid;
|
||||||
$parse_sig->bbcode_bitfield = $preview_signature_bitfield;
|
$parse_sig->bbcode_bitfield = $preview_signature_bitfield;
|
||||||
|
|
||||||
$parse_sig->format_display($enable_html, $enable_bbcode, $enable_urls, $enable_smilies);
|
$parse_sig->format_display($enable_bbcode, $enable_urls, $enable_smilies);
|
||||||
$preview_signature = $parse_sig->message;
|
$preview_signature = $parse_sig->message;
|
||||||
unset($parse_sig);
|
unset($parse_sig);
|
||||||
}
|
}
|
||||||
|
@ -716,7 +712,6 @@ function compose_pm($id, $mode, $action)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$html_checked = (isset($enable_html)) ? !$enable_html : (($config['allow_html'] && $auth->acl_get('u_pm_html')) ? !$user->optionget('html') : 1);
|
|
||||||
$bbcode_checked = (isset($enable_bbcode)) ? !$enable_bbcode : (($config['allow_bbcode'] && $auth->acl_get('u_pm_bbcode')) ? !$user->optionget('bbcode') : 1);
|
$bbcode_checked = (isset($enable_bbcode)) ? !$enable_bbcode : (($config['allow_bbcode'] && $auth->acl_get('u_pm_bbcode')) ? !$user->optionget('bbcode') : 1);
|
||||||
$smilies_checked = (isset($enable_smilies)) ? !$enable_smilies : (($config['allow_smilies'] && $auth->acl_get('u_pm_smilies')) ? !$user->optionget('smilies') : 1);
|
$smilies_checked = (isset($enable_smilies)) ? !$enable_smilies : (($config['allow_smilies'] && $auth->acl_get('u_pm_smilies')) ? !$user->optionget('smilies') : 1);
|
||||||
$urls_checked = (isset($enable_urls)) ? !$enable_urls : 0;
|
$urls_checked = (isset($enable_urls)) ? !$enable_urls : 0;
|
||||||
|
@ -766,7 +761,6 @@ function compose_pm($id, $mode, $action)
|
||||||
|
|
||||||
'SUBJECT' => (isset($message_subject)) ? $message_subject : '',
|
'SUBJECT' => (isset($message_subject)) ? $message_subject : '',
|
||||||
'MESSAGE' => $message_text,
|
'MESSAGE' => $message_text,
|
||||||
'HTML_STATUS' => ($html_status) ? $user->lang['HTML_IS_ON'] : $user->lang['HTML_IS_OFF'],
|
|
||||||
'BBCODE_STATUS' => ($bbcode_status) ? sprintf($user->lang['BBCODE_IS_ON'], '<a href="' . "faq.$phpEx$SID&mode=bbcode" . '" onclick="target=\'_phpbbcode\';">', '</a>') : sprintf($user->lang['BBCODE_IS_OFF'], '<a href="' . "faq.$phpEx$SID&mode=bbcode" . '" onclick="target=\'_phpbbcode\';">', '</a>'),
|
'BBCODE_STATUS' => ($bbcode_status) ? sprintf($user->lang['BBCODE_IS_ON'], '<a href="' . "faq.$phpEx$SID&mode=bbcode" . '" onclick="target=\'_phpbbcode\';">', '</a>') : sprintf($user->lang['BBCODE_IS_OFF'], '<a href="' . "faq.$phpEx$SID&mode=bbcode" . '" onclick="target=\'_phpbbcode\';">', '</a>'),
|
||||||
'IMG_STATUS' => ($img_status) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'],
|
'IMG_STATUS' => ($img_status) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'],
|
||||||
'FLASH_STATUS' => ($flash_status) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'],
|
'FLASH_STATUS' => ($flash_status) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'],
|
||||||
|
@ -776,8 +770,6 @@ function compose_pm($id, $mode, $action)
|
||||||
|
|
||||||
'S_EDIT_POST' => ($action == 'edit'),
|
'S_EDIT_POST' => ($action == 'edit'),
|
||||||
'S_SHOW_PM_ICONS' => $s_pm_icons,
|
'S_SHOW_PM_ICONS' => $s_pm_icons,
|
||||||
'S_HTML_ALLOWED' => $html_status,
|
|
||||||
'S_HTML_CHECKED' => ($html_checked) ? ' checked="checked"' : '',
|
|
||||||
'S_BBCODE_ALLOWED' => $bbcode_status,
|
'S_BBCODE_ALLOWED' => $bbcode_status,
|
||||||
'S_BBCODE_CHECKED' => ($bbcode_checked) ? ' checked="checked"' : '',
|
'S_BBCODE_CHECKED' => ($bbcode_checked) ? ' checked="checked"' : '',
|
||||||
'S_SMILIES_ALLOWED' => $smilies_status,
|
'S_SMILIES_ALLOWED' => $smilies_status,
|
||||||
|
@ -789,11 +781,34 @@ function compose_pm($id, $mode, $action)
|
||||||
'S_HAS_DRAFTS' => ($auth->acl_get('u_savedrafts') && $drafts),
|
'S_HAS_DRAFTS' => ($auth->acl_get('u_savedrafts') && $drafts),
|
||||||
'S_FORM_ENCTYPE' => $form_enctype,
|
'S_FORM_ENCTYPE' => $form_enctype,
|
||||||
|
|
||||||
|
'S_BBCODE_IMG' => $img_status,
|
||||||
|
'S_BBCODE_FLASH' => $flash_status,
|
||||||
|
'S_BBCODE_QUOTE' => true,
|
||||||
|
|
||||||
'S_POST_ACTION' => $s_action,
|
'S_POST_ACTION' => $s_action,
|
||||||
'S_HIDDEN_ADDRESS_FIELD'=> $s_hidden_address_field,
|
'S_HIDDEN_ADDRESS_FIELD'=> $s_hidden_address_field,
|
||||||
'S_HIDDEN_FIELDS' => $s_hidden_fields)
|
'S_HIDDEN_FIELDS' => $s_hidden_fields)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Build custom bbcodes array
|
||||||
|
$sql = 'SELECT bbcode_id, bbcode_tag
|
||||||
|
FROM ' . BBCODES_TABLE . '
|
||||||
|
WHERE display_on_posting = 1';
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
$i = 0;
|
||||||
|
while ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
$template->assign_block_vars('custom_tags', array(
|
||||||
|
'BBCODE_NAME' => "'[{$row['bbcode_tag']}]', '[/" . str_replace('=', '', $row['bbcode_tag']) . "]'",
|
||||||
|
'BBCODE_ID' => 22 + ($i * 2),
|
||||||
|
'BBCODE_TAG' => $row['bbcode_tag'])
|
||||||
|
);
|
||||||
|
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
// Attachment entry
|
// Attachment entry
|
||||||
if ($auth->acl_get('u_pm_attach') && $config['allow_pm_attach'] && $form_enctype)
|
if ($auth->acl_get('u_pm_attach') && $config['allow_pm_attach'] && $form_enctype)
|
||||||
{
|
{
|
||||||
|
|
|
@ -53,15 +53,6 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
||||||
// Parse the message and subject
|
// Parse the message and subject
|
||||||
$message = $message_row['message_text'];
|
$message = $message_row['message_text'];
|
||||||
|
|
||||||
// If the board has HTML off but the message has HTML on then we process it, else leave it alone
|
|
||||||
if (!$config['auth_html_pm'] || !$auth->acl_get('u_pm_html'))
|
|
||||||
{
|
|
||||||
if ($message_row['enable_html'] && $config['auth_bbcode_pm'] && $auth->acl_get('u_pm_bbcode'))
|
|
||||||
{
|
|
||||||
$message = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Second parse bbcode here
|
// Second parse bbcode here
|
||||||
if ($message_row['bbcode_bitfield'])
|
if ($message_row['bbcode_bitfield'])
|
||||||
{
|
{
|
||||||
|
|
|
@ -359,7 +359,6 @@ class ucp_prefs
|
||||||
{
|
{
|
||||||
$var_ary = array(
|
$var_ary = array(
|
||||||
'bbcode' => true,
|
'bbcode' => true,
|
||||||
'html' => false,
|
|
||||||
'smilies' => true,
|
'smilies' => true,
|
||||||
'sig' => true,
|
'sig' => true,
|
||||||
'notify' => false,
|
'notify' => false,
|
||||||
|
@ -371,7 +370,6 @@ class ucp_prefs
|
||||||
}
|
}
|
||||||
|
|
||||||
$user->optionset('bbcode', $bbcode);
|
$user->optionset('bbcode', $bbcode);
|
||||||
$user->optionset('html', $html);
|
|
||||||
$user->optionset('smilies', $smilies);
|
$user->optionset('smilies', $smilies);
|
||||||
$user->optionset('attachsig', $sig);
|
$user->optionset('attachsig', $sig);
|
||||||
|
|
||||||
|
@ -399,9 +397,6 @@ class ucp_prefs
|
||||||
$bbcode = (isset($bbcode)) ? $bbcode : $user->optionget('bbcode');
|
$bbcode = (isset($bbcode)) ? $bbcode : $user->optionget('bbcode');
|
||||||
$bbcode_yes = ($bbcode) ? ' checked="checked"' : '';
|
$bbcode_yes = ($bbcode) ? ' checked="checked"' : '';
|
||||||
$bbcode_no = (!$bbcode) ? ' checked="checked"' : '';
|
$bbcode_no = (!$bbcode) ? ' checked="checked"' : '';
|
||||||
$html = (isset($html)) ? $html : $user->optionget('html');
|
|
||||||
$html_yes = ($html) ? ' checked="checked"' : '';
|
|
||||||
$html_no = (!$html) ? ' checked="checked"' : '';
|
|
||||||
$smilies = (isset($smilies)) ? $smilies : $user->optionget('smilies');
|
$smilies = (isset($smilies)) ? $smilies : $user->optionget('smilies');
|
||||||
$smilies_yes = ($smilies) ? ' checked="checked"' : '';
|
$smilies_yes = ($smilies) ? ' checked="checked"' : '';
|
||||||
$smilies_no = (!$smilies) ? ' checked="checked"' : '';
|
$smilies_no = (!$smilies) ? ' checked="checked"' : '';
|
||||||
|
@ -417,8 +412,6 @@ class ucp_prefs
|
||||||
|
|
||||||
'DEFAULT_BBCODE_YES' => $bbcode_yes,
|
'DEFAULT_BBCODE_YES' => $bbcode_yes,
|
||||||
'DEFAULT_BBCODE_NO' => $bbcode_no,
|
'DEFAULT_BBCODE_NO' => $bbcode_no,
|
||||||
'DEFAULT_HTML_YES' => $html_yes,
|
|
||||||
'DEFAULT_HTML_NO' => $html_no,
|
|
||||||
'DEFAULT_SMILIES_YES' => $smilies_yes,
|
'DEFAULT_SMILIES_YES' => $smilies_yes,
|
||||||
'DEFAULT_SMILIES_NO' => $smilies_no,
|
'DEFAULT_SMILIES_NO' => $smilies_no,
|
||||||
'DEFAULT_SIG_YES' => $sig_yes,
|
'DEFAULT_SIG_YES' => $sig_yes,
|
||||||
|
|
|
@ -380,7 +380,6 @@ class ucp_profile
|
||||||
|
|
||||||
include($phpbb_root_path . 'includes/functions_posting.'.$phpEx);
|
include($phpbb_root_path . 'includes/functions_posting.'.$phpEx);
|
||||||
|
|
||||||
$enable_html = ($config['allow_sig_html']) ? request_var('enable_html', false) : false;
|
|
||||||
$enable_bbcode = ($config['allow_sig_bbcode']) ? request_var('enable_bbcode', $user->optionget('bbcode')) : false;
|
$enable_bbcode = ($config['allow_sig_bbcode']) ? request_var('enable_bbcode', $user->optionget('bbcode')) : false;
|
||||||
$enable_smilies = ($config['allow_sig_smilies']) ? request_var('enable_smilies', $user->optionget('smilies')) : false;
|
$enable_smilies = ($config['allow_sig_smilies']) ? request_var('enable_smilies', $user->optionget('smilies')) : false;
|
||||||
$enable_urls = request_var('enable_urls', true);
|
$enable_urls = request_var('enable_urls', true);
|
||||||
|
@ -395,7 +394,7 @@ class ucp_profile
|
||||||
$message_parser = new parse_message($signature);
|
$message_parser = new parse_message($signature);
|
||||||
|
|
||||||
// Allowing Quote BBCode
|
// Allowing Quote BBCode
|
||||||
$message_parser->parse($enable_html, $enable_bbcode, $enable_urls, $enable_smilies, $config['allow_sig_img'], $config['allow_sig_flash'], true, true, 'sig');
|
$message_parser->parse($enable_bbcode, $enable_urls, $enable_smilies, $config['allow_sig_img'], $config['allow_sig_flash'], true, true, 'sig');
|
||||||
|
|
||||||
if (sizeof($message_parser->warn_msg))
|
if (sizeof($message_parser->warn_msg))
|
||||||
{
|
{
|
||||||
|
@ -428,7 +427,7 @@ class ucp_profile
|
||||||
if ($preview)
|
if ($preview)
|
||||||
{
|
{
|
||||||
// Now parse it for displaying
|
// Now parse it for displaying
|
||||||
$signature_preview = $message_parser->format_display($enable_html, $enable_bbcode, $enable_urls, $enable_smilies, false);
|
$signature_preview = $message_parser->format_display($enable_bbcode, $enable_urls, $enable_smilies, false);
|
||||||
unset($message_parser);
|
unset($message_parser);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -439,12 +438,10 @@ class ucp_profile
|
||||||
'SIGNATURE' => $signature,
|
'SIGNATURE' => $signature,
|
||||||
'SIGNATURE_PREVIEW' => $signature_preview,
|
'SIGNATURE_PREVIEW' => $signature_preview,
|
||||||
|
|
||||||
'S_HTML_CHECKED' => (!$enable_html) ? 'checked="checked"' : '',
|
|
||||||
'S_BBCODE_CHECKED' => (!$enable_bbcode) ? 'checked="checked"' : '',
|
'S_BBCODE_CHECKED' => (!$enable_bbcode) ? 'checked="checked"' : '',
|
||||||
'S_SMILIES_CHECKED' => (!$enable_smilies) ? 'checked="checked"' : '',
|
'S_SMILIES_CHECKED' => (!$enable_smilies) ? 'checked="checked"' : '',
|
||||||
'S_MAGIC_URL_CHECKED' => (!$enable_urls) ? 'checked="checked"' : '',
|
'S_MAGIC_URL_CHECKED' => (!$enable_urls) ? 'checked="checked"' : '',
|
||||||
|
|
||||||
'HTML_STATUS' => ($config['allow_sig_html']) ? $user->lang['HTML_IS_ON'] : $user->lang['HTML_IS_OFF'],
|
|
||||||
'BBCODE_STATUS' => ($config['allow_sig_bbcode']) ? sprintf($user->lang['BBCODE_IS_ON'], '<a href="' . "faq.$phpEx$SID&mode=bbcode" . '" onclick="target=\'_phpbbcode\';">', '</a>') : sprintf($user->lang['BBCODE_IS_OFF'], '<a href="' . "faq.$phpEx$SID&mode=bbcode" . '" onclick="target=\'_phpbbcode\';">', '</a>'),
|
'BBCODE_STATUS' => ($config['allow_sig_bbcode']) ? sprintf($user->lang['BBCODE_IS_ON'], '<a href="' . "faq.$phpEx$SID&mode=bbcode" . '" onclick="target=\'_phpbbcode\';">', '</a>') : sprintf($user->lang['BBCODE_IS_OFF'], '<a href="' . "faq.$phpEx$SID&mode=bbcode" . '" onclick="target=\'_phpbbcode\';">', '</a>'),
|
||||||
'SMILIES_STATUS' => ($config['allow_sig_smilies']) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'],
|
'SMILIES_STATUS' => ($config['allow_sig_smilies']) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'],
|
||||||
'IMG_STATUS' => ($config['allow_sig_img']) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'],
|
'IMG_STATUS' => ($config['allow_sig_img']) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'],
|
||||||
|
@ -452,7 +449,6 @@ class ucp_profile
|
||||||
|
|
||||||
'L_SIGNATURE_EXPLAIN' => sprintf($user->lang['SIGNATURE_EXPLAIN'], $config['max_sig_chars']),
|
'L_SIGNATURE_EXPLAIN' => sprintf($user->lang['SIGNATURE_EXPLAIN'], $config['max_sig_chars']),
|
||||||
|
|
||||||
'S_HTML_ALLOWED' => $config['allow_sig_html'],
|
|
||||||
'S_BBCODE_ALLOWED' => $config['allow_sig_bbcode'],
|
'S_BBCODE_ALLOWED' => $config['allow_sig_bbcode'],
|
||||||
'S_SMILIES_ALLOWED' => $config['allow_sig_smilies'],)
|
'S_SMILIES_ALLOWED' => $config['allow_sig_smilies'],)
|
||||||
);
|
);
|
||||||
|
|
|
@ -81,6 +81,7 @@ CREATE TABLE phpbb_banlist (
|
||||||
CREATE TABLE phpbb_bbcodes (
|
CREATE TABLE phpbb_bbcodes (
|
||||||
bbcode_id INTEGER DEFAULT 0 NOT NULL,
|
bbcode_id INTEGER DEFAULT 0 NOT NULL,
|
||||||
bbcode_tag VARCHAR(16) NOT NULL,
|
bbcode_tag VARCHAR(16) NOT NULL,
|
||||||
|
display_on_posting INTEGER DEFAULT 0 NOT NULL,
|
||||||
bbcode_match VARCHAR(255) NOT NULL,
|
bbcode_match VARCHAR(255) NOT NULL,
|
||||||
bbcode_tpl BLOB SUB_TYPE TEXT NOT NULL,
|
bbcode_tpl BLOB SUB_TYPE TEXT NOT NULL,
|
||||||
first_pass_match VARCHAR(255) NOT NULL,
|
first_pass_match VARCHAR(255) NOT NULL,
|
||||||
|
@ -331,7 +332,6 @@ CREATE TABLE phpbb_posts (
|
||||||
post_approved INTEGER DEFAULT 1 NOT NULL,
|
post_approved INTEGER DEFAULT 1 NOT NULL,
|
||||||
post_reported INTEGER DEFAULT 0 NOT NULL,
|
post_reported INTEGER DEFAULT 0 NOT NULL,
|
||||||
enable_bbcode INTEGER DEFAULT 1 NOT NULL,
|
enable_bbcode INTEGER DEFAULT 1 NOT NULL,
|
||||||
enable_html INTEGER DEFAULT 0 NOT NULL,
|
|
||||||
enable_smilies INTEGER DEFAULT 1 NOT NULL,
|
enable_smilies INTEGER DEFAULT 1 NOT NULL,
|
||||||
enable_magic_url INTEGER DEFAULT 1 NOT NULL,
|
enable_magic_url INTEGER DEFAULT 1 NOT NULL,
|
||||||
enable_sig INTEGER DEFAULT 1 NOT NULL,
|
enable_sig INTEGER DEFAULT 1 NOT NULL,
|
||||||
|
@ -360,7 +360,6 @@ CREATE TABLE phpbb_privmsgs (
|
||||||
message_time INTEGER DEFAULT 0 NOT NULL,
|
message_time INTEGER DEFAULT 0 NOT NULL,
|
||||||
message_reported INTEGER DEFAULT 0 NOT NULL,
|
message_reported INTEGER DEFAULT 0 NOT NULL,
|
||||||
enable_bbcode INTEGER DEFAULT 1 NOT NULL,
|
enable_bbcode INTEGER DEFAULT 1 NOT NULL,
|
||||||
enable_html INTEGER DEFAULT 0 NOT NULL,
|
|
||||||
enable_smilies INTEGER DEFAULT 1 NOT NULL,
|
enable_smilies INTEGER DEFAULT 1 NOT NULL,
|
||||||
enable_magic_url INTEGER DEFAULT 1 NOT NULL,
|
enable_magic_url INTEGER DEFAULT 1 NOT NULL,
|
||||||
enable_sig INTEGER DEFAULT 1 NOT NULL,
|
enable_sig INTEGER DEFAULT 1 NOT NULL,
|
||||||
|
@ -956,6 +955,11 @@ ADD PRIMARY KEY (
|
||||||
confirm_id
|
confirm_id
|
||||||
);;
|
);;
|
||||||
|
|
||||||
|
CREATE INDEX display_on_posting
|
||||||
|
ON phpbb_bbcodes(
|
||||||
|
display_on_posting
|
||||||
|
);;
|
||||||
|
|
||||||
ALTER TABLE phpbb_disallow
|
ALTER TABLE phpbb_disallow
|
||||||
ADD PRIMARY KEY (
|
ADD PRIMARY KEY (
|
||||||
disallow_id
|
disallow_id
|
||||||
|
|
|
@ -86,6 +86,7 @@ GO
|
||||||
CREATE TABLE [phpbb_bbcodes] (
|
CREATE TABLE [phpbb_bbcodes] (
|
||||||
[bbcode_id] [int] NOT NULL ,
|
[bbcode_id] [int] NOT NULL ,
|
||||||
[bbcode_tag] [varchar] (16) NOT NULL ,
|
[bbcode_tag] [varchar] (16) NOT NULL ,
|
||||||
|
[display_on_posting] [int] NOT NULL ,
|
||||||
[bbcode_match] [varchar] (255) NOT NULL ,
|
[bbcode_match] [varchar] (255) NOT NULL ,
|
||||||
[bbcode_tpl] [text] NOT NULL ,
|
[bbcode_tpl] [text] NOT NULL ,
|
||||||
[first_pass_match] [varchar] (255) NOT NULL ,
|
[first_pass_match] [varchar] (255) NOT NULL ,
|
||||||
|
@ -336,7 +337,6 @@ CREATE TABLE [phpbb_posts] (
|
||||||
[post_approved] [int] NOT NULL ,
|
[post_approved] [int] NOT NULL ,
|
||||||
[post_reported] [int] NOT NULL ,
|
[post_reported] [int] NOT NULL ,
|
||||||
[enable_bbcode] [int] NOT NULL ,
|
[enable_bbcode] [int] NOT NULL ,
|
||||||
[enable_html] [int] NOT NULL ,
|
|
||||||
[enable_smilies] [int] NOT NULL ,
|
[enable_smilies] [int] NOT NULL ,
|
||||||
[enable_magic_url] [int] NOT NULL ,
|
[enable_magic_url] [int] NOT NULL ,
|
||||||
[enable_sig] [int] NOT NULL ,
|
[enable_sig] [int] NOT NULL ,
|
||||||
|
@ -365,7 +365,6 @@ CREATE TABLE [phpbb_privmsgs] (
|
||||||
[message_time] [int] NOT NULL ,
|
[message_time] [int] NOT NULL ,
|
||||||
[message_reported] [int] NOT NULL ,
|
[message_reported] [int] NOT NULL ,
|
||||||
[enable_bbcode] [int] NOT NULL ,
|
[enable_bbcode] [int] NOT NULL ,
|
||||||
[enable_html] [int] NOT NULL ,
|
|
||||||
[enable_smilies] [int] NOT NULL ,
|
[enable_smilies] [int] NOT NULL ,
|
||||||
[enable_magic_url] [int] NOT NULL ,
|
[enable_magic_url] [int] NOT NULL ,
|
||||||
[enable_sig] [int] NOT NULL ,
|
[enable_sig] [int] NOT NULL ,
|
||||||
|
@ -1228,7 +1227,8 @@ ALTER TABLE [phpbb_banlist] WITH NOCHECK ADD
|
||||||
GO
|
GO
|
||||||
|
|
||||||
ALTER TABLE [phpbb_bbcodes] WITH NOCHECK ADD
|
ALTER TABLE [phpbb_bbcodes] WITH NOCHECK ADD
|
||||||
CONSTRAINT [DF_bbcode_bbcode_id] DEFAULT (0) FOR [bbcode_id]
|
CONSTRAINT [DF_bbcode_bbcode_id] DEFAULT (0) FOR [bbcode_id],
|
||||||
|
CONSTRAINT [DF_bbcode_display_on_posting] DEFAULT (0) FOR [display_on_posting]
|
||||||
GO
|
GO
|
||||||
|
|
||||||
ALTER TABLE [phpbb_bookmarks] WITH NOCHECK ADD
|
ALTER TABLE [phpbb_bookmarks] WITH NOCHECK ADD
|
||||||
|
@ -1377,7 +1377,6 @@ ALTER TABLE [phpbb_posts] WITH NOCHECK ADD
|
||||||
CONSTRAINT [DF_posts__post_approved] DEFAULT (1) FOR [post_approved],
|
CONSTRAINT [DF_posts__post_approved] DEFAULT (1) FOR [post_approved],
|
||||||
CONSTRAINT [DF_posts__post_reported] DEFAULT (0) FOR [post_reported],
|
CONSTRAINT [DF_posts__post_reported] DEFAULT (0) FOR [post_reported],
|
||||||
CONSTRAINT [DF_posts__enable_bbcode] DEFAULT (1) FOR [enable_bbcode],
|
CONSTRAINT [DF_posts__enable_bbcode] DEFAULT (1) FOR [enable_bbcode],
|
||||||
CONSTRAINT [DF_posts__enable_html] DEFAULT (0) FOR [enable_html],
|
|
||||||
CONSTRAINT [DF_posts__enable_smilies] DEFAULT (1) FOR [enable_smilies],
|
CONSTRAINT [DF_posts__enable_smilies] DEFAULT (1) FOR [enable_smilies],
|
||||||
CONSTRAINT [DF_posts__enable_magic_url] DEFAULT (1) FOR [enable_magic_url],
|
CONSTRAINT [DF_posts__enable_magic_url] DEFAULT (1) FOR [enable_magic_url],
|
||||||
CONSTRAINT [DF_posts__enable_sig] DEFAULT (1) FOR [enable_sig],
|
CONSTRAINT [DF_posts__enable_sig] DEFAULT (1) FOR [enable_sig],
|
||||||
|
@ -1397,7 +1396,6 @@ ALTER TABLE [phpbb_privmsgs] WITH NOCHECK ADD
|
||||||
CONSTRAINT [DF_privms_message_time] DEFAULT (0) FOR [message_time],
|
CONSTRAINT [DF_privms_message_time] DEFAULT (0) FOR [message_time],
|
||||||
CONSTRAINT [DF_privms_message_reported] DEFAULT (0) FOR [message_reported],
|
CONSTRAINT [DF_privms_message_reported] DEFAULT (0) FOR [message_reported],
|
||||||
CONSTRAINT [DF_privms_enable_bbcode] DEFAULT (1) FOR [enable_bbcode],
|
CONSTRAINT [DF_privms_enable_bbcode] DEFAULT (1) FOR [enable_bbcode],
|
||||||
CONSTRAINT [DF_privms_enable_html] DEFAULT (0) FOR [enable_html],
|
|
||||||
CONSTRAINT [DF_privms_enable_smilies] DEFAULT (1) FOR [enable_smilies],
|
CONSTRAINT [DF_privms_enable_smilies] DEFAULT (1) FOR [enable_smilies],
|
||||||
CONSTRAINT [DF_privms_enable_magic_url] DEFAULT (1) FOR [enable_magic_url],
|
CONSTRAINT [DF_privms_enable_magic_url] DEFAULT (1) FOR [enable_magic_url],
|
||||||
CONSTRAINT [DF_privms_enable_sig] DEFAULT (1) FOR [enable_sig],
|
CONSTRAINT [DF_privms_enable_sig] DEFAULT (1) FOR [enable_sig],
|
||||||
|
@ -1698,6 +1696,9 @@ GO
|
||||||
CREATE INDEX [is_dynamic] ON [phpbb_config]([is_dynamic]) ON [PRIMARY]
|
CREATE INDEX [is_dynamic] ON [phpbb_config]([is_dynamic]) ON [PRIMARY]
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
CREATE INDEX [display_on_posting] ON [phpbb_bbcodes]([display_on_posting]) ON [PRIMARY]
|
||||||
|
GO
|
||||||
|
|
||||||
CREATE INDEX [save_time] ON [phpbb_drafts]([save_time]) ON [PRIMARY]
|
CREATE INDEX [save_time] ON [phpbb_drafts]([save_time]) ON [PRIMARY]
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
|
|
@ -98,13 +98,15 @@ CREATE TABLE phpbb_banlist (
|
||||||
CREATE TABLE phpbb_bbcodes (
|
CREATE TABLE phpbb_bbcodes (
|
||||||
bbcode_id tinyint(3) UNSIGNED DEFAULT '0' NOT NULL,
|
bbcode_id tinyint(3) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
bbcode_tag varchar(16) DEFAULT '' NOT NULL,
|
bbcode_tag varchar(16) DEFAULT '' NOT NULL,
|
||||||
|
display_on_posting tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
bbcode_match varchar(255) DEFAULT '' NOT NULL,
|
bbcode_match varchar(255) DEFAULT '' NOT NULL,
|
||||||
bbcode_tpl text DEFAULT '' NOT NULL,
|
bbcode_tpl text DEFAULT '' NOT NULL,
|
||||||
first_pass_match varchar(255) DEFAULT '' NOT NULL,
|
first_pass_match varchar(255) DEFAULT '' NOT NULL,
|
||||||
first_pass_replace varchar(255) DEFAULT '' NOT NULL,
|
first_pass_replace varchar(255) DEFAULT '' NOT NULL,
|
||||||
second_pass_match varchar(255) DEFAULT '' NOT NULL,
|
second_pass_match varchar(255) DEFAULT '' NOT NULL,
|
||||||
second_pass_replace text DEFAULT '' NOT NULL,
|
second_pass_replace text DEFAULT '' NOT NULL,
|
||||||
PRIMARY KEY (bbcode_id)
|
PRIMARY KEY (bbcode_id),
|
||||||
|
KEY display_in_posting (display_on_posting)
|
||||||
);
|
);
|
||||||
|
|
||||||
# Table: 'phpbb_bookmarks'
|
# Table: 'phpbb_bookmarks'
|
||||||
|
@ -390,7 +392,6 @@ CREATE TABLE phpbb_posts (
|
||||||
post_approved tinyint(1) DEFAULT '1' NOT NULL,
|
post_approved tinyint(1) DEFAULT '1' NOT NULL,
|
||||||
post_reported tinyint(1) DEFAULT '0' NOT NULL,
|
post_reported tinyint(1) DEFAULT '0' NOT NULL,
|
||||||
enable_bbcode tinyint(1) DEFAULT '1' NOT NULL,
|
enable_bbcode tinyint(1) DEFAULT '1' NOT NULL,
|
||||||
enable_html tinyint(1) DEFAULT '0' NOT NULL,
|
|
||||||
enable_smilies tinyint(1) DEFAULT '1' NOT NULL,
|
enable_smilies tinyint(1) DEFAULT '1' NOT NULL,
|
||||||
enable_magic_url tinyint(1) DEFAULT '1' NOT NULL,
|
enable_magic_url tinyint(1) DEFAULT '1' NOT NULL,
|
||||||
enable_sig tinyint(1) DEFAULT '1' NOT NULL,
|
enable_sig tinyint(1) DEFAULT '1' NOT NULL,
|
||||||
|
@ -426,7 +427,6 @@ CREATE TABLE phpbb_privmsgs (
|
||||||
message_time int(11) DEFAULT '0' NOT NULL,
|
message_time int(11) DEFAULT '0' NOT NULL,
|
||||||
message_reported tinyint(1) DEFAULT '0' NOT NULL,
|
message_reported tinyint(1) DEFAULT '0' NOT NULL,
|
||||||
enable_bbcode tinyint(1) DEFAULT '1' NOT NULL,
|
enable_bbcode tinyint(1) DEFAULT '1' NOT NULL,
|
||||||
enable_html tinyint(1) DEFAULT '0' NOT NULL,
|
|
||||||
enable_smilies tinyint(1) DEFAULT '1' NOT NULL,
|
enable_smilies tinyint(1) DEFAULT '1' NOT NULL,
|
||||||
enable_magic_url tinyint(1) DEFAULT '1' NOT NULL,
|
enable_magic_url tinyint(1) DEFAULT '1' NOT NULL,
|
||||||
enable_sig tinyint(1) DEFAULT '1' NOT NULL,
|
enable_sig tinyint(1) DEFAULT '1' NOT NULL,
|
||||||
|
|
|
@ -233,6 +233,7 @@ END;
|
||||||
CREATE TABLE phpbb_bbcodes (
|
CREATE TABLE phpbb_bbcodes (
|
||||||
bbcode_id number(3) DEFAULT '0' NOT NULL,
|
bbcode_id number(3) DEFAULT '0' NOT NULL,
|
||||||
bbcode_tag varchar2(16) DEFAULT '',
|
bbcode_tag varchar2(16) DEFAULT '',
|
||||||
|
display_on_posting number(1) DEFAULT '0' NOT NULL,
|
||||||
bbcode_match varchar2(255) DEFAULT '',
|
bbcode_match varchar2(255) DEFAULT '',
|
||||||
bbcode_tpl clob DEFAULT '',
|
bbcode_tpl clob DEFAULT '',
|
||||||
first_pass_match varchar2(255) DEFAULT '',
|
first_pass_match varchar2(255) DEFAULT '',
|
||||||
|
@ -243,6 +244,9 @@ CREATE TABLE phpbb_bbcodes (
|
||||||
)
|
)
|
||||||
/
|
/
|
||||||
|
|
||||||
|
CREATE INDEX display_on_posting on phpbb_bbcodes (display_on_posting)
|
||||||
|
/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Table: phpbb_bookmarks
|
Table: phpbb_bookmarks
|
||||||
*/
|
*/
|
||||||
|
@ -793,7 +797,6 @@ CREATE TABLE phpbb_posts (
|
||||||
post_approved number(1) DEFAULT '1' NOT NULL,
|
post_approved number(1) DEFAULT '1' NOT NULL,
|
||||||
post_reported number(1) DEFAULT '0' NOT NULL,
|
post_reported number(1) DEFAULT '0' NOT NULL,
|
||||||
enable_bbcode number(1) DEFAULT '1' NOT NULL,
|
enable_bbcode number(1) DEFAULT '1' NOT NULL,
|
||||||
enable_html number(1) DEFAULT '0' NOT NULL,
|
|
||||||
enable_smilies number(1) DEFAULT '1' NOT NULL,
|
enable_smilies number(1) DEFAULT '1' NOT NULL,
|
||||||
enable_magic_url number(1) DEFAULT '1' NOT NULL,
|
enable_magic_url number(1) DEFAULT '1' NOT NULL,
|
||||||
enable_sig number(1) DEFAULT '1' NOT NULL,
|
enable_sig number(1) DEFAULT '1' NOT NULL,
|
||||||
|
@ -854,7 +857,6 @@ CREATE TABLE phpbb_privmsgs (
|
||||||
message_time number(11) DEFAULT '0' NOT NULL,
|
message_time number(11) DEFAULT '0' NOT NULL,
|
||||||
message_reported number(1) DEFAULT '0' NOT NULL,
|
message_reported number(1) DEFAULT '0' NOT NULL,
|
||||||
enable_bbcode number(1) DEFAULT '1' NOT NULL,
|
enable_bbcode number(1) DEFAULT '1' NOT NULL,
|
||||||
enable_html number(1) DEFAULT '0' NOT NULL,
|
|
||||||
enable_smilies number(1) DEFAULT '1' NOT NULL,
|
enable_smilies number(1) DEFAULT '1' NOT NULL,
|
||||||
enable_magic_url number(1) DEFAULT '1' NOT NULL,
|
enable_magic_url number(1) DEFAULT '1' NOT NULL,
|
||||||
enable_sig number(1) DEFAULT '1' NOT NULL,
|
enable_sig number(1) DEFAULT '1' NOT NULL,
|
||||||
|
|
|
@ -130,6 +130,7 @@ SELECT SETVAL('phpbb_banlist_ban_id_seq',(select case when max(ban_id)>0 then ma
|
||||||
CREATE TABLE phpbb_bbcodes (
|
CREATE TABLE phpbb_bbcodes (
|
||||||
bbcode_id INT2 DEFAULT '0' NOT NULL,
|
bbcode_id INT2 DEFAULT '0' NOT NULL,
|
||||||
bbcode_tag varchar(16) DEFAULT '' NOT NULL,
|
bbcode_tag varchar(16) DEFAULT '' NOT NULL,
|
||||||
|
display_on_posting INT2 DEFAULT '0' NOT NULL,
|
||||||
bbcode_match varchar(255) DEFAULT '' NOT NULL,
|
bbcode_match varchar(255) DEFAULT '' NOT NULL,
|
||||||
bbcode_tpl text DEFAULT '' NOT NULL,
|
bbcode_tpl text DEFAULT '' NOT NULL,
|
||||||
first_pass_match varchar(255) DEFAULT '' NOT NULL,
|
first_pass_match varchar(255) DEFAULT '' NOT NULL,
|
||||||
|
@ -140,6 +141,8 @@ CREATE TABLE phpbb_bbcodes (
|
||||||
CHECK (bbcode_id>=0)
|
CHECK (bbcode_id>=0)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX display_on_posting_phpbb_bbcodes_index ON phpbb_bbcodes (display_on_posting);
|
||||||
|
|
||||||
/* Table: phpbb_bookmarks */
|
/* Table: phpbb_bookmarks */
|
||||||
CREATE TABLE phpbb_bookmarks (
|
CREATE TABLE phpbb_bookmarks (
|
||||||
topic_id INT4 DEFAULT '0' NOT NULL,
|
topic_id INT4 DEFAULT '0' NOT NULL,
|
||||||
|
@ -521,7 +524,6 @@ CREATE TABLE phpbb_posts (
|
||||||
post_approved INT2 DEFAULT '1' NOT NULL,
|
post_approved INT2 DEFAULT '1' NOT NULL,
|
||||||
post_reported INT2 DEFAULT '0' NOT NULL,
|
post_reported INT2 DEFAULT '0' NOT NULL,
|
||||||
enable_bbcode INT2 DEFAULT '1' NOT NULL,
|
enable_bbcode INT2 DEFAULT '1' NOT NULL,
|
||||||
enable_html INT2 DEFAULT '0' NOT NULL,
|
|
||||||
enable_smilies INT2 DEFAULT '1' NOT NULL,
|
enable_smilies INT2 DEFAULT '1' NOT NULL,
|
||||||
enable_magic_url INT2 DEFAULT '1' NOT NULL,
|
enable_magic_url INT2 DEFAULT '1' NOT NULL,
|
||||||
enable_sig INT2 DEFAULT '1' NOT NULL,
|
enable_sig INT2 DEFAULT '1' NOT NULL,
|
||||||
|
@ -571,7 +573,6 @@ CREATE TABLE phpbb_privmsgs (
|
||||||
message_time INT4 DEFAULT '0' NOT NULL,
|
message_time INT4 DEFAULT '0' NOT NULL,
|
||||||
message_reported INT2 DEFAULT '0' NOT NULL,
|
message_reported INT2 DEFAULT '0' NOT NULL,
|
||||||
enable_bbcode INT2 DEFAULT '1' NOT NULL,
|
enable_bbcode INT2 DEFAULT '1' NOT NULL,
|
||||||
enable_html INT2 DEFAULT '0' NOT NULL,
|
|
||||||
enable_smilies INT2 DEFAULT '1' NOT NULL,
|
enable_smilies INT2 DEFAULT '1' NOT NULL,
|
||||||
enable_magic_url INT2 DEFAULT '1' NOT NULL,
|
enable_magic_url INT2 DEFAULT '1' NOT NULL,
|
||||||
enable_sig INT2 DEFAULT '1' NOT NULL,
|
enable_sig INT2 DEFAULT '1' NOT NULL,
|
||||||
|
|
|
@ -17,8 +17,6 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bbcode', '1'
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bookmarks', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bookmarks', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_emailreuse', '0');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_emailreuse', '0');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_forum_notify', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_forum_notify', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_html', '0');
|
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_html_tags', 'b,i,u,pre');
|
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_mass_pm', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_mass_pm', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_name_chars', '.*');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_name_chars', '.*');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_namechange', '0');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_namechange', '0');
|
||||||
|
@ -28,7 +26,6 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_privmsg', '1
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_bbcode', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_bbcode', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_flash', '0');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_flash', '0');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_html', '0');
|
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_img', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_img', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_pm', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_pm', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_smilies', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_smilies', '1');
|
||||||
|
@ -38,7 +35,6 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('attachment_quota',
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_bbcode_pm', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_bbcode_pm', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_download_pm', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_download_pm', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_flash_pm', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_flash_pm', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_html_pm', '0');
|
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_img_pm', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_img_pm', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_method', 'db');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_method', 'db');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_quote_pm', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_quote_pm', '1');
|
||||||
|
@ -231,7 +227,6 @@ INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_sticky', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_attach', 1);
|
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_attach', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_download', 1);
|
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_download', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_icons', 1);
|
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_icons', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_html', 1);
|
|
||||||
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_bbcode', 1);
|
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_bbcode', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_smilies', 1);
|
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_smilies', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_img', 1);
|
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_img', 1);
|
||||||
|
@ -321,7 +316,6 @@ INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_attach', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_sig', 1);
|
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_sig', 1);
|
||||||
|
|
||||||
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_pm_attach', 1);
|
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_pm_attach', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_pm_html', 1);
|
|
||||||
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_pm_bbcode', 1);
|
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_pm_bbcode', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_pm_smilies', 1);
|
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_pm_smilies', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_pm_download', 1);
|
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_pm_download', 1);
|
||||||
|
@ -621,8 +615,8 @@ INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_nam
|
||||||
# Default user - admin rights
|
# Default user - admin rights
|
||||||
INSERT INTO phpbb_auth_users (user_id, forum_id, auth_option_id, auth_setting) SELECT 2, 0, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option LIKE 'u_%';
|
INSERT INTO phpbb_auth_users (user_id, forum_id, auth_option_id, auth_setting) SELECT 2, 0, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option LIKE 'u_%';
|
||||||
INSERT INTO phpbb_auth_users (user_id, forum_id, auth_option_id, auth_setting) SELECT 2, 0, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option LIKE 'a_%';
|
INSERT INTO phpbb_auth_users (user_id, forum_id, auth_option_id, auth_setting) SELECT 2, 0, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option LIKE 'a_%';
|
||||||
INSERT INTO phpbb_auth_users (user_id, forum_id, auth_option_id, auth_setting) SELECT 2, 1, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_poll', 'f_announce', 'f_sticky', 'f_attach', 'f_html');
|
INSERT INTO phpbb_auth_users (user_id, forum_id, auth_option_id, auth_setting) SELECT 2, 1, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_poll', 'f_announce', 'f_sticky', 'f_attach');
|
||||||
INSERT INTO phpbb_auth_users (user_id, forum_id, auth_option_id, auth_setting) SELECT 2, 2, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_poll', 'f_announce', 'f_sticky', 'f_attach', 'f_html');
|
INSERT INTO phpbb_auth_users (user_id, forum_id, auth_option_id, auth_setting) SELECT 2, 2, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_poll', 'f_announce', 'f_sticky', 'f_attach');
|
||||||
|
|
||||||
# Default user - moderation rights
|
# Default user - moderation rights
|
||||||
INSERT INTO phpbb_auth_users (user_id, forum_id, auth_option_id, auth_setting) SELECT 2, 1, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option LIKE 'm_%';
|
INSERT INTO phpbb_auth_users (user_id, forum_id, auth_option_id, auth_setting) SELECT 2, 1, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option LIKE 'm_%';
|
||||||
|
@ -631,8 +625,8 @@ INSERT INTO phpbb_auth_users (user_id, forum_id, auth_option_id, auth_setting) S
|
||||||
# ADMINISTRATOR group - admin and forum rights
|
# ADMINISTRATOR group - admin and forum rights
|
||||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 7, 0, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option LIKE 'u_%';
|
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 7, 0, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option LIKE 'u_%';
|
||||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 7, 0, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option LIKE 'a_%';
|
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 7, 0, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option LIKE 'a_%';
|
||||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 7, 1, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_poll', 'f_announce', 'f_sticky', 'f_attach', 'f_html');
|
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 7, 1, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_poll', 'f_announce', 'f_sticky', 'f_attach');
|
||||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 7, 2, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_poll', 'f_announce', 'f_sticky', 'f_attach', 'f_html');
|
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 7, 2, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option IN ('f_poll', 'f_announce', 'f_sticky', 'f_attach');
|
||||||
|
|
||||||
# SUPER MODERATOR group - moderator rights
|
# SUPER MODERATOR group - moderator rights
|
||||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 6, 0, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option LIKE 'u_%' AND auth_option NOT IN ('u_chggrp', 'u_chgname');
|
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_setting) SELECT 6, 0, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_option LIKE 'u_%' AND auth_option NOT IN ('u_chggrp', 'u_chgname');
|
||||||
|
|
|
@ -101,6 +101,7 @@ CREATE TABLE phpbb_banlist (
|
||||||
CREATE TABLE phpbb_bbcodes (
|
CREATE TABLE phpbb_bbcodes (
|
||||||
bbcode_id INTEGER PRIMARY KEY NOT NULL DEFAULT '0',
|
bbcode_id INTEGER PRIMARY KEY NOT NULL DEFAULT '0',
|
||||||
bbcode_tag varchar(16) NOT NULL DEFAULT '',
|
bbcode_tag varchar(16) NOT NULL DEFAULT '',
|
||||||
|
display_on_posting tinyint(1) NOT NULL DEFAULT '0',
|
||||||
bbcode_match varchar(255) NOT NULL DEFAULT '',
|
bbcode_match varchar(255) NOT NULL DEFAULT '',
|
||||||
bbcode_tpl text(65535) NOT NULL DEFAULT '',
|
bbcode_tpl text(65535) NOT NULL DEFAULT '',
|
||||||
first_pass_match varchar(255) NOT NULL DEFAULT '',
|
first_pass_match varchar(255) NOT NULL DEFAULT '',
|
||||||
|
@ -109,6 +110,8 @@ CREATE TABLE phpbb_bbcodes (
|
||||||
second_pass_replace text(65535) NOT NULL DEFAULT ''
|
second_pass_replace text(65535) NOT NULL DEFAULT ''
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX display_on_posting_phpbb_bbcodes on phpbb_bbcodes (display_on_posting);
|
||||||
|
|
||||||
# Table: phpbb_bookmarks
|
# Table: phpbb_bookmarks
|
||||||
CREATE TABLE phpbb_bookmarks (
|
CREATE TABLE phpbb_bookmarks (
|
||||||
topic_id mediumint(8) NOT NULL DEFAULT '0',
|
topic_id mediumint(8) NOT NULL DEFAULT '0',
|
||||||
|
@ -393,7 +396,6 @@ CREATE TABLE phpbb_posts (
|
||||||
post_approved tinyint(1) NOT NULL DEFAULT '1',
|
post_approved tinyint(1) NOT NULL DEFAULT '1',
|
||||||
post_reported tinyint(1) NOT NULL DEFAULT '0',
|
post_reported tinyint(1) NOT NULL DEFAULT '0',
|
||||||
enable_bbcode tinyint(1) NOT NULL DEFAULT '1',
|
enable_bbcode tinyint(1) NOT NULL DEFAULT '1',
|
||||||
enable_html tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
enable_smilies tinyint(1) NOT NULL DEFAULT '1',
|
enable_smilies tinyint(1) NOT NULL DEFAULT '1',
|
||||||
enable_magic_url tinyint(1) NOT NULL DEFAULT '1',
|
enable_magic_url tinyint(1) NOT NULL DEFAULT '1',
|
||||||
enable_sig tinyint(1) NOT NULL DEFAULT '1',
|
enable_sig tinyint(1) NOT NULL DEFAULT '1',
|
||||||
|
@ -429,7 +431,6 @@ CREATE TABLE phpbb_privmsgs (
|
||||||
message_time int(11) NOT NULL DEFAULT '0',
|
message_time int(11) NOT NULL DEFAULT '0',
|
||||||
message_reported tinyint(1) NOT NULL DEFAULT '0',
|
message_reported tinyint(1) NOT NULL DEFAULT '0',
|
||||||
enable_bbcode tinyint(1) NOT NULL DEFAULT '1',
|
enable_bbcode tinyint(1) NOT NULL DEFAULT '1',
|
||||||
enable_html tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
enable_smilies tinyint(1) NOT NULL DEFAULT '1',
|
enable_smilies tinyint(1) NOT NULL DEFAULT '1',
|
||||||
enable_magic_url tinyint(1) NOT NULL DEFAULT '1',
|
enable_magic_url tinyint(1) NOT NULL DEFAULT '1',
|
||||||
enable_sig tinyint(1) NOT NULL DEFAULT '1',
|
enable_sig tinyint(1) NOT NULL DEFAULT '1',
|
||||||
|
|
|
@ -71,7 +71,6 @@ $lang = array_merge($lang, array(
|
||||||
'PM_EDIT_TIME_EXPLAIN' => 'Limits the time available to edit a private message not already delivered, zero equals infinity',
|
'PM_EDIT_TIME_EXPLAIN' => 'Limits the time available to edit a private message not already delivered, zero equals infinity',
|
||||||
|
|
||||||
'ALLOW_MASS_PM' => 'Allow Mass PM\'s',
|
'ALLOW_MASS_PM' => 'Allow Mass PM\'s',
|
||||||
'ALLOW_HTML_PM' => 'Allow HTML in private messages',
|
|
||||||
'ALLOW_BBCODE_PM' => 'Allow BBCode in private messages',
|
'ALLOW_BBCODE_PM' => 'Allow BBCode in private messages',
|
||||||
'ALLOW_SMILIES_PM' => 'Allow smilies in private messages',
|
'ALLOW_SMILIES_PM' => 'Allow smilies in private messages',
|
||||||
'ALLOW_DOWNLOAD_PM' => 'Allow downloading of attachments in private messages',
|
'ALLOW_DOWNLOAD_PM' => 'Allow downloading of attachments in private messages',
|
||||||
|
@ -330,7 +329,7 @@ $lang = array_merge($lang, array(
|
||||||
|
|
||||||
// Board defaults
|
// Board defaults
|
||||||
$lang = array_merge($lang, array(
|
$lang = array_merge($lang, array(
|
||||||
'ACP_BOARD_DEFAULTS_EXPLAIN' => 'These settings allow you to define a number of default or global settings used by the board. For example, to disable the use of HTML across the entire board alter the relevant setting below. This data is also used for new user registrations and (where relevant) guest users. Please note that registered users can override some of these options with their own settings.',
|
'ACP_BOARD_DEFAULTS_EXPLAIN' => 'These settings allow you to define a number of default or global settings used by the board. This data is also used for new user registrations and (where relevant) guest users. Please note that registered users can override some of these options with their own settings.',
|
||||||
'DEFAULT_STYLE' => 'Default Style',
|
'DEFAULT_STYLE' => 'Default Style',
|
||||||
'OVERRIDE_STYLE' => 'Override user style',
|
'OVERRIDE_STYLE' => 'Override user style',
|
||||||
'OVERRIDE_STYLE_EXPLAIN' => 'Replaces users style with the default.',
|
'OVERRIDE_STYLE_EXPLAIN' => 'Replaces users style with the default.',
|
||||||
|
@ -359,16 +358,12 @@ $lang = array_merge($lang, array(
|
||||||
'MIN_RATINGS_EXPLAIN' => 'Number of distinct ratings before users karma is calculated.',
|
'MIN_RATINGS_EXPLAIN' => 'Number of distinct ratings before users karma is calculated.',
|
||||||
'ALLOW_ATTACHMENTS' => 'Allow Attachments',
|
'ALLOW_ATTACHMENTS' => 'Allow Attachments',
|
||||||
'ALLOW_PM_ATTACHMENTS' => 'Allow Attachments in Private Messages',
|
'ALLOW_PM_ATTACHMENTS' => 'Allow Attachments in Private Messages',
|
||||||
'ALLOW_HTML' => 'Allow HTML',
|
|
||||||
'ALLOWED_TAGS' => 'Allowed HTML tags',
|
|
||||||
'ALLOWED_TAGS_EXPLAIN' => 'Separate tags with commas.',
|
|
||||||
'ALLOW_BBCODE' => 'Allow BBCode',
|
'ALLOW_BBCODE' => 'Allow BBCode',
|
||||||
'ALLOW_SMILIES' => 'Allow Smilies',
|
'ALLOW_SMILIES' => 'Allow Smilies',
|
||||||
'ALLOW_SIG' => 'Allow Signatures',
|
'ALLOW_SIG' => 'Allow Signatures',
|
||||||
'ALLOW_SIG_IMG' => 'Allow use of IMG BBCode Tag in user signatures',
|
'ALLOW_SIG_IMG' => 'Allow use of IMG BBCode Tag in user signatures',
|
||||||
'ALLOW_SIG_BBCODE' => 'Allow BBCode in user signatures',
|
'ALLOW_SIG_BBCODE' => 'Allow BBCode in user signatures',
|
||||||
'ALLOW_SIG_SMILIES' => 'Allow use of smilies in user signatures',
|
'ALLOW_SIG_SMILIES' => 'Allow use of smilies in user signatures',
|
||||||
'ALLOW_SIG_HTML' => 'Allow use of HTML in user signatures',
|
|
||||||
'ALLOW_SIG_FLASH' => 'Allow use of FLASH BBCode Tag in user signatures',
|
'ALLOW_SIG_FLASH' => 'Allow use of FLASH BBCode Tag in user signatures',
|
||||||
'ALLOW_NO_CENSORS' => 'Allow Disable of Censors',
|
'ALLOW_NO_CENSORS' => 'Allow Disable of Censors',
|
||||||
'ALLOW_NO_CENSORS_EXPLAIN' => 'User can disable word censoring.',
|
'ALLOW_NO_CENSORS_EXPLAIN' => 'User can disable word censoring.',
|
||||||
|
|
|
@ -110,7 +110,7 @@ $lang = array_merge($lang, array(
|
||||||
'ACP_MESSAGE_SETTINGS' => 'Message Settings',
|
'ACP_MESSAGE_SETTINGS' => 'Message Settings',
|
||||||
'ACP_MODULE_MANAGEMENT' => 'Module Management',
|
'ACP_MODULE_MANAGEMENT' => 'Module Management',
|
||||||
'ACP_MOD_LOGS' => 'Moderator Log',
|
'ACP_MOD_LOGS' => 'Moderator Log',
|
||||||
'ACP_MOD_ROLES' => 'Mod Roles',
|
'ACP_MOD_ROLES' => 'Moderator Roles',
|
||||||
|
|
||||||
'ACP_ORPHAN_ATTACHMENTS' => 'Orphan Attachments',
|
'ACP_ORPHAN_ATTACHMENTS' => 'Orphan Attachments',
|
||||||
|
|
||||||
|
@ -377,18 +377,19 @@ $lang = array_merge($lang, array(
|
||||||
'LOG_ERROR_EMAIL' => '<b>Email Error</b><br />» %s',
|
'LOG_ERROR_EMAIL' => '<b>Email Error</b><br />» %s',
|
||||||
|
|
||||||
'LOG_FORUM_ADD' => '<b>Created new forum</b><br />» %s',
|
'LOG_FORUM_ADD' => '<b>Created new forum</b><br />» %s',
|
||||||
|
'LOG_FORUM_DEL_FORUM' => '<b>Deleted forum</b><br />» %s',
|
||||||
|
'LOG_FORUM_DEL_FORUMS' => '<b>Deleted forum and its subforums</b><br />» %s',
|
||||||
|
'LOG_FORUM_DEL_MOVE_FORUMS' => '<b>Deleted forum and moved subforums</b> to %s<br />» %s',
|
||||||
|
'LOG_FORUM_DEL_MOVE_POSTS' => '<b>Deleted forum and moved posts </b> to %s<br />» %s',
|
||||||
|
'LOG_FORUM_DEL_MOVE_POSTS_FORUMS' => '<b>Deleted forum and its subforums, moved messages</b> to %s<br />» %s',
|
||||||
|
'LOG_FORUM_DEL_MOVE_POSTS_MOVE_FORUMS' => '<b>Deleted forum, moved posts</b> to %s <b>and subforums</b> to %s<br />» %s',
|
||||||
|
'LOG_FORUM_DEL_POSTS' => '<b>Deleted forum and its messages</b><br />» %s',
|
||||||
|
'LOG_FORUM_DEL_POSTS_FORUMS' => '<b>Deleted forum, its messages and subforums</b><br />» %s',
|
||||||
|
'LOG_FORUM_DEL_POSTS_MOVE_FORUMS' => '<b>Deleted forum and its messages, moved subforums</b> to %s<br />» %s',
|
||||||
'LOG_FORUM_EDIT' => '<b>Edited forum details</b><br />» %s',
|
'LOG_FORUM_EDIT' => '<b>Edited forum details</b><br />» %s',
|
||||||
'LOG_FORUM_MOVE_DOWN' => '<b>Moved forum</b> %s <b>below</b> %s',
|
'LOG_FORUM_MOVE_DOWN' => '<b>Moved forum</b> %s <b>below</b> %s',
|
||||||
'LOG_FORUM_MOVE_UP' => '<b>Moved forum</b> %s <b>above</b> %s',
|
'LOG_FORUM_MOVE_UP' => '<b>Moved forum</b> %s <b>above</b> %s',
|
||||||
'LOG_FORUM_SYNC' => '<b>Re-synchronised forum</b><br />» %s',
|
'LOG_FORUM_SYNC' => '<b>Re-synchronised forum</b><br />» %s',
|
||||||
'LOG_FORUM_DEL_POSTS' => '<b>Deleted forum and its messages</b><br />» %s',
|
|
||||||
'LOG_FORUM_DEL_FORUMS' => '<b>Deleted forum and its subforums</b><br />» %s',
|
|
||||||
'LOG_FORUM_DEL_POSTS_MOVE_FORUMS' => '<b>Deleted forum and its messages, moved subforums</b> to %s<br />» %s',
|
|
||||||
'LOG_FORUM_DEL_MOVE_POSTS_FORUMS' => '<b>Deleted forum and its subforums, moved messages</b> to %s<br />» %s',
|
|
||||||
'LOG_FORUM_DEL_MOVE_POSTS' => '<b>Deleted forum and moved posts </b> to %s<br />» %s',
|
|
||||||
'LOG_FORUM_DEL_MOVE_FORUMS' => '<b>Deleted forum and moved subforums</b> to %s<br />» %s',
|
|
||||||
'LOG_FORUM_DEL_POSTS_FORUMS' => '<b>Deleted forum, its messages and subforums</b><br />» %s',
|
|
||||||
'LOG_FORUM_DEL_MOVE_POSTS_MOVE_FORUMS' => '<b>Deleted forum, moved posts</b> to %s <b>and subforums</b> to %s<br />» %s',
|
|
||||||
|
|
||||||
'LOG_GROUP_CREATED' => '<b>New usergroup created</b><br />» %s',
|
'LOG_GROUP_CREATED' => '<b>New usergroup created</b><br />» %s',
|
||||||
'LOG_GROUP_DEFAULTS' => '<b>Group made default for members</b><br />» %s',
|
'LOG_GROUP_DEFAULTS' => '<b>Group made default for members</b><br />» %s',
|
||||||
|
@ -438,9 +439,9 @@ $lang = array_merge($lang, array(
|
||||||
'LOG_F_ROLE_ADD' => '<b>Forum Role added</b><br />» %s',
|
'LOG_F_ROLE_ADD' => '<b>Forum Role added</b><br />» %s',
|
||||||
'LOG_F_ROLE_EDIT' => '<b>Forum Role edited</b><br />» %s',
|
'LOG_F_ROLE_EDIT' => '<b>Forum Role edited</b><br />» %s',
|
||||||
'LOG_F_ROLE_REMOVED' => '<b>Forum Role removed</b><br />» %s',
|
'LOG_F_ROLE_REMOVED' => '<b>Forum Role removed</b><br />» %s',
|
||||||
'LOG_M_ROLE_ADD' => '<b>Mod Role added</b><br />» %s',
|
'LOG_M_ROLE_ADD' => '<b>Moderator Role added</b><br />» %s',
|
||||||
'LOG_M_ROLE_EDIT' => '<b>Mod Role edited</b><br />» %s',
|
'LOG_M_ROLE_EDIT' => '<b>Moderator Role edited</b><br />» %s',
|
||||||
'LOG_M_ROLE_REMOVED' => '<b>Mod Role removed</b><br />» %s',
|
'LOG_M_ROLE_REMOVED' => '<b>Moderator Role removed</b><br />» %s',
|
||||||
'LOG_U_ROLE_ADD' => '<b>User Role added</b><br />» %s',
|
'LOG_U_ROLE_ADD' => '<b>User Role added</b><br />» %s',
|
||||||
'LOG_U_ROLE_EDIT' => '<b>User Role edited</b><br />» %s',
|
'LOG_U_ROLE_EDIT' => '<b>User Role edited</b><br />» %s',
|
||||||
'LOG_U_ROLE_REMOVED' => '<b>User Role removed</b><br />» %s',
|
'LOG_U_ROLE_REMOVED' => '<b>User Role removed</b><br />» %s',
|
||||||
|
|
|
@ -103,7 +103,6 @@ $lang = array_merge($lang, array(
|
||||||
'acl_u_pm_attach' => array('lang' => 'Can attach files in 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_download' => array('lang' => 'Can download files in private messages', 'cat' => 'pm'),
|
||||||
'acl_u_pm_bbcode' => array('lang' => 'Can post BBCode in private messages', 'cat' => 'pm'),
|
'acl_u_pm_bbcode' => array('lang' => 'Can post BBCode in private messages', 'cat' => 'pm'),
|
||||||
'acl_u_pm_html' => array('lang' => 'Can post HTML in private messages', 'cat' => 'pm'),
|
|
||||||
'acl_u_pm_smilies' => array('lang' => 'Can post smilies in private messages', 'cat' => 'pm'),
|
'acl_u_pm_smilies' => array('lang' => 'Can post smilies in private messages', 'cat' => 'pm'),
|
||||||
'acl_u_pm_img' => array('lang' => 'Can post images in private messages', 'cat' => 'pm'),
|
'acl_u_pm_img' => array('lang' => 'Can post images in private messages', 'cat' => 'pm'),
|
||||||
'acl_u_pm_flash' => array('lang' => 'Can post Flash in private messages', 'cat' => 'pm'),
|
'acl_u_pm_flash' => array('lang' => 'Can post Flash in private messages', 'cat' => 'pm'),
|
||||||
|
@ -134,7 +133,6 @@ $lang = array_merge($lang, array(
|
||||||
'acl_f_attach' => array('lang' => 'Can attach files', 'cat' => 'content'),
|
'acl_f_attach' => array('lang' => 'Can attach files', 'cat' => 'content'),
|
||||||
'acl_f_download' => array('lang' => 'Can download 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_sigs' => array('lang' => 'Can use signatures', 'cat' => 'content'),
|
||||||
'acl_f_html' => array('lang' => 'Can post HTML', 'cat' => 'content'),
|
|
||||||
'acl_f_bbcode' => array('lang' => 'Can post BBCode', 'cat' => 'content'),
|
'acl_f_bbcode' => array('lang' => 'Can post BBCode', 'cat' => 'content'),
|
||||||
'acl_f_smilies' => array('lang' => 'Can post smilies', 'cat' => 'content'),
|
'acl_f_smilies' => array('lang' => 'Can post smilies', 'cat' => 'content'),
|
||||||
'acl_f_img' => array('lang' => 'Can post images', 'cat' => 'content'),
|
'acl_f_img' => array('lang' => 'Can post images', 'cat' => 'content'),
|
||||||
|
|
|
@ -130,7 +130,7 @@ $help = array(
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
0 => 'Can I use HTML?',
|
0 => 'Can I use HTML?',
|
||||||
1 => 'That depends on whether the administrator allows you too, they have complete control over it. If you are allowed to use it you will probably find only certain tags work. This is a <i>safety</i> feature to prevent people abusing the board by using tags which may destroy the layout or cause other problems. If HTML is enabled you can disable it on a per post basis from the posting form.'
|
1 => '...'
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
0 => 'What are Smileys?',
|
0 => 'What are Smileys?',
|
||||||
|
|
|
@ -74,7 +74,6 @@ $lang = array_merge($lang, array(
|
||||||
'DELETE_POST_CONFIRM' => 'Are you sure you want to delete this message?',
|
'DELETE_POST_CONFIRM' => 'Are you sure you want to delete this message?',
|
||||||
'DELETE_POST_WARN' => 'Once deleted the post cannot be recovered',
|
'DELETE_POST_WARN' => 'Once deleted the post cannot be recovered',
|
||||||
'DISABLE_BBCODE' => 'Disable BBCode',
|
'DISABLE_BBCODE' => 'Disable BBCode',
|
||||||
'DISABLE_HTML' => 'Disable HTML',
|
|
||||||
'DISABLE_MAGIC_URL' => 'Do not automatically parse URLs',
|
'DISABLE_MAGIC_URL' => 'Do not automatically parse URLs',
|
||||||
'DISABLE_SMILIES' => 'Disable Smilies',
|
'DISABLE_SMILIES' => 'Disable Smilies',
|
||||||
'DISALLOWED_EXTENSION' => 'The Extension %s is not allowed',
|
'DISALLOWED_EXTENSION' => 'The Extension %s is not allowed',
|
||||||
|
@ -100,9 +99,6 @@ $lang = array_merge($lang, array(
|
||||||
|
|
||||||
'GENERAL_UPLOAD_ERROR' => 'Could not upload Attachment to %s',
|
'GENERAL_UPLOAD_ERROR' => 'Could not upload Attachment to %s',
|
||||||
|
|
||||||
'HTML_IS_OFF' => 'HTML is <u>OFF</u>',
|
|
||||||
'HTML_IS_ON' => 'HTML is <u>ON</u>',
|
|
||||||
|
|
||||||
'IMAGES_ARE_OFF' => '[img] is <u>OFF</u>',
|
'IMAGES_ARE_OFF' => '[img] is <u>OFF</u>',
|
||||||
'IMAGES_ARE_ON' => '[img] is <u>ON</u>',
|
'IMAGES_ARE_ON' => '[img] is <u>ON</u>',
|
||||||
'INVALID_FILENAME' => '%s is an invalid filename',
|
'INVALID_FILENAME' => '%s is an invalid filename',
|
||||||
|
|
|
@ -102,7 +102,6 @@ $lang = array_merge($lang, array(
|
||||||
'DEFAULT_ACTION_EXPLAIN' => 'This Action will be triggered if none of the above is applicable',
|
'DEFAULT_ACTION_EXPLAIN' => 'This Action will be triggered if none of the above is applicable',
|
||||||
'DEFAULT_ADD_SIG' => 'Attach my signature by default',
|
'DEFAULT_ADD_SIG' => 'Attach my signature by default',
|
||||||
'DEFAULT_BBCODE' => 'Enable BBCode by default',
|
'DEFAULT_BBCODE' => 'Enable BBCode by default',
|
||||||
'DEFAULT_HTML' => 'Enable HTML by default',
|
|
||||||
'DEFAULT_NOTIFY' => 'Notify me upon replies by default',
|
'DEFAULT_NOTIFY' => 'Notify me upon replies by default',
|
||||||
'DEFAULT_SMILIES' => 'Enable smilies by default',
|
'DEFAULT_SMILIES' => 'Enable smilies by default',
|
||||||
'DEFINED_RULES' => 'Defined Rules',
|
'DEFINED_RULES' => 'Defined Rules',
|
||||||
|
|
|
@ -232,8 +232,6 @@ if ($sql)
|
||||||
|
|
||||||
$enable_urls = $enable_magic_url;
|
$enable_urls = $enable_magic_url;
|
||||||
|
|
||||||
$enable_html = (isset($enable_html)) ? $enable_html : $config['allow_html'];
|
|
||||||
|
|
||||||
if (!in_array($mode, array('quote', 'edit', 'delete')))
|
if (!in_array($mode, array('quote', 'edit', 'delete')))
|
||||||
{
|
{
|
||||||
$enable_sig = ($config['allow_sig'] && $user->optionget('attachsig'));
|
$enable_sig = ($config['allow_sig'] && $user->optionget('attachsig'));
|
||||||
|
@ -261,7 +259,7 @@ if ($sql)
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
$check_value = (($enable_html+1) << 16) + (($enable_bbcode+1) << 8) + (($enable_smilies+1) << 4) + (($enable_urls+1) << 2) + (($enable_sig+1) << 1);
|
$check_value = (($enable_bbcode+1) << 8) + (($enable_smilies+1) << 4) + (($enable_urls+1) << 2) + (($enable_sig+1) << 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify user checkbox
|
// Notify user checkbox
|
||||||
|
@ -393,7 +391,6 @@ if ($mode == 'delete')
|
||||||
|
|
||||||
|
|
||||||
// HTML, BBCode, Smilies, Images and Flash status
|
// HTML, BBCode, Smilies, Images and Flash status
|
||||||
$html_status = ($config['allow_html'] && $auth->acl_get('f_html', $forum_id));
|
|
||||||
$bbcode_status = ($config['allow_bbcode'] && $auth->acl_get('f_bbcode', $forum_id));
|
$bbcode_status = ($config['allow_bbcode'] && $auth->acl_get('f_bbcode', $forum_id));
|
||||||
$smilies_status = ($config['allow_smilies'] && $auth->acl_get('f_smilies', $forum_id));
|
$smilies_status = ($config['allow_smilies'] && $auth->acl_get('f_smilies', $forum_id));
|
||||||
$img_status = ($auth->acl_get('f_img', $forum_id));
|
$img_status = ($auth->acl_get('f_img', $forum_id));
|
||||||
|
@ -519,7 +516,6 @@ if ($submit || $preview || $refresh)
|
||||||
$topic_time_limit = (isset($_POST['topic_time_limit'])) ? (int) $_POST['topic_time_limit'] : (($mode != 'post') ? $topic_time_limit : 0);
|
$topic_time_limit = (isset($_POST['topic_time_limit'])) ? (int) $_POST['topic_time_limit'] : (($mode != 'post') ? $topic_time_limit : 0);
|
||||||
$icon_id = request_var('icon', 0);
|
$icon_id = request_var('icon', 0);
|
||||||
|
|
||||||
$enable_html = (!$html_status || isset($_POST['disable_html'])) ? false : true;
|
|
||||||
$enable_bbcode = (!$bbcode_status || isset($_POST['disable_bbcode'])) ? false : true;
|
$enable_bbcode = (!$bbcode_status || isset($_POST['disable_bbcode'])) ? false : true;
|
||||||
$enable_smilies = (!$smilies_status || isset($_POST['disable_smilies'])) ? false : true;
|
$enable_smilies = (!$smilies_status || isset($_POST['disable_smilies'])) ? false : true;
|
||||||
$enable_urls = (isset($_POST['disable_magic_url'])) ? 0 : 1;
|
$enable_urls = (isset($_POST['disable_magic_url'])) ? 0 : 1;
|
||||||
|
@ -533,7 +529,7 @@ if ($submit || $preview || $refresh)
|
||||||
|
|
||||||
if ($submit)
|
if ($submit)
|
||||||
{
|
{
|
||||||
$status_switch = (($enable_html+1) << 16) + (($enable_bbcode+1) << 8) + (($enable_smilies+1) << 4) + (($enable_urls+1) << 2) + (($enable_sig+1) << 1);
|
$status_switch = (($enable_bbcode+1) << 8) + (($enable_smilies+1) << 4) + (($enable_urls+1) << 2) + (($enable_sig+1) << 1);
|
||||||
$status_switch = ($status_switch != $check_value);
|
$status_switch = ($status_switch != $check_value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -615,7 +611,7 @@ if ($submit || $preview || $refresh)
|
||||||
// Parse message
|
// Parse message
|
||||||
if ($update_message)
|
if ($update_message)
|
||||||
{
|
{
|
||||||
$message_parser->parse($enable_html, $enable_bbcode, $enable_urls, $enable_smilies, $img_status, $flash_status, $quote_status);
|
$message_parser->parse($enable_bbcode, $enable_urls, $enable_smilies, $img_status, $flash_status, $quote_status);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -685,7 +681,6 @@ if ($submit || $preview || $refresh)
|
||||||
'poll_start' => $poll_start,
|
'poll_start' => $poll_start,
|
||||||
'poll_last_vote' => $poll_last_vote,
|
'poll_last_vote' => $poll_last_vote,
|
||||||
'poll_vote_change' => $poll_vote_change,
|
'poll_vote_change' => $poll_vote_change,
|
||||||
'enable_html' => $enable_html,
|
|
||||||
'enable_bbcode' => $enable_bbcode,
|
'enable_bbcode' => $enable_bbcode,
|
||||||
'enable_urls' => $enable_urls,
|
'enable_urls' => $enable_urls,
|
||||||
'enable_smilies' => $enable_smilies,
|
'enable_smilies' => $enable_smilies,
|
||||||
|
@ -820,7 +815,6 @@ if ($submit || $preview || $refresh)
|
||||||
'poster_id' => (int) $poster_id,
|
'poster_id' => (int) $poster_id,
|
||||||
'enable_sig' => (bool) $enable_sig,
|
'enable_sig' => (bool) $enable_sig,
|
||||||
'enable_bbcode' => (bool) $enable_bbcode,
|
'enable_bbcode' => (bool) $enable_bbcode,
|
||||||
'enable_html' => (bool) $enable_html,
|
|
||||||
'enable_smilies' => (bool) $enable_smilies,
|
'enable_smilies' => (bool) $enable_smilies,
|
||||||
'enable_urls' => (bool) $enable_urls,
|
'enable_urls' => (bool) $enable_urls,
|
||||||
'enable_indexing' => (bool) $enable_indexing,
|
'enable_indexing' => (bool) $enable_indexing,
|
||||||
|
@ -855,7 +849,7 @@ if (!sizeof($error) && $preview)
|
||||||
{
|
{
|
||||||
$post_time = ($mode == 'edit') ? $post_time : $current_time;
|
$post_time = ($mode == 'edit') ? $post_time : $current_time;
|
||||||
|
|
||||||
$preview_message = $message_parser->format_display($enable_html, $enable_bbcode, $enable_urls, $enable_smilies, false);
|
$preview_message = $message_parser->format_display($enable_bbcode, $enable_urls, $enable_smilies, false);
|
||||||
|
|
||||||
$preview_signature = ($mode == 'edit') ? $user_sig : $user->data['user_sig'];
|
$preview_signature = ($mode == 'edit') ? $user_sig : $user->data['user_sig'];
|
||||||
$preview_signature_uid = ($mode == 'edit') ? $user_sig_bbcode_uid : $user->data['user_sig_bbcode_uid'];
|
$preview_signature_uid = ($mode == 'edit') ? $user_sig_bbcode_uid : $user->data['user_sig_bbcode_uid'];
|
||||||
|
@ -869,7 +863,7 @@ if (!sizeof($error) && $preview)
|
||||||
$parse_sig->bbcode_bitfield = $preview_signature_bitfield;
|
$parse_sig->bbcode_bitfield = $preview_signature_bitfield;
|
||||||
|
|
||||||
// Not sure about parameters for bbcode/smilies/urls... in signatures
|
// Not sure about parameters for bbcode/smilies/urls... in signatures
|
||||||
$parse_sig->format_display($config['allow_html'], $config['allow_bbcode'], true, $config['allow_smilies']);
|
$parse_sig->format_display($config['allow_bbcode'], true, $config['allow_smilies']);
|
||||||
$preview_signature = $parse_sig->message;
|
$preview_signature = $parse_sig->message;
|
||||||
unset($parse_sig);
|
unset($parse_sig);
|
||||||
}
|
}
|
||||||
|
@ -888,7 +882,7 @@ if (!sizeof($error) && $preview)
|
||||||
$parse_poll->bbcode_uid = $message_parser->bbcode_uid;
|
$parse_poll->bbcode_uid = $message_parser->bbcode_uid;
|
||||||
$parse_poll->bbcode_bitfield = $message_parser->bbcode_bitfield;
|
$parse_poll->bbcode_bitfield = $message_parser->bbcode_bitfield;
|
||||||
|
|
||||||
$parse_poll->format_display($enable_html, $enable_bbcode, $enable_urls, $enable_smilies);
|
$parse_poll->format_display($enable_bbcode, $enable_urls, $enable_smilies);
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_HAS_POLL_OPTIONS'=> (sizeof($poll_options)),
|
'S_HAS_POLL_OPTIONS'=> (sizeof($poll_options)),
|
||||||
|
@ -901,7 +895,7 @@ if (!sizeof($error) && $preview)
|
||||||
);
|
);
|
||||||
|
|
||||||
$parse_poll->message = implode("\n", $poll_options);
|
$parse_poll->message = implode("\n", $poll_options);
|
||||||
$parse_poll->format_display($enable_html, $enable_bbcode, $enable_urls, $enable_smilies);
|
$parse_poll->format_display($enable_bbcode, $enable_urls, $enable_smilies);
|
||||||
$preview_poll_options = explode('<br />', $parse_poll->message);
|
$preview_poll_options = explode('<br />', $parse_poll->message);
|
||||||
unset($parse_poll);
|
unset($parse_poll);
|
||||||
|
|
||||||
|
@ -1008,7 +1002,6 @@ if ($enable_icons)
|
||||||
$s_topic_icons = posting_gen_topic_icons($mode, $icon_id);
|
$s_topic_icons = posting_gen_topic_icons($mode, $icon_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
$html_checked = (isset($enable_html)) ? !$enable_html : (($config['allow_html']) ? !$user->optionget('html') : 1);
|
|
||||||
$bbcode_checked = (isset($enable_bbcode)) ? !$enable_bbcode : (($config['allow_bbcode']) ? !$user->optionget('bbcode') : 1);
|
$bbcode_checked = (isset($enable_bbcode)) ? !$enable_bbcode : (($config['allow_bbcode']) ? !$user->optionget('bbcode') : 1);
|
||||||
$smilies_checked = (isset($enable_smilies)) ? !$enable_smilies : (($config['allow_smilies']) ? !$user->optionget('smilies') : 1);
|
$smilies_checked = (isset($enable_smilies)) ? !$enable_smilies : (($config['allow_smilies']) ? !$user->optionget('smilies') : 1);
|
||||||
$urls_checked = (isset($enable_urls)) ? !$enable_urls : 0;
|
$urls_checked = (isset($enable_urls)) ? !$enable_urls : 0;
|
||||||
|
@ -1079,7 +1072,6 @@ $template->assign_vars(array(
|
||||||
'USERNAME' => ((!$preview && $mode != 'quote') || $preview) ? stripslashes($username) : '',
|
'USERNAME' => ((!$preview && $mode != 'quote') || $preview) ? stripslashes($username) : '',
|
||||||
'SUBJECT' => $post_subject,
|
'SUBJECT' => $post_subject,
|
||||||
'MESSAGE' => $post_text,
|
'MESSAGE' => $post_text,
|
||||||
'HTML_STATUS' => ($html_status) ? $user->lang['HTML_IS_ON'] : $user->lang['HTML_IS_OFF'],
|
|
||||||
'BBCODE_STATUS' => ($bbcode_status) ? sprintf($user->lang['BBCODE_IS_ON'], '<a href="' . "faq.$phpEx$SID&mode=bbcode" . '" onclick="target=\'_phpbbcode\';">', '</a>') : sprintf($user->lang['BBCODE_IS_OFF'], '<a href="' . "faq.$phpEx$SID&mode=bbcode" . '" onclick="target=\'_phpbbcode\';">', '</a>'),
|
'BBCODE_STATUS' => ($bbcode_status) ? sprintf($user->lang['BBCODE_IS_ON'], '<a href="' . "faq.$phpEx$SID&mode=bbcode" . '" onclick="target=\'_phpbbcode\';">', '</a>') : sprintf($user->lang['BBCODE_IS_OFF'], '<a href="' . "faq.$phpEx$SID&mode=bbcode" . '" onclick="target=\'_phpbbcode\';">', '</a>'),
|
||||||
'IMG_STATUS' => ($img_status) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'],
|
'IMG_STATUS' => ($img_status) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'],
|
||||||
'FLASH_STATUS' => ($flash_status) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'],
|
'FLASH_STATUS' => ($flash_status) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'],
|
||||||
|
@ -1101,8 +1093,6 @@ $template->assign_vars(array(
|
||||||
'S_DISPLAY_USERNAME' => (!$user->data['is_registered'] || ($mode == 'edit' && $post_username)),
|
'S_DISPLAY_USERNAME' => (!$user->data['is_registered'] || ($mode == 'edit' && $post_username)),
|
||||||
'S_SHOW_TOPIC_ICONS' => $s_topic_icons,
|
'S_SHOW_TOPIC_ICONS' => $s_topic_icons,
|
||||||
'S_DELETE_ALLOWED' => ($mode == 'edit' && (($post_id == $topic_last_post_id && $poster_id == $user->data['user_id'] && $auth->acl_get('f_delete', $forum_id)) || $auth->acl_get('m_delete', $forum_id))),
|
'S_DELETE_ALLOWED' => ($mode == 'edit' && (($post_id == $topic_last_post_id && $poster_id == $user->data['user_id'] && $auth->acl_get('f_delete', $forum_id)) || $auth->acl_get('m_delete', $forum_id))),
|
||||||
'S_HTML_ALLOWED' => $html_status,
|
|
||||||
'S_HTML_CHECKED' => ($html_checked) ? ' checked="checked"' : '',
|
|
||||||
'S_BBCODE_ALLOWED' => $bbcode_status,
|
'S_BBCODE_ALLOWED' => $bbcode_status,
|
||||||
'S_BBCODE_CHECKED' => ($bbcode_checked) ? ' checked="checked"' : '',
|
'S_BBCODE_CHECKED' => ($bbcode_checked) ? ' checked="checked"' : '',
|
||||||
'S_SMILIES_ALLOWED' => $smilies_status,
|
'S_SMILIES_ALLOWED' => $smilies_status,
|
||||||
|
@ -1121,10 +1111,33 @@ $template->assign_vars(array(
|
||||||
'S_HAS_DRAFTS' => ($auth->acl_get('u_savedrafts') && $user->data['is_registered'] && $drafts),
|
'S_HAS_DRAFTS' => ($auth->acl_get('u_savedrafts') && $user->data['is_registered'] && $drafts),
|
||||||
'S_FORM_ENCTYPE' => $form_enctype,
|
'S_FORM_ENCTYPE' => $form_enctype,
|
||||||
|
|
||||||
|
'S_BBCODE_IMG' => $img_status,
|
||||||
|
'S_BBCODE_FLASH' => $flash_status,
|
||||||
|
'S_BBCODE_QUOTE' => $quote_status,
|
||||||
|
|
||||||
'S_POST_ACTION' => $s_action,
|
'S_POST_ACTION' => $s_action,
|
||||||
'S_HIDDEN_FIELDS' => $s_hidden_fields)
|
'S_HIDDEN_FIELDS' => $s_hidden_fields)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Build custom bbcodes array
|
||||||
|
$sql = 'SELECT bbcode_id, bbcode_tag
|
||||||
|
FROM ' . BBCODES_TABLE . '
|
||||||
|
WHERE display_on_posting = 1';
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
$i = 0;
|
||||||
|
while ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
$template->assign_block_vars('custom_tags', array(
|
||||||
|
'BBCODE_NAME' => "'[{$row['bbcode_tag']}]', '[/" . str_replace('=', '', $row['bbcode_tag']) . "]'",
|
||||||
|
'BBCODE_ID' => 22 + ($i * 2),
|
||||||
|
'BBCODE_TAG' => $row['bbcode_tag'])
|
||||||
|
);
|
||||||
|
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
// Poll entry
|
// Poll entry
|
||||||
if (($mode == 'post' || ($mode == 'edit' && $post_id == $topic_first_post_id && (!$poll_last_vote || $auth->acl_get('m_edit', $forum_id))))
|
if (($mode == 'post' || ($mode == 'edit' && $post_id == $topic_first_post_id && (!$poll_last_vote || $auth->acl_get('m_edit', $forum_id))))
|
||||||
&& $auth->acl_get('f_poll', $forum_id))
|
&& $auth->acl_get('f_poll', $forum_id))
|
||||||
|
@ -1371,7 +1384,6 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||||
'post_time' => $current_time,
|
'post_time' => $current_time,
|
||||||
'post_approved' => ($auth->acl_get('f_moderate', $data['forum_id']) && !$auth->acl_get('m_approve')) ? 0 : 1,
|
'post_approved' => ($auth->acl_get('f_moderate', $data['forum_id']) && !$auth->acl_get('m_approve')) ? 0 : 1,
|
||||||
'enable_bbcode' => $data['enable_bbcode'],
|
'enable_bbcode' => $data['enable_bbcode'],
|
||||||
'enable_html' => $data['enable_html'],
|
|
||||||
'enable_smilies' => $data['enable_smilies'],
|
'enable_smilies' => $data['enable_smilies'],
|
||||||
'enable_magic_url' => $data['enable_urls'],
|
'enable_magic_url' => $data['enable_urls'],
|
||||||
'enable_sig' => $data['enable_sig'],
|
'enable_sig' => $data['enable_sig'],
|
||||||
|
@ -1422,7 +1434,6 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||||
'icon_id' => $data['icon_id'],
|
'icon_id' => $data['icon_id'],
|
||||||
'post_approved' => ($auth->acl_get('f_moderate', $data['forum_id']) && !$auth->acl_get('m_approve')) ? 0 : 1,
|
'post_approved' => ($auth->acl_get('f_moderate', $data['forum_id']) && !$auth->acl_get('m_approve')) ? 0 : 1,
|
||||||
'enable_bbcode' => $data['enable_bbcode'],
|
'enable_bbcode' => $data['enable_bbcode'],
|
||||||
'enable_html' => $data['enable_html'],
|
|
||||||
'enable_smilies' => $data['enable_smilies'],
|
'enable_smilies' => $data['enable_smilies'],
|
||||||
'enable_magic_url' => $data['enable_urls'],
|
'enable_magic_url' => $data['enable_urls'],
|
||||||
'enable_sig' => $data['enable_sig'],
|
'enable_sig' => $data['enable_sig'],
|
||||||
|
|
|
@ -33,7 +33,7 @@ if (!$id)
|
||||||
trigger_error('INVALID_MODE');
|
trigger_error('INVALID_MODE');
|
||||||
}
|
}
|
||||||
|
|
||||||
$redirect_url = ($report_post) ? "{$phpbb_root_path}viewtopic.$phpEx$SID&p=$id#$id" : "{$phpbb_root_path}ucp.$phpEx$SID&i=pm&p=$id";
|
$redirect_url = ($report_post) ? "{$phpbb_root_path}viewtopic.$phpEx$SID&p=$id#p$id" : "{$phpbb_root_path}ucp.$phpEx$SID&i=pm&p=$id";
|
||||||
|
|
||||||
// Has the report been cancelled?
|
// Has the report been cancelled?
|
||||||
if (isset($_POST['cancel']))
|
if (isset($_POST['cancel']))
|
||||||
|
@ -387,7 +387,6 @@ function report_notification($notify_user, $report_post, $report_data)
|
||||||
'from_username' => $user->data['username'],
|
'from_username' => $user->data['username'],
|
||||||
'icon_id' => 0,
|
'icon_id' => 0,
|
||||||
'enable_bbcode' => 0,
|
'enable_bbcode' => 0,
|
||||||
'enable_html' => 0,
|
|
||||||
'enable_smilies' => 0,
|
'enable_smilies' => 0,
|
||||||
'enable_magic_url' => 1,
|
'enable_magic_url' => 1,
|
||||||
'enable_sig' => 0,
|
'enable_sig' => 0,
|
||||||
|
|
|
@ -471,6 +471,7 @@ if ($keywords || $author || $search_id)
|
||||||
AND t.topic_id = tp.topic_id)';
|
AND t.topic_id = tp.topic_id)';
|
||||||
$sql_select .= ', tp.topic_posted';
|
$sql_select .= ', tp.topic_posted';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($config['load_db_lastread'])
|
if ($config['load_db_lastread'])
|
||||||
{
|
{
|
||||||
$sql_from .= ' LEFT JOIN ' . TOPICS_TRACK_TABLE . ' tt ON (tt.user_id = ' . $user->data['user_id'] . '
|
$sql_from .= ' LEFT JOIN ' . TOPICS_TRACK_TABLE . ' tt ON (tt.user_id = ' . $user->data['user_id'] . '
|
||||||
|
@ -611,11 +612,6 @@ if ($keywords || $author || $search_id)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($row['enable_html'])
|
|
||||||
{
|
|
||||||
$row['post_text'] = preg_replace('#(<!\-\- h \-\-><)([\/]?.*?)(><!\-\- h \-\->)#is', "<\\2>", $row['post_text']);
|
|
||||||
}
|
|
||||||
|
|
||||||
decode_message($row['post_text'], $row['bbcode_uid']);
|
decode_message($row['post_text'], $row['bbcode_uid']);
|
||||||
|
|
||||||
if ($return_chars != -1)
|
if ($return_chars != -1)
|
||||||
|
|
|
@ -14,7 +14,7 @@ var text_name = 'message';
|
||||||
|
|
||||||
// Define the bbCode tags
|
// Define the bbCode tags
|
||||||
bbcode = new Array();
|
bbcode = new Array();
|
||||||
bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]');
|
bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);
|
||||||
imageTag = false;
|
imageTag = false;
|
||||||
|
|
||||||
// Helpline messages
|
// Helpline messages
|
||||||
|
@ -234,21 +234,30 @@ function checkForm()
|
||||||
<td colspan="2"><input type="button" class="btnbbcode" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" />
|
<td colspan="2"><input type="button" class="btnbbcode" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" />
|
||||||
<input type="button" class="btnbbcode" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" />
|
<input type="button" class="btnbbcode" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" />
|
||||||
<input type="button" class="btnbbcode" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" />
|
<input type="button" class="btnbbcode" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" />
|
||||||
<input type="button" class="btnbbcode" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" />
|
<!-- IF S_BBCODE_QUOTE --><input type="button" class="btnbbcode" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" /><!-- ENDIF -->
|
||||||
<input type="button" class="btnbbcode" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" />
|
<input type="button" class="btnbbcode" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" />
|
||||||
<input type="button" class="btnbbcode" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" />
|
<input type="button" class="btnbbcode" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" />
|
||||||
<input type="button" class="btnbbcode" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" />
|
<input type="button" class="btnbbcode" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" />
|
||||||
<input type="button" class="btnbbcode" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" />
|
<!-- IF S_BBCODE_IMG --><input type="button" class="btnbbcode" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" /><!-- ENDIF -->
|
||||||
<input type="button" class="btnbbcode" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" onmouseover="helpline('w')" />
|
<input type="button" class="btnbbcode" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" onmouseover="helpline('w')" />
|
||||||
|
<!-- IF S_BBCODE_FLASH --><input type="button" class="btnbbcode" accesskey="f" name="addbbcode18" value="Flash" onclick="bbstyle(18)" /><!-- ENDIF -->
|
||||||
<span class="genmed" style="white-space: nowrap;">{L_FONT_SIZE}: <select class="gensmall" name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" onmouseover="helpline('f')">
|
<span class="genmed" style="white-space: nowrap;">{L_FONT_SIZE}: <select class="gensmall" name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" onmouseover="helpline('f')">
|
||||||
<option value="7">{L_FONT_TINY}</option>
|
<option value="7">{L_FONT_TINY}</option>
|
||||||
<option value="9">{L_FONT_SMALL}</option>
|
<option value="9">{L_FONT_SMALL}</option>
|
||||||
<option value="12" selected="selected">{L_FONT_NORMAL}</option>
|
<option value="12" selected="selected">{L_FONT_NORMAL}</option>
|
||||||
<option value="18">{L_FONT_LARGE}</option>
|
<option value="18">{L_FONT_LARGE}</option>
|
||||||
<option value="24">{L_FONT_HUGE}</option>
|
<option value="24">{L_FONT_HUGE}</option>
|
||||||
</select> | <a href="javascript:bbstyle(-1)" onmouseover="helpline('a')">{L_CLOSE_TAGS}</a></span>
|
</select> | <a href="javascript:bbstyle(-1)" onmouseover="helpline('a')">{L_CLOSE_TAGS}</a></span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<!-- IF .custom_tags -->
|
||||||
|
<tr valign="middle" align="left">
|
||||||
|
<td colspan="2">
|
||||||
|
<!-- BEGIN custom_tags -->
|
||||||
|
<input type="button" class="btnbbcode" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})" />
|
||||||
|
<!-- END custom_tags -->
|
||||||
|
</td>
|
||||||
|
<!-- ENDIF -->
|
||||||
<tr>
|
<tr>
|
||||||
<td><input type="text" name="helpbox" style="width:100%" maxlength="100" class="helpline" value="{L_STYLES_TIP}" /></td>
|
<td><input type="text" name="helpbox" style="width:100%" maxlength="100" class="helpline" value="{L_STYLES_TIP}" /></td>
|
||||||
<td class="genmed" align="center">{L_FONT_COLOR}</td>
|
<td class="genmed" align="center">{L_FONT_COLOR}</td>
|
||||||
|
@ -274,9 +283,6 @@ function checkForm()
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="row1" valign="top"><b class="genmed">{L_OPTIONS}:</b><br /><table cellspacing="2" cellpadding="0" border="0">
|
<td class="row1" valign="top"><b class="genmed">{L_OPTIONS}:</b><br /><table cellspacing="2" cellpadding="0" border="0">
|
||||||
<tr>
|
|
||||||
<td class="gensmall">{HTML_STATUS}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="gensmall">{BBCODE_STATUS}</td>
|
<td class="gensmall">{BBCODE_STATUS}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -291,13 +297,6 @@ function checkForm()
|
||||||
</tr>
|
</tr>
|
||||||
</table></td>
|
</table></td>
|
||||||
<td class="row2"><table cellpadding="1">
|
<td class="row2"><table cellpadding="1">
|
||||||
<!-- IF S_HTML_ALLOWED -->
|
|
||||||
<tr>
|
|
||||||
<td><input type="checkbox" name="disable_html"{S_HTML_CHECKED} class="radio" /></td>
|
|
||||||
<td class="gen">{L_DISABLE_HTML}</td>
|
|
||||||
</tr>
|
|
||||||
<!-- ENDIF -->
|
|
||||||
|
|
||||||
<!-- IF S_BBCODE_ALLOWED -->
|
<!-- IF S_BBCODE_ALLOWED -->
|
||||||
<tr>
|
<tr>
|
||||||
<td><input type="checkbox" name="disable_bbcode"{S_BBCODE_CHECKED} class="radio" /></td>
|
<td><input type="checkbox" name="disable_bbcode"{S_BBCODE_CHECKED} class="radio" /></td>
|
||||||
|
|
|
@ -15,10 +15,6 @@
|
||||||
<td class="row1" width="50%"><b class="genmed">{L_DEFAULT_BBCODE}:</b></td>
|
<td class="row1" width="50%"><b class="genmed">{L_DEFAULT_BBCODE}:</b></td>
|
||||||
<td class="row2"><input type="radio" name="bbcode" value="1"{DEFAULT_BBCODE_YES} /><span class="gen">{L_YES}</span> <input type="radio" name="bbcode" value="0"{DEFAULT_BBCODE_NO} /><span class="gen">{L_NO}</span></td>
|
<td class="row2"><input type="radio" name="bbcode" value="1"{DEFAULT_BBCODE_YES} /><span class="gen">{L_YES}</span> <input type="radio" name="bbcode" value="0"{DEFAULT_BBCODE_NO} /><span class="gen">{L_NO}</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td class="row1" width="50%"><b class="genmed">{L_DEFAULT_HTML}:</b></td>
|
|
||||||
<td class="row2"><input type="radio" name="html" value="1"{DEFAULT_HTML_YES} /><span class="gen">{L_YES}</span> <input type="radio" name="html" value="0"{DEFAULT_HTML_NO} /><span class="gen">{L_NO}</span></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="row1" width="50%"><b class="genmed">{L_DEFAULT_SMILIES}:</b></td>
|
<td class="row1" width="50%"><b class="genmed">{L_DEFAULT_SMILIES}:</b></td>
|
||||||
<td class="row2"><input type="radio" name="smilies" value="1"{DEFAULT_SMILIES_YES} /><span class="gen">{L_YES}</span> <input type="radio" name="smilies" value="0"{DEFAULT_SMILIES_NO} /><span class="gen">{L_NO}</span></td>
|
<td class="row2"><input type="radio" name="smilies" value="1"{DEFAULT_SMILIES_YES} /><span class="gen">{L_YES}</span> <input type="radio" name="smilies" value="0"{DEFAULT_SMILIES_NO} /><span class="gen">{L_NO}</span></td>
|
||||||
|
|
|
@ -100,9 +100,6 @@ function marklist(form_name, status)
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="row1" valign="top"><b class="genmed">{L_OPTIONS}</b><br /><table cellspacing="2" cellpadding="0" border="0">
|
<td class="row1" valign="top"><b class="genmed">{L_OPTIONS}</b><br /><table cellspacing="2" cellpadding="0" border="0">
|
||||||
<tr>
|
|
||||||
<td class="gensmall">{HTML_STATUS}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="gensmall">{BBCODE_STATUS}</td>
|
<td class="gensmall">{BBCODE_STATUS}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -117,12 +114,6 @@ function marklist(form_name, status)
|
||||||
</tr>
|
</tr>
|
||||||
</table></td>
|
</table></td>
|
||||||
<td class="row2" valign="top"><table cellspacing="0" cellpadding="1" border="0">
|
<td class="row2" valign="top"><table cellspacing="0" cellpadding="1" border="0">
|
||||||
<!-- IF S_HTML_ALLOWED -->
|
|
||||||
<tr>
|
|
||||||
<td><input type="checkbox" name="disable_html"{S_HTML_CHECKED} /></td>
|
|
||||||
<td class="gen">{L_DISABLE_HTML}</td>
|
|
||||||
</tr>
|
|
||||||
<!-- ENDIF -->
|
|
||||||
<!-- IF S_BBCODE_ALLOWED -->
|
<!-- IF S_BBCODE_ALLOWED -->
|
||||||
<tr>
|
<tr>
|
||||||
<td><input type="checkbox" name="disable_bbcode"{S_BBCODE_CHECKED} /></td>
|
<td><input type="checkbox" name="disable_bbcode"{S_BBCODE_CHECKED} /></td>
|
||||||
|
|
|
@ -818,7 +818,6 @@ while ($row = $db->sql_fetchrow($result))
|
||||||
'post_encoding' => $row['post_encoding'],
|
'post_encoding' => $row['post_encoding'],
|
||||||
'bbcode_uid' => $row['bbcode_uid'],
|
'bbcode_uid' => $row['bbcode_uid'],
|
||||||
'bbcode_bitfield' => $row['bbcode_bitfield'],
|
'bbcode_bitfield' => $row['bbcode_bitfield'],
|
||||||
'enable_html' => $row['enable_html'],
|
|
||||||
'enable_smilies' => $row['enable_smilies'],
|
'enable_smilies' => $row['enable_smilies'],
|
||||||
'enable_sig' => $row['enable_sig'],
|
'enable_sig' => $row['enable_sig'],
|
||||||
'friend' => $row['friend'],
|
'friend' => $row['friend'],
|
||||||
|
@ -1139,12 +1138,6 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
|
||||||
// Parse the message and subject
|
// Parse the message and subject
|
||||||
$message = $row['post_text'];
|
$message = $row['post_text'];
|
||||||
|
|
||||||
// If the board has HTML off but the post has HTML on then we process it, else leave it alone
|
|
||||||
if (!$auth->acl_get('f_html', $forum_id) && $row['enable_html'])
|
|
||||||
{
|
|
||||||
$message = preg_replace('#(<!\-\- h \-\-><)([\/]?.*?)(><!\-\- h \-\->)#is', "<\\2>", $message);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Second parse bbcode here
|
// Second parse bbcode here
|
||||||
if ($row['bbcode_bitfield'])
|
if ($row['bbcode_bitfield'])
|
||||||
{
|
{
|
||||||
|
@ -1171,12 +1164,6 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
|
||||||
$message = preg_replace('#(?!<.*)(?<!\w)(' . $highlight_match . ')(?!\w|[^<>]*>)#i', '<span class="posthilit">\1</span>', $message);
|
$message = preg_replace('#(?!<.*)(?<!\w)(' . $highlight_match . ')(?!\w|[^<>]*>)#i', '<span class="posthilit">\1</span>', $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($row['enable_html'] && $auth->acl_get('f_html', $forum_id))
|
|
||||||
{
|
|
||||||
// Remove Comments from post content
|
|
||||||
$message = preg_replace('#<!\-\-(.*?)\-\->#is', '', $message);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Replace naughty words such as farty pants
|
// Replace naughty words such as farty pants
|
||||||
$row['post_subject'] = censor_text($row['post_subject']);
|
$row['post_subject'] = censor_text($row['post_subject']);
|
||||||
$message = str_replace("\n", '<br />', censor_text($message));
|
$message = str_replace("\n", '<br />', censor_text($message));
|
||||||
|
|
Loading…
Add table
Reference in a new issue