NFO2PIC for VBB3.x

关键字: nfo nfo2pic nfo2png vbb vbb3 hacker mod vbb插件 php php源码

NFO2PIC插件for VBB3.X, 压缩包中有四种字体可供选择,具体效果可查看: http://0day.ugia.net/program/nfo2pic

原创作品,转载请注明出处。

安装步骤:

step1: 下载附件,解压到includes目录下

step2: attachment.php 第167行,也可查找header(‘Cache-control: max-age=31536000′);在其前插入:

if ($extension == "nfo" && !$_GET['mode'])
{
    require_once(
'./includes/functions_nfo2pic.php');
    
nfo2pic($attachmentinfo['filedata'],$attachmentinfo['filename']);
    exit;

step3: includes/functions_showthread.php 搜索

$show['moderatedattachment'] = $show['thumbnailattachment'] = $show['otherattachment'] = false;
        
$show['imageattachment'] = $show['imageattachmentlink'] = false

在其后插入

$show['nfopic'] = false

step4: includes/functions_showthread.php第244行,也可查找

eval('$post['otherattachments'] .= "' fetch_template('postbit_attachment') . '";');
$show['otherattachment'] = true

在其前插入:

case 'nfo':
    eval(
'$post['nfoattachments'] .= "' fetch_template('postbit_attachmentnfo') . '";');
    
$show['nfopic'] = true;
    break; 

step5: 进入后台管理-〉选择模版管理-〉找到postbit(如果您的论坛帖子显示样式是左右结构,请选择postbit_legacy模版)模版,搜索<if condition="$show['imageattachment']">,在其前插入:

<!-- 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,内容:

<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!

legend
PASiOcn at msn dot com

附件: NFO2PIC4VBB3.rar

7 Comments »

  1. vdfv said,

    March 30, 2005 @ 2:13 pm

    fdbdfvdfvdfvdf

  2. T39 said,

    May 29, 2005 @ 9:23 pm

    非常感谢!
    按照文章修改了vbb3.0.7,能正常地显示nfo文件了。

    不过,发现修改之后,除图像类的附件外,诸如txt、rar、zip类的附件都被作为nfo文件处理了。

    本来应该在帖子下面的附件栏显示是zip文件的 如:http://mmtd.batcave.net/img/1.jpg
    修改之后变成这样了:http://mmtd.batcave.net/img/2.jpg

    恳请站长在忙中抽闲帮忙指点一下。

  3. legend said,

    June 10, 2005 @ 9:11 pm

    VBB3.0.7,将attachment.php中的:

    if ($extension == “nfo” && !$_GET['mode'])
    {
    require_once(‘./includes/functions_nfo2pic.php’);
    nfo2pic($attachmentinfo['filedata'],$attachmentinfo['filename']);
    exit;
    }

    换为

    if ($extension == “nfo” && !$_GET['mode'])
    {
    require_once(‘./includes/functions_nfo2pic.php’);
    nfo2pic(@file_get_contents($attachpath),$attachmentinfo['filename']);
    exit;
    }

  4. bank said,

    December 17, 2006 @ 6:35 pm

    Indonesian connote franked mistrust:bowman affluent genres deliberator redesign?

  5. hartford life insurance small business insurance said,

    December 21, 2006 @ 5:08 pm

    tapings!substance Abos Runnymede stilled:Macaulayan bluntness!

  6. directory said,

    December 22, 2006 @ 3:56 am

    costs scatter cleaning Sparta:Stravinsky propensity nary … Thanks!!!

  7. billboard pricing said,

    June 3, 2014 @ 8:54 pm

    This is really attention-grabbing, You are a very professional blogger.
    I’ve joined your rss feed and sit up for in the hunt
    for extra of your excellent post. Additionally, I’ve shared your site in my social networks

RSS feed for comments on this post

Leave a Comment