史萊姆論壇

返回   史萊姆論壇 > 專業主討論區 > 論壇程式討論區
忘記密碼?
論壇說明

歡迎您來到『史萊姆論壇』 ^___^

您目前正以訪客的身份瀏覽本論壇,訪客所擁有的權限將受到限制,您可以瀏覽本論壇大部份的版區與文章,但您將無法參與任何討論或是使用私人訊息與其他會員交流。若您希望擁有完整的使用權限,請註冊成為我們的一份子,註冊的程序十分簡單、快速,而且最重要的是--註冊是完全免費的!

請點擊這裡:『註冊成為我們的一份子!』

Google 提供的廣告


 
 
主題工具 顯示模式
舊 2005-06-21, 03:17 PM   #3 (permalink)
長老會員
 
貝斯特 的頭像
榮譽勳章
UID - 90669
在線等級: 級別:1 | 在線時長:11小時 | 升級還需:1小時
註冊日期: 2003-08-06
住址: The Gates of Hell
文章: 1758
現金: 15064 金幣
資產: 5185909 金幣
預設

搜尋:
$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'));
}
貝斯特 目前離線  
送花文章: 1, 收花文章: 38 篇, 收花: 123 次
回覆時引用此帖
 



發表規則
不可以發文
不可以回覆主題
不可以上傳附加檔案
不可以編輯您的文章

論壇啟用 BB 語法
論壇啟用 表情符號
論壇啟用 [IMG] 語法
論壇禁用 HTML 語法
Trackbacks are 禁用
Pingbacks are 禁用
Refbacks are 禁用


所有時間均為台北時間。現在的時間是 10:19 AM


Powered by vBulletin® 版本 3.6.8
版權所有 ©2000 - 2025, Jelsoft Enterprises Ltd.


SEO by vBSEO 3.6.1