📄 viewblog.tpl
字号:
{strip}
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td class="module_detail" width="100%">
{if $config.enable_mod_rewrite == 'Y'}
{assign var="lnk" value='<a href="javascript:popUpScrollWindow2(\''|cat:$docroot|cat:$blog.username|cat:'\',\'top\',650,600)">'}
{else}
{assign var="lnk" value='<a href="javascript:popUpScrollWindow2(\''|cat:$docroot|cat:'showprofile.php?username='|cat:$blog.username|cat:'\',\'top\',650,600)">'}
{/if}
{assign var="page_hdr01_text" value=$lnk|cat:$blog.username|cat:"\'s</a> "|cat:"{lang mkey='section_blog_title'}"}
{include file="page_hdr01.tpl"}
<table width="100%" border="0" cellpadding="{$config.cellspacing}" cellspacing="{$config.cellpadding}">
<tr>
<td width="100%" height="25">
<table width="100%" border="0" cellspacing="{$config.cellspacing}" cellpadding="{$config.cellpadding}">
<tr><td height="2"></td></tr>
<tr>
<td><b>{$blog.title|nl2br}</b><br />
{$blog.date_posted|date_format:$lang.DATE_FORMAT}</td>
</tr>
<tr><td > </td></tr>
<tr>
<td >{$blog.story|nl2br}</td>
</tr>
<tr><td ></td></tr>
<tr>
<td >
<b>{lang mkey='blog_views_hdr'}: {$blog.views}
{lang mkey='blog_rating_list_hdr'}: {$blog.votes} ({lang mkey='blog_rating_hdr'} {$blog.num_votes} {lang mkey='blog_votes1'}) </b>
</td>
</tr>
<tr>
<td>
<form method="post" action="viewblog.php" style="display:inline;">
<input type="hidden" value="{$blog.id}" name="id"/>
<input type="hidden" value="add_vote" name="action"/>
{if $smarty.session.UserId > 0 && $smarty.session.UserId != $blog.userid }
<b>{lang mkey='blog_add_vote'}:
</b>
<select name="vote">
{foreach item=item from=$vote_values}
{if $item == 0}
<option value="{$item}" selected="selected">{$item}</option>
{elseif $item == -5}
<option value="{$item}">{$item} ({lang mkey='worst'})</option>
{elseif $item == 5}
<option value="{$item}">{$item} ({lang mkey='excellent'})</option>
{else}
<option value="{$item}">{$item}</option>
{/if}
{/foreach}
</select>
<input type="submit" class="formbutton" value="{lang mkey='blog_submit_vote'}"/>
{/if}
</form>
</td>
</tr>
{if $allowcomments == 'Y'}
{if $error_message neq ""}
<tr>
<td>
<font color="{lang mkey='error_msg_color'}">{$error_message}</font>
</td>
</tr>
{/if}
<tr>
<td>
<b>{lang mkey='add_comment'}:</b>
</td>
</tr>
<tr>
<td>
<form name="frmCmt" method="post" action="viewblog.php" onsubmit="return countCheck({$config.max_comment_length});">
<input type="hidden" name="action" value="add_comment"/>
<input type="hidden" name="id" value="{$blog.id}"/>
<textarea rows="5" cols="70" name="comment" onkeyup="countText({$config.max_comment_length});">{$comment}</textarea>
<br />
{lang mkey='characters_typed'}: <input type="text" size="3" name="counter" value="" readonly onfocus="this.form.comment.focus()" /> ({lang mkey='limit'}: {$config.max_comment_length})
<center>
<input type="submit" class="formbutton" value='{lang mkey='submit'}'/> <input type="reset" class="formbutton" value="{lang mkey='reset'}"/>
</center>
<script type="text/javascript"> countText({$config.max_comment_length}); </script>
</form>
</td>
</tr>
{/if}
</table>
<br />
</td>
</tr>
</table>
{ if $comments }
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td class="module_detail" width="571">
<table width="100%" border="0" cellspacing="{$config.cellspacing}" cellpadding="{$config.cellpadding}">
<tr>
<td style="padding-left: 5px;">
<b>
{lang mkey='blog_comments'}: {$numcomments}
</b>
</td>
</tr>
<tr>
<td width="100%" height="25">
<table width="100%" border="0" cellspacing="{$config.cellspacing}" cellpadding="{$config.cellpadding}">
{foreach item=item key=key from=$comments}
<tr {* class="{cycle values="oddrow,evenrow"}" *}>
<td>
<table width="100%" border="0" cellspacing="{$config.cellspacing}" cellpadding="{$config.cellpadding}">
<tr>
<td>
<b>{mylang mkey="posted_by"} {$item.username}{mylang mkey='on'}{$item.datetime|date_format:$lang.DATE_FORMAT}</b>
</td>
</tr>
<tr>
<td>{$item.comment|nl2br}</td>
</tr>
<tr>
<td height="6">
</td>
</tr>
</table>
</td>
</tr>
{/foreach}
</table>
<br />
</td>
</tr>
</table>
</td>
</tr>
</table>
{/if}
</td>
</tr>
</table>
{/strip}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -