昨天為一論壇加入nfo2pic功能,做了個for VBB 3.0.3的hacker,壓縮包內包含附帶四種字體可供選項,具體效果可檢視
http://0day.ugia.net/program/nfo2pic
下面是安裝步驟
NFO2PIC for VBB3
安裝步驟:
step1: 下載附件,解壓到includes目錄下
step2: attachment.php 第167行,也可尋找header('快取-control: max-age=31536000');在其前插入:
PHP程式碼:
if ($extension == "nfo" && !$_GET['mode'])
{
require_once('./includes/functions_nfo2pic.php');
nfo2pic($attachmentinfo['filedata'],$attachmentinfo['filename']);
exit;
}
step3: includes/functions_showthread.php 搜尋
PHP程式碼:
$show['moderatedattachment'] = $show['thumbnailattachment'] = $show['otherattachment'] = false;
$show['imageattachment'] = $show['imageattachmentlink'] = false;
[b]在其後插入
PHP程式碼:
$show['nfopic'] = false;
step4: includes/functions_showthread.php第244行,也可尋找
PHP程式碼:
eval('$post[\'otherattachments\'] .= "' . fetch_template('postbit_attachment') . '";');
$show['otherattachment'] = true;
在其前插入:
PHP程式碼:
case 'nfo':
eval('$post[\'nfoattachments\'] .= "' . fetch_template('postbit_attachmentnfo') . '";');
$show['nfopic'] = true;
break;
step5: 進入後台管理-〉選項模版管理-〉找到postbit(如果您的論壇帖子顯示樣式是左右結構,請選項postbit_legacy模版)模版,搜尋<if condition="$show['imageattachment']">,在其前插入:
PHP程式碼:
<!-- NFO2PIC -->
<if condition="$show['nfopic']">
<fieldset class="fieldset">
<legend>NFO FILE</legend>
<div style="padding:$stylevar[formspacer]px">
$post[nfoattachments]
</div>
</fieldset>
</if>
<!-- END NFO2PIC -->
step6: 增加新模版,名稱postbit_attachmentnfo,內容:
PHP程式碼:
<a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&stc=1&mode=download">下載此nfo</a>
<br />
<img class="attach" src="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&stc=1" border="0" alt="" />
<br />
have fun!