互联网 频道

从雷傲论坛转换到Discuz!论坛

    升级数据库,执行:
SELECT MAX(tid)
FROM cdb_threads;
    请在./include/discuzcode.func.php中找到
for($i = 0; $i <= $discuzcodes['pcodecount']; $i++) {
                $message = str_replace("[\tDISCUZ_CODE_$i\t]", $discuzcodes['codehtml'][$i], $message);
        }
    上面加

//LB转换数据后专用 $tid是你主题的最大id
        global $fid,$tid;
        if ($tid < 11253) {
                $lbfilepath = './attachments/lbupfile/';
                $message = preg_replace(array(
                                "/\[UploadFile=([^\[]+?)\.(gif|jpg|png|bmp|jpeg)\]/ies",
                                "/\[UploadFile=(.*)\]/ies"),
                                array(
                                "bbcodeurl('\\1', '<center><img src=\"".$lbfilepath.$fid."/\\1.\\2\" border=\"0\"

onload=\"if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=\'Click here to open new

window\';}\" onmouseover=\"if(this.resized) this.style.cursor=\'hand\';\" onclick=\"if(this.resized) {window.open(\'%s\');}

\"></center><br>')",
                                "bbcodeurl('\\1', '【<a href=\"".$lbfilepath.$fid."/\\1\" target=\"_blank\"

style=\"color:#0000FF;font-weight:bold\">点击下载文件</a>】')"),
                                $message);
        }
        unset($fid,$tid,$lbfilepath);
        //LB转换数据后专用

    四、完成转换工作

    注意:删除转换程序lb32discuz41.php

 中关于“编程开发”的问题及解答>>>

0
相关文章