Discuz论坛

[color=Blue]discuz 7.0 修改======================[/color]
7.0的远程图片本地化
下载image.inc.rar此附件到include目录下,然后按如下修改。

1.post.php
查找:if($action == ‘newthread’) {
在上面添加:require_once DISCUZ_ROOT.’./include/image.inc.php’;

2.include\editpost.inc.php查找: db->query(“UPDATE {$tablepre}posts SET message=’$message’, usesig=’$usesig’, htmlon=’$htmlon’, bbcodeoff=’$bbcodeoff’, parseurloff=’$parseurloff’,
上面添加:
if($imagecopy){
$message=@Checkimg($message,$tid,$pid);
}

3.include\newreply.inc.php查找:if($modnewreplies) {

上面添加:if($imagecopy){
@Checkimg($message,$tid,$pid);
}

4.include\newthread.inc.php查找到:if($modnewthreads) {
上面添加: if($imagecopy){
@Checkimg($message,$tid,$pid);
}

5.修改模板post.htm

查找:


在正面添加(这里加了权限,只有版主以上者才显示,如果对所有用户开放,请去掉if代码。):


如果想自动,请这样

存在的问题,一定要看哟。

1、不能采集无后缀名的图片。
2、不能采集标有图片大小的图片。如[img=200,350],如果图片标有大小,请转到代码模式手动删除。改为[img]
3、一次采集20张,可以设,如果太多怕采集时间长了,会超时。

php插入数据sql
insert into cdb_threads(fid,iconid,typeid,author,authorid,subject,dateline,lastpost,lastposter)
values (
select
’11’,’65’,’0′,’菊开那夜’,tid,subject,dateline,dateline,’菊开那夜’
from old_threads
)

insert into cdb_posts(fid,tid,first,author,authorid,subject,dateline,message,useip,bbcodeoff,smileyoff)
values (‘”.$fid.”‘,'”.$rst[“iid”].”‘,’1′,’菊开那夜’,’1′,'”.$row[“doctitle”].”‘,'”.strtotime($row[“docposttime”]).”‘,'”.$row[“doccontent”].”‘,’127.0.0.1′,’-1′,’-1′)”;

SELECT fid,tid,’1′,’菊开那夜’,’1′,subject,dateline,”,’127.0.0.1′,’-1′,’-1′
FROM cdb_threads
WHERE tid NOT
IN (
SELECT tid
FROM cdb_posts
)

select * from old_posts where dateline in
(SELECT dateline
FROM cdb_threads
WHERE tid NOT
IN (
SELECT tid
FROM cdb_posts
)
LIMIT 0 , 30
)

[color=Blue]discuz 6.0 修改======================[/color]
footer.htm
只放计数器,在末尾之前

viewthread.htm
$post[ratings]下面
添加

?

去除会员的”删除本帖”功能
增加远程图片本地化版主才能使用
增加帖子google广告
post_editpost.htm
{lang post_delpost}{lang reward_price_back}

模板文件:templates/default/viewthread.htm
查找:
$post[subject]

替换成:
$post[subject]您是第{echo $thread[views]+1}个浏览者

美化贴子楼层
$post[number]
替换
【 楼 主 】 【 沙 发 】 【 板 凳 】 【 地 毯 】 【第 $post[‘number’] 楼】

==================2007.08.01新增================
增加远程图片保存
include/newreply.inc.php
include/newthread.inc.php
include/editpost.inc.php
add
if($imagecopy){$message=@Checkimg($message,$tid,$pid);}

post.php
add
require_once DISCUZ_ROOT.’./include/image.inc.php’;

templates/default/post_newthread.htm
templates/default/post_newreply.htm
templates/default/post_editpost.htm


远程图片保存本地

增加转贴工具
post_newthread.htm

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理

相关文章

开始在上面输入您的搜索词,然后按回车进行搜索。按ESC取消。

返回顶部