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

postbit
搜索:
<!-- message -->
<div>$post[message]</div>
<!-- / message -->
替換為:
<!-- message -->
<if condition="!$show['moderator']">
$moderator
<if condition="$show['costpost'] || $show['wealthpost'] || $show['replypost']">
<fieldset class="fieldset">
<legend>隱藏文章</legend>
<div style="padding: 3px;">
<if condition="$show['costpost']"><div>本帖為金錢出售文章,價格 $post[price] $vboptions[danwei] 。您需要購買後才可查看。[<a href="buypost.php?$session[sessionurl]p=$post[postid]">點擊這媮妎R</a>] [<a href="#" onclick="return buyerswindow('$post[postid]', 400, 200)">看誰購買</a>]</div></if>
<if condition="$show['wealthpost']"><div>本帖為財富限制,您的財富需要達到 $post[wealth] $vboptions[danwei] 才可查看。</div></if>
<if condition="$show['replypost']"><div>本主題需要回覆才可查看。</div></if>
</div>
</fieldset>
<else />
<if condition="$post['price'] || $post['wealth'] || $post['replypost']">
<fieldset class="fieldset">
<legend>隱藏文章訊息</legend>
<div style="padding: 3px;">
<if condition="$show['bought']"><div>您已經購買了該金錢文章 [<a href="#" onclick="return buyerswindow('$post[postid]', 400, 200)">看誰購買</a>]</div></if>
<if condition="$post['price'] && $show['selfpost']"><div>這是您發表的金錢限制,價格 $post[price] $vboptions[danwei] 。[<a href="#" onclick="return buyerswindow('$post[postid]', 400, 200)">看誰購買</a>]</div></if>
<if condition="$post['wealth'] && $show['selfpost']"><div>這是您發表的財富限制,其他會員財富需要達到 $post[wealth] $vboptions[danwei] 才可查看本篇。</div></if>
<if condition="$post['wealth'] && !$show['selfpost']"><div>本貼為財富限制。您的財富已經達到 $post[wealth] $vboptions[danwei],因此可以查看本篇。</div></if>
<if condition="$post['replypost'] && $show['replied']"><div>該主題需要回覆才可查看。您已經回覆。</div></if>
<if condition="$post['replypost'] && $show['selfpost']"><div>這是您發表的回覆限制,其他會員需要回覆才可查看本主題。</div></if>
</div>
</fieldset>
</if>
<div>$post[message]</div>
</if>
<else />
<if condition="$show['costpost'] || $show['wealthpost'] || $post['replypost']">
<fieldset class="fieldset">
<legend>版主、管理員注意</legend>
<div style="padding: 3px;">
<if condition="$post['price']"><div>該篇為金錢出售文章,價格為 $post[price] $vboptions[danwei] 。[<a href="#" onclick="return buyerswindow('$post[postid]', 400, 200)">看誰購買</a>]</div></if>
<if condition="$post['wealth']"><div>該篇為財富限制,財富大於 $post[wealth] $vboptions[danwei] 的會員才可查看。</div></if>
<if condition="$post['replypost']"><div>該主題回覆後才可查看</div></if>
</div>
</fieldset>
</if>
<div>$post[message]</div>
</if>
<!-- / message -->
檔修改
showpost.php
搜索:
// see if the lastpost time of this thread is older than the cache max age limit
if ($vboptions['cachemaxage'] == 0 OR TIMENOW - ($vboptions['cachemaxage'] * 60 * 60 * 24) > $threadinfo['lastpost'])
{
$stopsaveparsed = 1;
}
else
{
$stopsaveparsed = 0;
}
在後面添加:
// 007pig 隱藏帖不緩存
if ($post['price'] OR $post['wealth'] OR $post['replypost'])
{
$stopsaveparsed = 1;
}

搜索:
$post['money'] = $post['money'];
$post['moneyhole'] = intval($post['money']) + intval($post['bank']);
在後面添加:
$buyerarray = explode(",", $post['buyerids']);
$moderator = can_moderate($threadinfo['forumid']);
$show['selfpost'] = 0;
$show['costpost'] = 0;
$show['bought'] = 0;
$show['wealthpost'] = 0;
$show['replypost'] = 0;
$show['replied'] = 0;
if ($moderator) {
$show['moderator'] = 1;
}
if ($post['price'] > 0) {
if ($bbuserinfo['userid']==$post['userid']) {
$show['selfpost'] = 1;
$show['costpost'] = 0;
} elseif (in_array($bbuserinfo['userid'], $buyerarray) && $bbuserinfo['userid'] != 0) {
$show['bought'] = 1;
$show['costpost'] = 0;
} else {
$show['costpost'] = 1;
}
} else {
$show['costpost'] = 0;
$show['bought'] = 0;
}

if ($post['wealth'] > 0) {
$wealth = $bbuserinfo['money']+$bbuserinfo['bank'];
if ($bbuserinfo['userid']==$post['userid']) {
$show['wealthpost'] = 0;
$show['selfpost'] = 1;
} elseif ($wealth < $post['wealth']) {
$show['wealthpost'] = 1;
} else {
$show['wealthpost'] = 0;
}
} else {
$show['wealthpost'] = 0;
}

if ($post['replypost']) {
$replierids = $DB_site->query("SELECT userid FROM " . TABLE_PREFIX . "post WHERE threadid=$threadinfo[threadid] GROUP BY userid");
while ($replierid = $DB_site->fetch_array($replierids)) {
$replierarray[] = $replierid['userid'];
}

if ($bbuserinfo['userid']==$post['userid']) {
$show['replypost'] = 0;
$show['selfpost'] = 1;
} elseif (in_array($bbuserinfo['userid'], $replierarray)) {
$show['replypost'] = 0;
$show['replied'] = 1;
} else {
$show['replypost'] = 1;
}
}
showthread.php
搜索:
// see if the lastpost time of this thread is older than the cache max age limit
if ($vboptions['cachemaxage'] == 0 OR TIMENOW - ($vboptions['cachemaxage'] * 60 * 60 * 24) > $thread['lastpost'])
{
$stopsaveparsed = 1;
}
else
{
$stopsaveparsed = 0;
}
在後面添加:
// 007pig 隱藏帖不緩存
if ($post['price'] OR $post['wealth'] OR $post['replypost'])
{
$stopsaveparsed = 1;
}

搜索:
$post['musername'] = fetch_musername($post);
$post['islastshown'] = ($post['postid'] == $lastpostid);
$post['attachments'] = &$postattach["$post[postid]"];
// 帖子特殊內容顯示-非凡豬0108
// 007pig 修改開始
// 資產 $post['moneyhole']
$post['moneyhole'] = $post['money']+$post['bank'];
// 007pig 修改結束
在後面添加:
$buyerarray = explode(",", $post['buyerids']);
$moderator = can_moderate($threadinfo['forumid']);
$show['selfpost'] = 0;
$show['costpost'] = 0;
$show['bought'] = 0;
$show['wealthpost'] = 0;
$show['replypost'] = 0;
$show['replied'] = 0;
if ($moderator) {
$show['moderator'] = 1;
}
if ($post['price'] > 0) {
if ($bbuserinfo['userid']==$post['userid']) {
$show['selfpost'] = 1;
$show['costpost'] = 0;
} elseif (in_array($bbuserinfo['userid'], $buyerarray) && $bbuserinfo['userid'] != 0) {
$show['bought'] = 1;
$show['costpost'] = 0;
} else {
$show['costpost'] = 1;
}
} else {
$show['costpost'] = 0;
$show['bought'] = 0;
}

if ($post['wealth'] > 0) {
$wealth = $bbuserinfo['money']+$bbuserinfo['bank'];
if ($bbuserinfo['userid']==$post['userid']) {
$show['wealthpost'] = 0;
$show['selfpost'] = 1;
} elseif ($wealth < $post['wealth']) {
$show['wealthpost'] = 1;
} else {
$show['wealthpost'] = 0;
}
} else {
$show['wealthpost'] = 0;
}

if ($post['replypost']) {
$replierids = $DB_site->query("SELECT userid FROM " . TABLE_PREFIX . "post WHERE threadid=$threadinfo[threadid] GROUP BY userid");
while ($replierid = $DB_site->fetch_array($replierids)) {
$replierarray[] = $replierid['userid'];
}

if ($bbuserinfo['userid']==$post['userid']) {
$show['replypost'] = 0;
$show['selfpost'] = 1;
} elseif (in_array($bbuserinfo['userid'], $replierarray)) {
$show['replypost'] = 0;
$show['replied'] = 1;
} else {
$show['replypost'] = 1;
}
}
__________________

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

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

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