Analyze the process and principle of Discuz Forum's reply.
replies can also add hidden tags,
as long as users use hide tags permissions, the content will be displayed when users reply to the topic. Replies are also valid for visitors,
when a user is posting a hide tag when a post is posted, the discuzcode function is invoked to parse the discuz code when the theme is published, which parses the hide label part:
[code]if ($parsetype! = 1.Amp;.Amp; strpos)! = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
[code]if ($parsetype! = 1.Amp;.Amp; strpos)! = = = = = = = FALSE.Amp;.Amp; $pid) {
if (strpos ($msglower,'.#91; hide.#93; ")! = = FALSE) #91;'forum'.#93;.#91;'ismoderator'.#93; DB:: result_first (.Quot; SELECT PID FROM.Quot;.DB:); : TRUE;
}
if ($authorreplyexist) {
$message = preg_replace (.Quot; /.#91; hide.#93; s* (. *?)) Lace (.Quot; /.#91; hide.#93; (*?).#91; /hide.#93; /is.quot; tpl_hide_reply_hidden (), $message);
$message. ='.lt. If (strpos ($msglower,'.#91; hide=')! = = FALSE) {
$message = preg_replace (.Quot; /.#91; hide=). Br />
because of the post table, the subject is also the existence of the
[code]$authorreplyexist =! $_G.#91;'forum'.#93;.#91;'ismoderator'.#93; DB:: result_first. Uid.#93;'.quot;.Quot; authorid=0 AND useip='$_G.#91; clientip.#93;'.quot;..quot; LIMIT 1.quot;): TRUE; #93; /is.quot; tpl_hide_reply (), $message) [/code]
replace the code of the hide label part,
with tpl_hide_reply_hidden () to remove the content of the hide tag part,
the function here comes from: discuzcode.htm, the function principle of which is not introduced here.