时间:2016-02-23 19:23 来源: 我爱IT技术网 作者:佚名
欢迎您访问我爱IT技术网,今天小编为你分享的电脑教程是建站经验系列之:【如何在Discuz 7.1中给通过WAP发布的帖子加标记】,下面是详细的分享!
如何在Discuz 7.1中给通过WAP发布的帖子加标记
一、修改数据库结构
在 Discuz 7.1 后台=> 数据库=> 升级,提交如下SQL:
ALTER TABLE `cdb_posts` ADD `onmobile` TINYINT( 1 ) NOT NULL
二、修改WAP程序
打开论坛根目录下 \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, attachment)
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, attachment,onmobile)
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, dateline, message, useip, invisible, usesig, htmlon, bbcodeoff, smileyoff, parseurloff, attachment)
VALUES ('$fid', '$tid', '0', '$discuz_user', '$discuz_uid', '$timestamp', '$message', '$onlineip', '$pinvisible', '1', '0', '0', '0', '0', '0')");
修改为:
$db->query("INSERT INTO {$tablepre}posts (fid, tid, first, author, authorid, dateline, message, useip, invisible, usesig, htmlon, bbcodeoff, smileyoff, parseurloff, attachment,onmobile)
VALUES ('$fid', '$tid', '0', '$discuz_user', '$discuz_uid', '$timestamp', '$message', '$onlineip', '$pinvisible', '1', '0', '0', '0', '0', '0','1')");
保存。
三、修改模板
打开论坛目录下 \templates\default\viewthread_node.htm 文件找到
<!--{elseif !$post['authorid'] && !$post['username']}-->
{lang guest} {$pluginhooks[viewthread_postheader][$postcount]}<em id="authorposton$post[pid]">{lang poston} $post[dateline]</em>
<!--{/if}-->
在此段程序之后添加:
<!--{if $post['onmobile']}-->
该信息来自手机
<!--{/if}-->
保存,更新缓存。
以上所分享的是关于如何在Discuz 7.1中给通过WAP发布的帖子加标记,下面是编辑为你推荐的有价值的用户互动:
相关问题:
答: >>详细
相关问题:
答: >>详细
相关问题:
答: >>详细
- 评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)
-
