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.