Discuz!官方免费开源建站系统

 找回密码
 立即注册
搜索

[经验] 致所有PW6转DZ6.1的站长!!!

[复制链接]
115300111 发表于 2008-6-9 22:32:16 | 显示全部楼层 |阅读模式
如果你帖子中的
[flash=450,390]http://www.56.com/n_v17_/c12_/4_/29...

没有转换成
[flash]http://www.56.com/n_v17_/c12_/4_/29...

那么下载附件,解压,上传到论坛根目录,访问它
自动开始替换直到出现“完毕”两个字,就是完成了。

flash.rar

453 Bytes, 下载次数: 372

回复

使用道具 举报

zadai 发表于 2008-6-10 05:50:41 | 显示全部楼层
<?php
require_once './include/common.inc.php';


$limit = 500;


$sql = "select pid,message from {$tablepre}posts where message like '%[flash=%]%' order by pid limit $limit ";

$sql = $db->query($sql);

while($row = $db->fetch_array($sql)){

        $pid = $row['pid'];
        $msg = $row['message'];
        //echo $msg."<br />\n";

        $msg2 = preg_replace('/\[flash=[0-9,]+?\]/i', '[flash]', $msg);

        $sql2 = "update {$tablepre}posts set message='$msg2' where pid=$pid limit 1 ";
        //echo $sql2."<hr />\n";
        $db->query($sql2);
}

if($db->querynum>$limit){
        echo '<script>reload()</script>';
}else{
        echo '完毕';
}


如果是[wmv=314,256,1]的的要这么转换呢
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-9-15 10:02 , Processed in 0.130512 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表