搜索
查看: 11460|回复: 1
打印 上一主题 下一主题

手机发帖显示标识 For7.0

[复制链接]

3192

主题

1

好友

-76

积分

Administrator

Rank: 9Rank: 9Rank: 9

贡献
891
金钱
51631
积分
-76
帖子
34437
跳转到指定楼层
1楼
admin 发表于 2009-4-19 18:11 |只看该作者 |倒序浏览
演示如本论坛

Note: 如果全新安装本插件,需要改动数据库,请备份后再做改动!!!!

手动修改方法:

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, 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, 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, attachment)
  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, attachment, 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.ojpal.com/images/mobile.gif" />本消息发自于手机,使用注册帐号登录wap.ojpal.com即可用手机发帖!
  4.         </div>
  5.         <!--{/if}-->
复制代码

其中的图片地址要换成自己的哦

3、升级数据库:
在数据库中执行如下代码(如果原来装过这个插件的就可以跳过这个步骤了):
ALTER TABLE `cdb_posts` ADD `wappost` INT NOT NULL DEFAULT '0';
注意要把cdb_改成自己的表名前缀哦。
如果不想手动改的话,可以下载下面附件上传覆盖升级数据库即可.


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?Register

3192

主题

1

好友

-76

积分

Administrator

Rank: 9Rank: 9Rank: 9

贡献
891
金钱
51631
积分
-76
帖子
34437
2楼
admin 发表于 2009-4-19 23:53 |只看该作者
手机访问本论坛可以在你的手机wap浏览器里输入 naale.biz/wap (  无图版;发帖带手机标识)

如果你使用UCWEB浏览器 则可以输入wap.naale.biz(完整访问含有图片;发帖无手机标识){:4_99:}
回复

使用道具 举报

 懒得打字嘛,点击右侧快捷回复【左侧自定义内容】  【右侧自定义内容】
您需要登录后才可以回帖 登录 | Register

Mobile|Archiver|Naale Community

GMT+8, 2024-4-20 07:51 , Processed in 0.019258 second(s), 13 queries , Apc On.

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部