- <!–{eval $preg_message = ‘/\<i class\=\”pstatus\”\>(.*?)\<\/i\>/si’;preg_match_all($preg_message, $post[message], $lastedit);}–>
- <!–{if $lastedit[1][0]}–>
- <!–{eval $preg_guolv = preg_replace(“/\<i class\=\”pstatus\”\>(.*?)\<\/i\>/si”,””,”$post[message]”);$preg_mes=substr($preg_guolv,13);}–>
- <!–{$preg_mes}–>
- <div class=”alert alert-success”><a href=”#” class=”close” data-dismiss=”alert”>×</a><!–{$lastedit[1][0]}–></div>
- <!–{else}–>
- <!–{$post[message]}–>
- <!–{/if}–>
复制代码,
- <!–{eval $preg_message = ‘/\<i class\=\”pstatus\”\>(.*?)\<\/i\>/si’;preg_match_all($preg_message, $post[message], $lastedit);}–>
- <!–{if $lastedit[1][0]}–>
- <!–{eval $preg_guolv = preg_replace(“/\<i class\=\”pstatus\”\>(.*?)\<\/i\>/si”,””,”$post[message]”);$preg_mes=substr($preg_guolv,13);}–>
- <!–{$preg_mes}–>
- <!–{else}–>
- <!–{$post[message]}–>
- <!–{/if}–>
复制代码, , ,我的做法是“过滤”下viewthread_node_body.htm里的$psot[message],只让主帖修改后显示在内容下面,回帖修改后不显示。
正则提取主帖里的提示,放到想要的位置,原来位置的过滤掉,如果匹配不到提示标签就用$psot[message]。
主帖位置的$psot[message]替换为:
- <!–{eval $preg_message = ‘/\<i class\=\”pstatus\”\>(.*?)\<\/i\>/si’;preg_match_all($preg_message, $post[message], $lastedit);}–>
- <!–{if $lastedit[1][0]}–>
- <!–{eval $preg_guolv = preg_replace(“/\<i class\=\”pstatus\”\>(.*?)\<\/i\>/si”,””,”$post[message]”);$preg_mes=substr($preg_guolv,13);}–>
- <!–{$preg_mes}–>
- <div class=”alert alert-success”><a href=”#” class=”close” data-dismiss=”alert”>×</a><!–{$lastedit[1][0]}–></div>
- <!–{else}–>
- <!–{$post[message]}–>
- <!–{/if}–>
复制代码
回帖里过滤不显示,回帖位置的$psot[message]替换为:
- <!–{eval $preg_message = ‘/\<i class\=\”pstatus\”\>(.*?)\<\/i\>/si’;preg_match_all($preg_message, $post[message], $lastedit);}–>
- <!–{if $lastedit[1][0]}–>
- <!–{eval $preg_guolv = preg_replace(“/\<i class\=\”pstatus\”\>(.*?)\<\/i\>/si”,””,”$post[message]”);$preg_mes=substr($preg_guolv,13);}–>
- <!–{$preg_mes}–>
- <!–{else}–>
- <!–{$post[message]}–>
- <!–{/if}–>
复制代码