在Discuz! 中给通过WAP帖子加标记-网络应用

王朝数码·作者佚名  2009-12-09
宽屏版  字体: |||超大  

Discuz!是康盛创想(Comsenz)公司推出的一款论坛BBS产品,本期教程笔者为大家讲解在Discuz! 7.1下如何给通过WAP发布的帖子加标记。

如果回复或者主题是通过wap发布的,则在帖子信息中显示出来 “该信息来自手机”。

效果图:

ITION: absolute; TOP: 438px"

一、修改数据库结构

在 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 文件

找到

{lang guest} {$pluginhooks[viewthread_postheader][$postcount]}{lang poston} $post[dateline]

在此段程序之后添加:

该信息来自手机

保存,更新缓存。

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
© 2005- 王朝网络 版权所有