史萊姆論壇

史萊姆論壇 (http://forum.slime.com.tw/)
-   程式語言討論區 (http://forum.slime.com.tw/f76.html)
-   -   NFO2PIC for VBB3.0.3 (http://forum.slime.com.tw/thread131517.html)

psac 2004-10-30 09:55 PM

NFO2PIC for VBB3.0.3
 
昨天為一論壇加入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]&amp;stc=1&amp;mode=download">下載此nfo</a>

<br />

<img class="attach" src="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;stc=1" border="0" alt="" />&nbsp;

<br />




have fun!


所有時間均為台北時間。現在的時間是 09:47 AM

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

『服務條款』

* 有問題不知道該怎麼解決嗎?請聯絡本站的系統管理員 *


SEO by vBSEO 3.6.1