找回密码
 注册
查看: 2836|回复: 1
收起左侧

[分享] DZ论坛通过手机WAP发布的帖子加上标记的小美化

[复制链接]

5312

主题

8317

帖子

1万

积分

管理员

出售国内外虚拟空间

Rank: 10Rank: 10Rank: 10

积分
14660
帖子
8317
精华
67
体力
14660 点
蓝豆
2391 点
注册时间
2007-6-8

终身成就奖LY官方团队会员身份ID卡

发表于 2010-4-1 15:15:57 | 显示全部楼层 |阅读模式
09101911471ab2bf0212846d1d.jpg
一、修改数据库结构
Discuz 后台 => 数据库 => 升级,提交如下SQL:
  1. ALTER TABLE `cdb_posts` ADD `onmobile` TINYINT( 1 ) NOT NULL
复制代码
二、修改WAP程序
打开论坛根目录下 \wap\include\post.inc.php 文件
找到
  1.                 $db->query("INSERT INTO {$tablepre}posts (fid, tid, first, author, authorid, subject, dateline, message, useip, invisible, usesig, htmlon, bbcodeoff, smileyoff, parseurloff, attachment)
  2.                         VALUES ('$fid', '$tid', '1', '$discuz_user', '$discuz_uid', '$subject', '$timestamp', '$message', '$onlineip', '$pinvisible', '0', '0', '0', '0', '0', '0')");
复制代码
修改为:
  1.                 $db->query("INSERT INTO {$tablepre}posts (fid, tid, first, author, authorid, subject, dateline, message, useip, invisible, usesig, htmlon, bbcodeoff, smileyoff, parseurloff, attachment,onmobile)
  2.                         VALUES ('$fid', '$tid', '1', '$discuz_user', '$discuz_uid', '$subject', '$timestamp', '$message', '$onlineip', '$pinvisible', '0', '0', '0', '0', '0', '0','1')");
复制代码
找到
  1.                 $db->query("INSERT INTO {$tablepre}posts (fid, tid, first, author, authorid, dateline, message, useip, invisible, usesig, htmlon, bbcodeoff, smileyoff, parseurloff, attachment)
  2.                                 VALUES ('$fid', '$tid', '0', '$discuz_user', '$discuz_uid', '$timestamp', '$message', '$onlineip', '$pinvisible', '1', '0', '0', '0', '0', '0')");
复制代码
修改为:
  1.                 $db->query("INSERT INTO {$tablepre}posts (fid, tid, first, author, authorid, dateline, message, useip, invisible, usesig, htmlon, bbcodeoff, smileyoff, parseurloff, attachment,onmobile)
  2.                                 VALUES ('$fid', '$tid', '0', '$discuz_user', '$discuz_uid', '$timestamp', '$message', '$onlineip', '$pinvisible', '1', '0', '0', '0', '0', '0','1')");
复制代码
保存。

三、修改模板
打开论坛目录下 \templates\default\viewthread_node.htm 文件
找到
  1.                                 <!--{elseif !$post['authorid'] && !$post['username']}-->
  2.                                         {lang guest} {$pluginhooks[viewthread_postheader][$postcount]}<em id="authorposton$post[pid]">{lang poston} $post[dateline]</em>
  3.                                 <!--{/if}-->
复制代码
在此段程序之后添加:
游客,如果您要查看本帖隐藏内容请回复
出售国内或美国高性能虚拟空间,高速VPS以及服务器! 同时承接各种类型的网站制作,网站维护,支付宝交易安全放心!    联系QQ:6102031
懒得打字嘛,点击右侧快捷回复
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

网站公告上一条 /2 下一条

GMT+8, 2024-4-24 02:09 , Processed in 0.109375 second(s), 28 queries , Gzip On.

© 2006-2022 Powered by Discuz! X3.4

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