長老會員
|
搜尋:
$stickychecked = iif($threadinfo['sticky'], HTML_CHECKED);
在後面添加:
$show['globalstickunstick'] = iif(can_moderate($threadinfo['forumid'], 'canglobalstick'), true, false);
$globalstickychecked = iif($threadinfo['globalsticky'], HTML_CHECKED);
搜尋:
'visible' => STR,
'open' => STR,
'sticky' => STR,
在後面添加:
'globalsticky' => STR,
搜尋:
$sticky = iif($sticky == 'yes', 1, 0);
在後面添加:
$globalsticky = iif($globalsticky == 'yes', 1, 0);
搜尋:
$DB_site->query("
UPDATE " . TABLE_PREFIX . "thread SET
visible = $visible,
open = $open,
sticky = $sticky ,
title = '" . addslashes(htmlspecialchars_uni($title)) . "',
iconid = $iconid,
notes = '" . addslashes($notes) . "'
$similarthreads
WHERE threadid = $threadid
");
替換為:
$DB_site->query("
UPDATE " . TABLE_PREFIX . "thread SET
visible = $visible,
open = $open,
sticky = $sticky ,
globalsticky = $globalsticky ,
title = '" . addslashes(htmlspecialchars_uni($title)) . "',
iconid = $iconid,
notes = '" . addslashes($notes) . "'
$similarthreads
WHERE threadid = $threadid
");
$globalstickyids = $datastore['globalstickyids'];
if ($globalsticky)
{
$globalstickyids .= ','.$threadid;
}
else
{
$patterns[0] = "/,$threadid,/";
$patterns[1] = "/,$threadid$/";
$replacements[0] = ",";
$replacements[1] = "";
$globalstickyids = preg_replace($patterns, $replacements, $globalstickyids);
}
build_datastore('globalstickyids', $globalstickyids);
搜尋:
$DB_site->query("UPDATE " . TABLE_PREFIX . "thread SET sticky = $threadinfo[sticky], notes = '" . addslashes($notes) . "' WHERE threadid = $threadid");
$_REQUEST['forceredirect'] = 1;
$url = "showthread.php?$session[sessionurl]t=$threadid";
eval(print_standard_redirect('redirect_sticky'));
}
在後面添加:
// ############################### start globalstick / globalunstick thread ###############################
if ($_POST['do'] == 'globalstick')
{
if (!$threadinfo['visible'] OR $threadinfo['isdeleted'])
{
eval(print_standard_error('error_invalidid'));
}
if (!can_moderate($threadinfo['forumid'], 'canglobalstick'))
{
print_no_permission();
}
$globalstickyids = $datastore['globalstickyids'];
if ($threadinfo['globalsticky'])
{
$patterns[0] = "/,$threadid,/";
$patterns[1] = "/,$threadid$/";
$replacements[0] = ",";
$replacements[1] = "";
$globalstickyids = preg_replace($patterns, $replacements, $globalstickyids);
$threadinfo['globalsticky'] = 0;
$notes = construct_phrase($vbphrase['thread_globalunstuck_by_x_on_y_at_z'], $bbuserinfo['username'], vbdate($vboptions['dateformat'], TIMENOW), vbdate($vboptions['timeformat'], TIMENOW));
$logaction = construct_phrase($vbphrase['globalunstuck_thread_x'], $threadinfo['title']);
$action = $vbphrase['globalunstuck'];
}
else
{
$globalstickyids .= ','.$threadid;
$threadinfo['globalsticky'] = 1;
$notes = construct_phrase($vbphrase['thread_globalstuck_by_x_on_y_at_z'], $bbuserinfo['username'], vbdate($vboptions['dateformat'], TIMENOW), vbdate($vboptions['timeformat'], TIMENOW));
$logaction = construct_phrase($vbphrase['globalstuck_thread_x'], $threadinfo['title']);
$action = $vbphrase['globalstuck'];
}
log_moderator_action($threadinfo, $logaction);
$notes .= ' ' . $threadinfo['notes'];
$DB_site->query("UPDATE " . TABLE_PREFIX . "thread SET globalsticky = $threadinfo[globalsticky], notes = '" . addslashes($notes) . "' WHERE threadid = $threadid");
build_datastore('globalstickyids', $globalstickyids);
$_REQUEST['forceredirect'] = 1;
$url = "showthread.php?$session[sessionurl]t=$threadid";
eval(print_standard_redirect('redirect_sticky'));
}
|