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