new_topic.vm

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

VM
58
字号
##
##  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.
##
##  write a topic
##
###############################################################################
#parse("/wml/_sub/_global.vm")
#set($PAGE_SIZE = 10)
#set($page_title="发起话题")
#set($forum_id = $dlog.param("fid",-1))
#set($log = $form.getBean())
<p>
	网站:<a href="$dlog.root()/wml/index.vm?sid=$g_site_id">$text.html(${g_site.friendlyName})</a>&nbsp;<a href="$dlog.root()/wml/bbs/index.vm?sid=$g_site_id">$text.bbs($g_site)</a><br/>	
	##显示已上传得附件
	#set($files = $DIARY_tool.attachments($g_user, $dlog.dlog_session_id($request)))
	#if($files && $files.size()>0)
	已上传附件:<br/>==========<br/>
	#foreach($file in $files)
		${velocityCount}.<a href="$dlog.root()/wml/showimg.vm?sid=$g_site_id&amp;uri=$link.encodeURL(${file.uri})">$dlog.file_name(${file.savePath})</a>&nbsp;<a href="$link.setAction("wml/diary")?sid=$g_site_id&amp;file_id=${file.id}&amp;eventSubmit_DeleteAttachement=${file.id}">删除</a><br/>
	#end
	#else
		请先插入图片再编辑文字,否则会导致文字丢失.<br/>
	#end
	<a href="$dlog.root()/wml/diary/upload.vm?sid=$g_site_id&amp;fromPage=$link.encodeURL("/wml/bbs/new_topic.vm?sid=$g_site_id&fid=$forum_id")">&lt;插入图片&gt;</a><br/>
	#if($messages.exist())<b>$!messages.getAll()</b><br/>#end
	标题:<input type="text" name="title" value="$!{log.title}"/><br/>	
	内容:<input type="text" name="content" value="$!{log.content}"/><br/>	
	选项:<select name="options" ivalue="0" multiple="true">
		<option value="">无</option>
		<option value="bookmark">标志为书签</option>
		<option value="top">置顶</option>
		<option value="elite">设为精华</option>
	</select><br/>
	<anchor>提交话题
        <go href="$link.setAction("wml/bbs/topic")" method="post">
            <postfield name="sid" value="$g_site_id"/>
            <postfield name="forum" value="$forum_id"/>
            <postfield name="title" value="$(title)"/>
            <postfield name="content" value="$(content)"/>
            <postfield name="options" value="$(options)"/>
            <postfield name="__ClientId" value="$dlog.gen_client_id()"/>
            <postfield name="clientType" value="1"/>
            <postfield name="eventSubmit_PublishTopic" value="WML"/>
        </go>
    </anchor>
</p>

⌨️ 快捷键说明

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