rpl.vm

来自「一个简单的blog系统」· VM 代码 · 共 51 行

VM
51
字号
##
##  This program is free software; you can redistribute it and/or modify
##  it under the terms of the GNU General Public License as published by
##  the Free Software Foundation; either version 2 of the License, or
##  (at your option) any later version.
##
##  This program is distributed in the hope that it will be useful,
##  but WITHOUT ANY WARRANTY; without even the implied warranty of
##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
##  GNU Library General Public License for more details.
##
##  You should have received a copy of the GNU General Public License
##  along with this program; if not, write to the Free Software
##  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
##
##  show detail of topic's reply
##
###############################################################################
#parse("/wml/_sub/_global.vm")
#set($WORD_COUNT = 500)
#set($page_title="评论详细内容")
#set($forum_id = $dlog.param("fid", -1))
#set($reply_id = $dlog.param("rpl_id", -1))
#set($p_page = $dlog.param("p", 1))
#set($reply = $BBS_tool.reply($g_site, $reply_id))
<p>
#if($reply)
	话题:<a href="topic.vm?sid=$g_site_id&amp;fid=$forum_id&amp;tid=${reply.photo.id}">$text.html(${reply.topic.title})</a><br/>
	评论者:$text.html(${reply.user.nickname})<br/>
	时间:$date.format("yyyy-MM-dd HH:mm",${reply.replyTime})<br/>
	#set($content = $dlog.plain_text(${reply.content}))
	#set($page_count = $dlog.page_count($content.length(), $WORD_COUNT))
	#if($page_count > 1)
		#set($pre_page = $p_page - 1)
		#set($next_page = $p_page + 1)
		第${p_page}页,共${page_count}页.<br/>
		#if($p_page>1)
			<a href="rpl.vm?sid=$g_site_id&amp;fid=$forum_id&amp;rpl_id=$reply_id">首页</a>
			<a href="rpl.vm?sid=$g_site_id&amp;fid=$forum_id&amp;rpl_id=$reply_id&amp;p=$pre_page">上页</a>
		#end
		#if($p_page < $page_count)
			<a href="rpl.vm?sid=$g_site_id&amp;fid=$forum_id&amp;rpl_id=$reply_id&amp;p=$next_page">下页</a>
			<a href="rpl.vm?sid=$g_site_id&amp;fid=$forum_id&amp;rpl_id=$reply_id&amp;p=$page_count">尾页</a>
		#end
		<br/>
	#end
	内容:$text.html($dlog.split($content,$p_page,$WORD_COUNT))
#else
	评论不存在!
#end
</p>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?