查看單個文章
舊 2005-06-21, 03:54 PM   #6 (permalink)
貝斯特 帥哥
長老會員
 
貝斯特 的頭像
榮譽勳章
UID - 90669
在線等級: 級別:1 | 在線時長:11小時 | 升級還需:1小時
註冊日期: 2003-08-06
住址: The Gates of Hell
文章: 1758
現金: 15064 金幣
資產: 5185909 金幣
預設

#######################################################################
#
# 編輯 ./profile.php:
#######################################################################

在這之後:


if ($_POST['do'] == 'updatesignature')
{
globalize($_POST, array('WYSIWYG_HTML', 'message' => STR, 'preview'));

加上:


// Multiple Signatures Hack by Ethan -- Start of Code Block

$signatureid = intval($_POST['signatureid']);
if ($signatureid < 1) $signatureid = 1;

$signaturetitle = htmlspecialchars_uni(trim($_POST['signaturetitle']));
if ($signaturetitle == '') $signaturetitle = "$vbphrase[signature] $signatureid";

// Multiple Signatures Hack by Ethan -- End of Code Block


#####
修改:

else
{
$DB_site->query("
UPDATE " . TABLE_PREFIX . "usertextfield
SET signature = '" . addslashes($signature) . "'
WHERE userid = $bbuserinfo[userid]
");

為:

else {

// Multiple Signatures Hack by Ethan -- Start of Code Block
$DB_site->query("
UPDATE " . TABLE_PREFIX . "usertextfield
SET signature" . $signatureid . " = '" . addslashes($signature) . "' ,
sig_title" . $signatureid . " = '" . addslashes(htmlspecialchars_uni($signaturetitle)) . "'
WHERE userid = $bbuserinfo[userid]
");

$lastsignatureid = $signatureid;

// if user removed a signature, set the last edited signature to the first available signature
if ($signature == '') {
$lastsignatureid = 0;

for ($i = 1; $lastsignatureid == 0 AND $i <= N; ++$i) {
if ($signatureid != $i AND $bbuserinfo["signature$i"] != '') {
$signature = $bbuserinfo["signature$i"];
$lastsignatureid = $i;
}
}

}

$DB_site->query("
UPDATE " . TABLE_PREFIX . "userfield
SET lastsignatureid = $lastsignatureid
WHERE userid = $bbuserinfo[userid]
");

// Multiple Signatures Hack by Ethan -- End of Code Block

$DB_site->query("
UPDATE " . TABLE_PREFIX . "usertextfield
SET signature = '" . addslashes($signature) . "'
WHERE userid = $bbuserinfo[userid]
");

######
在這之後:

$smilieson = iif($vboptions['allowsmilies'], $vbphrase['on'], $vbphrase['off']);

加上:

// Multiple Signatures Hack by Ethan -- Start of Code Block

$signatureid = intval($_POST['signatureid']);
if ($signatureid < 1) $signatureid = $bbuserinfo['lastsignatureid'];
if ($signatureid < 1) $signatureid = 1;

$signaturetitle = htmlspecialchars_uni(trim($_POST['signaturetitle']));
if ($signaturetitle == '') $signaturetitle = "$vbphrase[signature] $signatureid";

// Multiple Signatures Hack by Ethan -- End of Code Block

#######
修改:

if (!isset($preview))
{
$signature = $bbuserinfo['signature'];
}

為:

if (!isset($preview))
{
$signature = $bbuserinfo['signature'];

// Multiple Signatures Hack by Ethan -- Start of Code Block

$signature = $bbuserinfo['signature' . $signatureid];
$signaturetitle = $bbuserinfo['sig_title' . $signatureid];

unset($_POST['WYSIWYG_HTML']);

// Multiple Signatures Hack by Ethan -- End of Code Block
}

#######################################################################
#
# 編輯 ./includes/functions_showthread.php:
#######################################################################

修改:

// get signature
if ($post['showsignature'] AND $vboptions['allowsignatures'] AND trim($post['signature']) != '' AND (!$bbuserinfo['userid'] OR $bbuserinfo['showsignatures']) AND $sigperms[$post['userid']])
{
if (!isset($sigcache["$post[userid]"]))
{
$parsed_postcache['skip'] = true;
$post['signature'] = parse_bbcode($post['signature'], 'nonforum', $vboptions['allowsmilies']);
$sigcache["$post[userid]"] = $post['signature'];
}
else
{
$post['signature'] = $sigcache["$post[userid]"];
}
}

為:

// Multiple Signatures Hack by Ethan -- Start of Code Block

// choose a random signature
if ($post['showsignature'] == 127) {
$sigtries = N;
$post['showsignature'] = rand(1, N);
while (($post['signature' . $post['showsignature']] == '') AND ($sigtries> 0)) {
$post['showsignature'] = ($post['showsignature'] % N) + 1;
--$sigtries;
}
if ($sigtries == 0) $post['showsignature'] = 0;
}

$post['signature'] = $post['signature' . $post['showsignature']];

// Multiple Signatures Hack by Ethan -- End of Code Block


// get signature
if ($post['showsignature'] AND $vboptions['allowsignatures'] AND trim($post['signature']) != '' AND (!$bbuserinfo['userid'] OR $bbuserinfo['showsignatures']) AND $sigperms[$post['userid']])
{
// Modified by Multiple Signature Hack, to uninstall change $sigcache["$post[userid]_$post[showsignature]"] to $sigcache["$post[userid]"]
if (!isset($sigcache["$post[userid]_$post[showsignature]"]))
{
$parsed_postcache['skip'] = true;
$post['signature'] = parse_bbcode($post['signature' . $post[showsignature], 'nonforum', $vboptions['allowsmilies']);

// Modified by Multiple Signature Hack, to uninstall change $sigcache["$post[userid]_$post[showsignature]"] to $sigcache["$post[userid]"]
$sigcache["$post[userid]_$post[showsignature]"] = $post['signature'];
}
else
{
// Modified by Multiple Signature Hack, to uninstall change $sigcache["$post[userid]_$post[showsignature]"] to $sigcache["$post[userid]"]
$post['signature'] = $sigcache["$post[userid]_$post[showsignature]"];
}
}

#######################################################################
#
# 安裝完成!
#######################################################################
#
# 你可能希望編輯短語 'show_your_signature' 來符合您所需的
# 相關選擇簽名標題.
#######################################################################
__________________

給自己看也給所有需要這些話鼓勵的人看!

認真不一定會得到美好的結果,但是不認真就一定沒有

想要有什麼結果,就秉持你的雙手
放手去做
總比什麼都沒付出最後失敗了才嘆氣來的好吧
沒努力的人.沒有資格說放棄
努力過的人.更要有勇氣繼續努力下去
貝斯特 目前離線  
送花文章: 1, 收花文章: 38 篇, 收花: 123 次
回覆時引用此帖