keroro 2008-3-27 21:22
豬頭術 2.0 for Discuz! 6.0
豬頭術 2.0 for Discuz! 6.0名稱: 豬頭術 2.0 for Discuz! 6.0
適用: Discuz! 6.0.0
作者: HPotter
升級:Arice
美化:Arice
版本:2.0
1、解壓後, 目錄所有文件上傳到論壇的根目錄下
2、運行 http://您論壇訪問地址/pig_install.php 進行安裝,安裝完成將 pig_install.php 刪除
3、修改 viewthread.php
找到
$fieldsadd
在前面加
, mf.pighead
找到
if($showavatars) {
在下面加
global $timestamp;
if($post['pighead']) {//判斷是否有豬頭
@include DISCUZ_ROOT.'./forumdata/cache/plugin_pig.php';
if($_DPLUGIN['pig']['vars']['pig_status']) {
$post['pigheadarray'] = explode("\t", $post['pighead']);
$post['pigheadtype'] = $post['pigheadarray'][0];
$post['pigheadovertime'] = $post['pigheadarray'][1];
}
}
if($post['pigheadtype'] && $post['pigheadovertime'] > $timestamp + $_DCACHE['settings']['timeoffset'] * 3600) {//判斷是否顯示豬頭
$post['avatar'] = '<div class="avatar"><img src="./images/plugins/pig/'.$post['pigheadtype'].'.gif" width="100" height="160" border="0" alt="我是豬頭 被詛咒中.... 恢復時間:'.gmdate('Y-n-d H:i', $post['pigheadovertime']).'" />';
} else
4、修改 include/viewpro.inc.php
找到
$uid = $member['uid'];
在下面加
if($member['pighead']) {//增加豬頭顯示
@include DISCUZ_ROOT.'./forumdata/cache/plugin_pig.php';
if($_DPLUGIN['pig']['vars']['pig_status']) {
$member['pigheadarray'] = explode("\t", $member['pighead']);
$member['pigheadtype'] = $member['pigheadarray'][0];
$member['pigheadovertime'] = $member['pigheadarray'][1];
if($member['pigheadtype'] && $member['pigheadovertime'] > $timestamp + $_DCACHE['settings']['timeoffset'] * 3600) {
$member['avatar'] = './images/plugins/pig/'.$member['pigheadtype'].'.gif';
$member['avatarwidth'] = '100';
$member['avatarheight'] = '160';
}
}
}
[url=http://support.marlito.com/attachment.php?aid=1097][b][color=#006699]豬頭術2[1].0.rar[/color][/b][/url] (232.95 KB)
[img]http://www.discuz.net/attachments/month_0712/20071212_c55dd7102aaf7628d2e6Guct4cNGs76C.jpg.thumb.jpg[/img]