发布者认证信息(营业执照和身份证)未完善,请登录后完善信息登录
 终于找到如何在Discuz 7.1中给通过WAP发布的帖子加标记 - 三农网
Hi,你好,欢迎来到三农网
  • 产品
  • 求购
  • 公司
  • 展会
  • 招商
  • 资讯
当前位置: 首页 » 资讯 » 中国新农村 找商家、找信息优选VIP,安全更可靠!
终于找到如何在Discuz 7.1中给通过WAP发布的帖子加标记
发布日期:2023-03-31 07:13:34  浏览次数:5

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

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

  效果图: 

  一、修改数据库结构

  在 Discuz 后台 => 数据库 => 升级,提交如下SQL:

  ALTER TABLE `cdb_posts` ADD `onmobile` TINYINT( 1 ) NOT NULL

  二、修改WAP程序

  打开论坛根目录下 文件

  找到

  $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')");

  保存。

  三、修改模板

  打开论坛目录下 文件

  找到

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

  在此段程序之后添加:

  该信息来自手机

  保存,更新缓存。

VIP企业最新发布
全站最新发布
最新VIP企业
背景开启

三农网是一个开放的平台,信息全部为用户自行注册发布!并不代表本网赞同其观点或证实其内容的真实性,需用户自行承担信息的真实性,图片及其他资源的版权责任! 本站不承担此类作品侵权行为的直接责任及连带责任。

如若本网有任何内容侵犯您的权益,请联系 QQ: 1130861724

网站首页 | 实时热点 | 侵权删除 | 付款方式 | 联系方式 | 法律责任 | 网站地图 ©2022 zxb2b.com 三农网,中国大型农产品交易电商平台 鄂公网安备42018502006996 SITEMAPS | 鄂ICP备14015623号-20

返回顶部