index.vm
来自「一个简单的blog系统」· VM 代码 · 共 46 行
VM
46 行
##
## 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.
##
## photo channel
##
###############################################################################
#parse("/wml/_sub/_global.vm")
#set($page_title=$text.ui("channel.photo"))
<p>
#invoke("_photo_bar.vm")
##显示最新日记
<b>+最新照片</b>(<a href="$dlog.root()/wml/photo/photos.vm?sid=$g_site_id">$text.wml("more")</a>)<br/>
#set($photos = $PHOTO_tool.list_photos($g_site, $g_user, -1, -1, 1, 3))
#foreach($photo in $photos)
${velocityCount}.<img src="$dlog.root()${photo.previewURL}" alt=""/><a href="show.vm?sid=$g_site_id&pid=${photo.id}">$text.html(${photo.name})</a> (评:<a href="photo_rpls.vm?sid=$g_site_id&pid=${photo.id}">${photo.replyCount}</a>/阅:${photo.viewCount}/$date.format("yy-MM-dd HH:mm",${photo.createTime}))<br/>
#end
</p>
<p>
## 显示所有日记分类
<b><a href="photos.vm?sid=$g_site_id">+所有照片</a></b><br/>
#foreach($album in ${g_site.albums})
${velocityCount}.<a href="$dlog.root()/wml/photo/photos.vm?sid=$g_site_id&aid=$album.id">$text.html(${album.name})(${album.photoCount})</a><br/>
#end
</p>
<p>
##显示最新评论
<b>+$text.wml("newest_comment")</b>(<a href="$dlog.root()/wml/photo/rpls.vm?sid=$g_site_id">$text.wml("more")</a>)<br/>
#set($replies = $PHOTO_tool.list_photo_replies($g_site, 1, 5, $g_user))
#foreach($reply in $replies)
#set($rc = $dlog.abbreviate($dlog.plain_text(${reply.content}), 14))
#if($dlog.is_empty($rc))#set($rc="[无文本内容]")#end
${velocityCount}.<a href="$dlog.root()/wml/photo/rpl.vm?sid=$g_site_id&pid=${reply.photo.id}&rpl_id=${reply.id}">$text.html($rc)</a> ($text.wml("comment_author")$text.html(${reply.author}),$date.format("M-d HH:mm",${reply.replyTime}))<br/>
#end
</p>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?