How to mark a post in Discuz 7.1 with a WAP post

Source: Internet
Author: User

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

discuz! is sing Chuang want (Comsenz) company launched a forum BBS products, the author of this tutorial for you to explain in the discuz! 7.1 How to give the post through WAP tag. If the reply or the topic is published via WAP, the message is displayed in the post message "from the phone."


Effect Chart:





Modify Database Structure


in Discuz 7.1 background => database => upgrade, submitted as follows SQL:


ALTER TABLE ' cdb_posts ' ADD ' OnMobile ' TINYINT (1) Not NULL





Two, modify WAP program


Open Forum root directory \wap\include\post.inc.php file found





$db->query (INSERT into {$tablepre}posts (FID, Tid, A, author, Authorid, subject, Dateline, ME Ssage, 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 ');





modified to:





$db->query (INSERT into {$tablepre}posts (FID, Tid, A, author, Authorid, subject, Dateline, ME Ssage, Useip, Invisible, Usesig, Htmlon, Bbcodeoff, Smileyoff, Parseurloff, Attachment,onmobile)


VALUES (' $fid ', ' $tid ', ' 1 ', ' $discuz _user ', ' $discuz _uid ', ' $subject ', ' $timestamp ', ' $messa GE ', ' $onlineip ', ' $pinvisible ', ' 0 ', ' 0 ', ' 0 ', ' 0 ', ' 0 ', ' 0 ', ' 1 ');





find
.




$db->query (INSERT into {$tablepre}posts (FID, Tid, A, author, Authorid, Dateline, message, USEIP, invisible, Usesi G, Htmlon, Bbcodeoff, Smileyoff, Parseurloff, attachment)


VALUES (' $fid ', ' $tid ', ' 0 ', ' $discuz _user ', ' $discuz _uid ', ' $timestamp ', ' $message ', ' $onlineip ', ' $pinvisible ', ' 1 ', ' 0 ', ' 0 ', ' 0 ', ' 0 ', ' 0 ') ';








modified to:





$db->query ("INSERT into {$tablepre}posts (FID, Tid, A, author, Authorid, Dateline, message, US EIP, 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 ') ';





save.





Three, modify the template


Open Forum Directory \templates\default\viewthread_node.htm file found





<!--{ElseIf! $post [' Authorid '] &&! $post [' username ']}-->


{Lang Guest} {$pluginhooks [viewthread_postheader][$postcount]}<em id= ' authorposton$post[pid] ' >{lang Poston} $post [ Dateline]</em>


<!--{/if}-->





added after this program:


<!--{if $post [' OnMobile ']}-->


This information comes from mobile phone


<!--{/if}-->








save, Update cache.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.