找回密码
 注册
查看: 2329|回复: 0
收起左侧

手机发帖帖子内显示标识

[复制链接]

5314

主题

8320

帖子

1万

积分

管理员

出售国内外虚拟空间

Rank: 10Rank: 10Rank: 10

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

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

发表于 2009-4-28 12:57:57 | 显示全部楼层 |阅读模式
1.jpg 手动修改方法: 1、修改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, p_w_upload)
  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, p_w_upload, wappost)
  2. VALUES ($fid, $tid, 1, $discuz_user, $discuz_uid, $subject, $timestamp, $message, $onlineip, $pinvisible, 0, 0, 0, 0, 0, 0, 1)");
复制代码
再找到:
  1. $pinvisible = $modnewreplies ? -2 : 0;
  2. $db->query("INSERT INTO {$tablepre}posts (fid, tid, first, author, authorid, dateline, message, useip, invisible, usesig, htmlon, bbcodeoff, smileyoff, parseurloff, p_w_upload)
  3. VALUES ($fid, $tid, 0, $discuz_user, $discuz_uid, $timestamp, $message, $onlineip, $pinvisible, 1, 0, 0, 0, 0, 0)");
复制代码
改为:
  1. $pinvisible = $modnewreplies ? -2 : 0;
  2. $db->query("INSERT INTO {$tablepre}posts (fid, tid, first, author, authorid, dateline, message, useip, invisible, usesig, htmlon, bbcodeoff, smileyoff, parseurloff, p_w_upload, wappost)
  3. VALUES ($fid, $tid, 0, $discuz_user, $discuz_uid, $timestamp, $message, $onlineip, $pinvisible, 1, 0, 0, 0, 0, 0, 1)");
复制代码
可以看出都是在数据库查询后加了点东西,当然,我们在最后一步还要升级数据库哦! 2、修改templates/default/下的viewthread_node.htm文件,这个文件是DZ7新加的,原来版本貌似没有。 找到
  1. <!--{if $post[signature] && ($bannedmessages & 4 && (($post[authorid] && !$post[username]) || ($post[groupid] == 4 || $post[groupid] == 5) || ($post[status] & 1)))}-->
复制代码
在上面加入
  1. <!--{if $post[wappost] == 1}-->
  2. <div class="wappost" style="maxHeightIE: {$maxsigrows}px;overflow: hidden; margin: 10px; padding-top: 20px; color: {TEXT};">
  3. <img src="http://www.lanyudongli.com/p_w_picpath/mobile.gif" />本消息发自于手机,使用注册帐号登录wap.lanyudongli.com即可用手机发帖!
  4. </div>
  5. <!--{/if}-->
复制代码
其中的图片地址要换成自己的哦(因为我的网站是防盗链的),当然,如果不想要图片的话,也可以去掉http://www.ojlanyudongli.com/p_w_picpath/mobile.gif\" />。 3、升级数据库: 在数据库中执行如下代码(如果原来装过这个插件的就可以跳过这个步骤了):
  1. ALTER TABLE `cdb_posts` ADD `wappost` INT NOT NULL DEFAULT 0;
  2. 注意要把cdb_改成自己的表名前缀哦。
复制代码

手机发帖.rar

11 KB, 下载次数: 0, 下载积分: 体力 -1 点

出售国内或美国高性能虚拟空间,高速VPS以及服务器! 同时承接各种类型的网站制作,网站维护,支付宝交易安全放心!    联系QQ:6102031
懒得打字嘛,点击右侧快捷回复
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

GMT+8, 2024-5-19 23:02 , Processed in 0.125000 second(s), 28 queries , Gzip On.

© 2006-2022 Powered by Discuz! X3.4

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