?? _show_log_and_replies.vm
字號:
#set($PAGE_SIZE = 20)
#set($catalog_id = $dlog.param("cat_id", -1))
#set($prev_diary = $DIARY_tool.prev_diary($g_site, $g_user, $catalog_id, $log_id))
#set($next_diary = $DIARY_tool.next_diary($g_site, $g_user, $catalog_id, $log_id))
#set($p_page = $dlog.param("page",1))
#set($page_count = $dlog.page_count(${log.replyCount}, $PAGE_SIZE))
#set($pre_page = $p_page - 1)
#set($next_page = $p_page + 1)
<div class="page_top">
<div class="pagecontent">
#if($prev_diary || $next_diary)
<div class="pagecontent_left fleft">
#if($next_diary)
<a href="?sid=$g_site_id&cat_id=$catalog_id&log_id=${next_diary.id}" class="cprevious">上篇:${next_diary.title}</a>
#end
</div>
<div class="pagecontent_right fright">
#if($prev_diary)
<a href="?sid=$g_site_id&cat_id=$catalog_id&log_id=${prev_diary.id}" class="cnext">下篇:${prev_diary.title}</a>
#end
</div>
#end
<div class="clear"></div>
</div>
<div class="spacer_1"></div>
</div>
<div class="page_content">
<div class="main_module">
<div class="diary_title">
#invoke("_log_title_bar.vm")
</div>
<div class="line_dashed"></div>
<div class="diary_content">
$!{log.content}
#if($log && ${log.bgSound})
<div id="mplayer_div" align="center">
<embed id="mplayer" src="${log.bgSound.url}" align="baseline" border="0" width="460" height="50"
type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/isapi/redir.dll?prd=windows&sbp=mediaplayer&ar=media&sba=plugin&"
name="MediaPlayer" showcontrols="1" showpositioncontrols="1"
showaudiocontrols="1" showtracker="0" showdisplay="0"
showstatusbar="1" autosize="0"
showgotobar="0" showcaptioning="0" autostart="1" autorewind="0"
animationatstart="0" transparentatstart="0" allowscan="1"
enablecontextmenu="0" clicktoplay="0" invokeurls="1"
defaultframe="datawindow">
</embed><br />
如果您無法播放歌曲,請先確定是否已經安裝<a href="http://download.microsoft.com/download/9/4/0/94072943-9188-4a60-b31f-3031f18404e4/mpsetup.exe" target="_blank"><b>Windows media player</b></a>軟件<br/>
或者歌曲類型是否被<b>Microsoft Media Player</b>所支持。<br/>
另外請使用IE瀏覽器。
</div>
<div class="spacer_20"></div>
#end
<div class="spacer_20"></div>
#if($dlog.not_empty(${log.keyword}))
<div class="keyword">
<b>關鍵字:</b>
#foreach($tag in ${log.keywords})
<a href="$dlog.root()/html/showtag.vm?sid=$g_site_id&type=1&tag=$link.encodeURL($tag)"><b>$text.html(${tag})</b></a>
#end
</div>
#end
<div class="trackback">
<b>引用地址:</b>
<span class="en9pt">
$link.getContextURL()/html/trackback.do?id=${log.id}&type=1 (<a href="#" onclick="return copy_to_clipboard('$link.getContextURL()/html/trackback.do?log_id=${log.id}&type=1')">復制地址</a>)
</span>
</div>
</div>
<div class="line_dashed"></div>
<div class="diary_foot">
#invoke("_log_bottom_bar.vm")
</div>
</div>
</div>
<div class="page_footer">
#if(${log.status} != 5)
###if(${log.replyCount} > 0)
#if(${log.replyCount} > 0)
<div class="pagecontent">
<div class="pagecontent_left fleft">
<a name="#replies"></a><b>≡≡≡ 網友評論 ≡≡≡</b>
</div>
<div class="pagecontent_right fright">
##日記評論分頁
#if($page_count > 1)
<form name="dform" action="#replies"><!-- 翻頁控制條 -->
第<b>${p_page}</b>頁,共<b>${page_count}</b>頁
<input type="hidden" name="sid" value="$g_site_id" />
<input type="hidden" name="cat_id" value="$log.catalog.id" />
<input type="hidden" name="log_id" value="$log.id" />
#set($base_url = "?sid=${g_site_id}&cat_id=${log.catalog.id}&log_id=${log.id}")
#if($p_page > 1)<a href="$base_url#replies">首頁</a>#end
#if($p_page>1)<a href="${base_url}&page=$pre_page#replies">上頁</a>#end
#if($p_page < $page_count)<a href="${base_url}&page=$next_page#replies">下頁</a>#end
#if($p_page < $page_count)<a href="${base_url}&page=$page_count#replies">尾頁</a>#end
到 <select name="page" onchange="dform.submit();">
#foreach($p in [1..$page_count])
<option value="$p"#if($p_page==$p) selected#end>$p</option>
#end
</select> 頁
</form>
#end
</div>
<div class="clear"></div>
</div>
<div class="spacer_1"></div>
#set($reply_id = $dlog.param("reply_id",-1))
#set($replies = $DIARY_tool.replies($g_site,$g_user,$log,$p_page, $PAGE_SIZE, true))
#foreach($reply in ${replies})
#if(${reply.id} == $reply_id) #set($reply_to_edit = $reply) #end
<div class="comment">
<div class="comment_title"><a name="$reply.id"></a>
<div class="fleft">
#if($dlog.not_empty($reply.authorURL))
<a href="$reply.authorURL"><b>$text.html($reply.author)</b></a>
#elseif($reply.user)
<a href="$dlog.root()/dlog/viewuser.vm?sid=$g_site_id&uid=${reply.user.id}"><b>$text.html($reply.author)</b></a>
#else
<b>$text.html($reply.author)</b>
#end
網友說:
#if($reply.client.type == 1)
$html.img("mobile.gif",null,"wap","absmiddle",0)
#end
</div>
<div class="fright">
$date.format("yyyy/MM/dd HH:mm",${reply.replyTime})
#if($g_user && ($dlog.is_owner($g_site,$g_user) || (${reply.user} && ${reply.user.id}==$g_user_id)))
<a href="#" onclick="if(confirm('您真的要刪除該評論嗎?')) deleteRForm_${reply.id}.submit(); return false;"">$html.img("icon_delete.gif",null,"del","absmiddle",0)</a>
<a href="showlog.vm?sid=$g_site_id&log_id=${reply.diary.id}&reply_id=${reply.id}#reply">$html.img("icon_edit.gif",null,"edit","absmiddle",0)</a>
<form name="deleteRForm_${reply.id}" action="$link.setAction("html/reply")" method="post">
<input type="hidden" name="sid" value="${g_site_id}" />
<input type="hidden" name="log_id" value="${reply.diary.id}" />
<input type="hidden" name="fromPage" value="$dlog.get_request_url()" />
<input type="hidden" name="eventSubmit_DeleteDiaryReply" value="${reply.id}" />
</form>
#end
</div>
</div>
<div class="comment_content">
#if(${reply.ownerOnly}==0 || $dlog.is_owner($g_site,$g_user) || ($g_user && ${g_user.id}==${reply.user.id}))
${reply.content}
#else
<i>[此評論只能由評論者或者是寫日記的人可以查閱。]</i>
#end
</div>
<div class="comment_footer"></div>
</div>
#end
#end
#if(${log.lock}==0 && ${log.status}==0)
<div class="reply">
<script language="javascript" src="res://AlxRes.dll/SCRIPT/dsn.class.js"></script>
<script language="javascript">function doTryAlexa(){try{aborted();return 1;}catch(e){return 0;}}</script>
<form action="$link.setAction("html/reply")" method="post" onsubmit="return validateReplyForm(this);">
#if($reply_to_edit)
#set($author=${reply_to_edit.author})
#set($author_url=${reply_to_edit.authorURL})
#set($author_email=${reply_to_edit.authorEmail})
#elseif($g_user)
#set($author = ${g_user.nickname})
#set($author_url = ${g_user.contactInfo.homePage})
#set($author_email = ${g_user.contactInfo.email})
#end
<div class="comment_form">
<a name="#reply"></a><b>≡≡≡ 發表評論 ≡≡≡</b><br/>
#if($reply_to_edit)<input type="hidden" name="reply_id" value="${reply_to_edit.id}"/>#end
<input type="hidden" name="alexa" id="IsAlexaUser"/>
<input type="hidden" name="clientType" value="0" />
<input type="hidden" name="sid" value="$g_site_id" />
<input type="hidden" name="log_id" value="${log.id}" />
<input type="hidden" name="__ClientId" value="$dlog.gen_client_id()" />
<input type="hidden" name="parentId" value="${log.id}" />
#if($reply_to_edit)
<input type="hidden" value="HTML" name="eventSubmit_UpdateDiaryReply" />
#else
<input type="hidden" value="HTML" name="eventSubmit_AddDiaryReply" />
#end
<div class="comment_form_item">
稱呼: <input type="text" name="author" value="$!escape.html($author)" size="10" maxlength="20" />
</div>
<div class="comment_form_item">
郵箱: <input type="text" name="authorEmail" value="$!author_email" size="20" maxlength="50" /> {可選}
</div>
<div class="comment_form_item">
網址: <input type="text" name="authorURL" value="$!author_url" size="20" maxlength="50" /> {可選}
<input type="checkbox" name="ownerOnly" value="1" #if($reply_to_edit && ${reply_to_edit.ownerOnly}==1)checked#end/>此評論只有我和寫日記的人查閱
</div>
<div class="comment_form_item">
<textarea name="content" style="height:150px;width:100%">$!{reply_to_edit.content}</textarea>
</div>
<div class="comment_form_item">
#if($reply_to_edit)
<input type="submit" value="更新評論" class="button" name="eventSubmit_UpdateDiaryReply" />
#else
<input type="submit" value="添加評論" class="button" name="eventSubmit_AddDiaryReply" />
#end
</div>
</div>
</form>
</div>
<script type="text/javascript">
window.onload = function()
{
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('html')) ;
var oFCKeditor = new FCKeditor( 'content' ) ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.Height = 180;
oFCKeditor.ToolbarSet = "Basic";
oFCKeditor.ReplaceTextarea() ;
}
function validateReplyForm(theForm)
{
with(theForm){
if(is_empty(author.value)){
alert("username is required.");
author.focus();
return false;
}
if(not_empty(authorEmail.value) && !is_email(authorEmail.value)){
alert("email error.");
authorEmail.focus();
return false;
}
}
return true;
}
function SetFont(size){
document.getElementById("imlog_content").style.fontSize=size
}
document.getElementById("IsAlexaUser").value=doTryAlexa();
</script>
#end
#end
</div>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -