|
手动修改方法:
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[signature] && ($bannedmessages & 4 && (($post[authorid] && !$post[username]) || ($post[groupid] == 4 || $post[groupid] == 5) || ($post[status] & 1)))}-->
复制代码
在上面加入 -
- <!--{if $post[wappost] == 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}-->
复制代码
其中的图片地址要换成自己的哦(因为我的网站是防盗链的),当然,如果不想要图片的话,也可以去掉http://www.ojlanyudongli.com/p_w_picpath/mobile.gif\" />。
3、升级数据库:
在数据库中执行如下代码(如果原来装过这个插件的就可以跳过这个步骤了): -
- ALTER TABLE `cdb_posts` ADD `wappost` INT NOT NULL DEFAULT 0;
- 注意要把cdb_改成自己的表名前缀哦。
复制代码 |
|