首页 > 代码库 > DZ3.2文章内容页代码注释,很不错的。
DZ3.2文章内容页代码注释,很不错的。
DZ3.2文章内容页代码注释,很不错的。
<!--{template common/header}-->
<!--e之路网络科技--文章页-->
<script type="text/javascript" src="http://www.mamicode.com/{$_G[‘setting‘][‘jspath‘]}forum_viewthread.js?{VERHASH}"></script>
<script type="text/javascript">zoomstatus = parseInt($_G[‘setting‘][‘zoomstatus‘]), imagemaxwidth = ‘{$_G[‘setting‘][‘imagemaxwidth‘]}‘, aimgcount = new Array();</script>
<!--文章页面开始-->
<div id="pt" class="bm cl">
<!--文章顶部导航-->
<div class="z">
<a href="http://www.mamicode.com/" class="nvhm" title="{lang homepage}">$_G</a> <em>?</em>
<a href="http://www.mamicode.com/$_G">{lang nav_index}</a> <em>?</em>
<!--{loop $cat $value}-->
<a href="http://www.mamicode.com/{echo getportalcategoryurl($value)}">$value</a><em>?</em>
<!--{/loop}-->
<a href="http://www.mamicode.com/{echo getportalcategoryurl($cat)}">$cat</a> <em>?</em>
{lang view_content}
</div>
<!--文章顶部导航 end-->
</div>
<!--{hook/view_article_top}-->
<!--{ad/text/wp a_t}-->
<style id="diy_style" type="text/css"></style>
<div class="wp">
<!----><div id="diy1" class="area"></div><!---->
</div>
<!--文章页面主体部分开始-->
<div id="ct" class="ct2 wp cl">
<div class="mn">
<!--左侧开始-->
<div class="bm vw">
<!--标题以及其他信息-->
<div class="h hm">
<h1 class="ph">$article <!--{if $article[‘status‘] == 1}-->({lang moderate_need})<!--{elseif $article[‘status‘] == 2}-->({lang ignored})<!--{/if}--></h1>
<p class="xg1">
$article<span class="pipe">|</span>
{lang view_publisher}: <a href="http://www.mamicode.com/home.php?mod=space&uid=$article">$article</a><span class="pipe">|</span>
{lang view_views}: <em id="_viewnum"><!--{if $article > 0}-->$article<!--{else}-->0<!--{/if}--></em><span class="pipe">|</span>
{lang view_comments}: <!--{if $article > 0}--><a href="http://www.mamicode.com/$common_url" title="{lang view_all_comments}"><em id="_commentnum">$article</em></a><!--{else}-->0<!--{/if}-->
<!--{if $article}--><span class="pipe">|</span>{lang view_author_original}: $article<!--{/if}-->
<!--{if $article}--><span class="pipe">|</span>{lang from}: <!--{if $article}--><a href="http://www.mamicode.com/$article" target="_blank">$article</a><!--{else}-->$article<!--{/if}--><!--{/if}-->
<!--{if $_G[‘group‘][‘allowmanagearticle‘] || ($_G[‘group‘][‘allowpostarticle‘] && $article[‘uid‘] == $_G[‘uid‘] && (empty($_G[‘group‘][‘allowpostarticlemod‘]) || $_G[‘group‘][‘allowpostarticlemod‘] && $article[‘status‘] == 1)) || $categoryperm[$value[‘catid‘]][‘allowmanage‘]}-->
<span class="pipe">|</span><a href="http://www.mamicode.com/portal.php?mod=portalcp&ac=article&op=edit&aid=$article">{lang edit}</a>
<!--{if $article>0 && ($_G[‘group‘][‘allowmanagearticle‘] || $categoryperm[$value[‘catid‘]][‘allowmanage‘])}-->
<span class="pipe">|</span><a href="http://www.mamicode.com/portal.php?mod=portalcp&ac=article&op=verify&aid=$article" id="article_verify_$article" onclick="showWindow(this.id, this.href, ‘get‘, 0);">{lang moderate}</a>
<!--{else}-->
<span class="pipe">|</span><a href="http://www.mamicode.com/portal.php?mod=portalcp&ac=article&op=delete&aid=$article" id="article_delete_$article" onclick="showWindow(this.id, this.href, ‘get‘, 0);">{lang delete}</a>
<!--{/if}-->
<!--{/if}-->
<!--{hook/view_article_subtitle}-->
</p>
</div>
<!--标题以及其他信息 end-->
<!----><div id="diysummarytop" class="area"></div><!---->
<!--文章摘要部分-->
<!--{if $article && empty($cat)}--><div class="s"><div><strong>{lang article_description}</strong>: $article</div><!--{hook/view_article_summary}--></div><!--{/if}-->
<!--文章摘要部分 end-->
<!----><div id="diysummarybottom" class="area"></div><!---->
<!--文章body-->
<div class="d">
<!----><div id="diycontenttop" class="area"></div><!---->
<!--文章内容-->
<table cellpadding="0" cellspacing="0" class="vwtb"><tr><td id="article_content">
<!--{ad/article/a_af/1}-->
<!--{if $content}-->
<div class="vm_pagetitle xw1">$content</div>
<!--{/if}-->
$content
</td></tr></table>
<!--文章内容 end-->
<!--{hook/view_article_content}-->
<!--{if $multi}--><div class="ptw pbw cl">$multi</div><!--{/if}-->
<!----><div id="diycontentbottom" class="area"></div><!---->
<script type="text/javascript" src="http://www.mamicode.com/{$_G}home.js?{VERHASH}"></script>
<!--鲜花 握手 雷人 鸡蛋-->
<div id="click_div">
<!--{template home/space_click}-->
</div>
<!--鲜花 握手 雷人 鸡蛋 end-->
<!--{if !empty($contents)}-->
<div id="inner_nav" class="ptn xs1">
<h3>{lang article_inner_navigation}</h3>
<ul class="xl xl2 cl">
<!--{loop $contents $key $value}-->
<!--{eval $curpage = $key+1;}-->
<!--{eval $inner_view_url = helper_page::mpurl($viewurl, ‘&page=‘, $curpage);}-->
<li>? <a href="http://www.mamicode.com/$inner_view_url"{if $key === $start} class="xi1"{/if}>{lang article_inner_page_pre} {$curpage} {lang article_inner_page} $value</a></li>
<!--{/loop}-->
</ul>
</div>
<!--{/if}-->
<!----><div id="diycontentclickbottom" class="area"></div><!---->
</div>
<!--{if !empty($aimgs[$content])}-->
<script type="text/javascript" reload="1">aimgcount[{$content}] = [<!--{echo implode(‘,‘, $aimgs[$content]);}-->];attachimgshow($content);</script>
<!--{/if}-->
<!--{if !empty($_G[‘setting‘][‘pluginhooks‘][‘view_share_method‘])}-->
<div class="tshare cl">
<strong>{lang viewthread_share_to}:</strong>
<!--{hook/view_share_method}-->
</div>
<!--{/if}-->
<!--文章body end-->
<!--文章收藏 评论 删除文章 啥的 文章 右下角 啥的-->
<div class="o cl ptm pbm">
<!--{hook/view_article_op_extra}-->
<a href="http://www.mamicode.com/home.php?mod=spacecp&ac=favorite&type=article&id=$article&handlekey=favoritearticlehk_{$article}" id="a_favorite" onclick="showWindow(this.id, this.href, ‘get‘, 0);" class="oshr ofav">{lang favorite}</a>
<!--{if helper_access::check_module(‘share‘)}-->
<a href="http://www.mamicode.com/home.php?mod=spacecp&ac=share&type=article&id=$article&handlekey=sharearticlehk_{$article}" id="a_share" onclick="showWindow(this.id, this.href, ‘get‘, 0);" class="oshr">{lang share}</a>
<!--{/if}-->
<a href="http://www.mamicode.com/misc.php?mod=invite&action=article&id=$article" id="a_invite" onclick="showWindow(‘invite‘, this.href, ‘get‘, 0);" class="oshr oivt">{lang invite}</a>
<!--{if $_G[‘group‘][‘allowmanagearticle‘] || ($_G[‘group‘][‘allowpostarticle‘] && $article[‘uid‘] == $_G[‘uid‘] && (empty($_G[‘group‘][‘allowpostarticlemod‘]) || $_G[‘group‘][‘allowpostarticlemod‘] && $article[‘status‘] == 1)) || $categoryperm[$value[‘catid‘]][‘allowmanage‘]}-->
<a href="http://www.mamicode.com/portal.php?mod=portalcp&ac=article&op=edit&aid=$article">{lang edit}</a><span class="pipe">|</span>
<aid="related_article" href="http://www.mamicode.com/portal.php?mod=portalcp&ac=related&aid=$article&catid=$article&update=1" onclick="showWindow(this.id, this.href, ‘get‘, 0);return false;">{lang article_related}</a><span class="pipe">|</span>
<!--{if $article>0 && ($_G[‘group‘][‘allowmanagearticle‘] || $categoryperm[$value[‘catid‘]][‘allowmanage‘])}-->
<a href="http://www.mamicode.com/portal.php?mod=portalcp&ac=article&op=verify&aid=$article" id="article_verify_$article" onclick="showWindow(this.id, this.href, ‘get‘, 0);">{lang moderate}</a>
<!--{else}-->
<a href="http://www.mamicode.com/portal.php?mod=portalcp&ac=article&op=delete&aid=$article" id="article_delete_$article" onclick="showWindow(this.id, this.href, ‘get‘, 0);">{lang delete}</a>
<!--{/if}-->
<span class="pipe">|</span>
<!--{/if}-->
<!--{if $article==0 && ($_G[‘group‘][‘allowdiy‘]|| getstatus($_G[‘member‘][‘allowadmincp‘], 4) || getstatus($_G[‘member‘][‘allowadmincp‘], 5) || getstatus($_G[‘member‘][‘allowadmincp‘], 6))}-->
<a href="http://www.mamicode.com/portal.php?mod=portalcp&ac=portalblock&op=recommend&idtype=aid&id=$article" onclick="showWindow(‘recommend‘, this.href, ‘get‘, 0)">{lang blockdata_recommend}</a><span class="pipe">|</span>
<!--{/if}-->
</div>
<!--文章收藏 评论 啥的 end-->
<!--文章上一篇 下一篇-->
<!--{if $article[‘preaid‘] || $article[‘nextaid‘]}-->
<div class="pren pbm cl">
<!--{if $article[‘prearticle‘]}--><em>{lang pre_article}<a href="http://www.mamicode.com/{$article[‘prearticle‘][‘url‘]}">{$article[‘prearticle‘][‘title‘]}</a></em><!--{/if}-->
<!--{if $article[‘nextarticle‘]}--><em>{lang next_article}<a href="http://www.mamicode.com/{$article[‘nextarticle‘][‘url‘]}">{$article[‘nextarticle‘][‘title‘]}</a></em><!--{/if}-->
</div>
<!--{/if}-->
<!--文章上一篇 下一篇 end-->
</div>
<!----><div id="diycontentrelatetop" class="area"></div><!---->
<!--{ad/article/mbm hm/2}--><!--{ad/article/mbm hm/3}-->
<!--文章评论-->
<!--{if $article[‘related‘]}-->
<div id="related_article" class="bm">
<div class="bm_h cl">
<h3>{lang view_related}</h3>
</div>
<div class="bm_c">
<ul class="xl xl2 cl" id="raid_div">
<!--{loop $article[‘related‘] $raid $rvalue}-->
<input type="hidden" value="http://www.mamicode.com/$raid" />
<li>? <a href="http://www.mamicode.com/{$rvalue}">{$rvalue}</a></li>
<!--{/loop}-->
</ul>
</div>
</div>
<!--{/if}-->
<!--文章评论 end-->
<!----><div id="diycontentrelate" class="area"></div><!---->
<!--{if $article[‘allowcomment‘]==1}-->
<!--{eval $data = http://www.mamicode.com/&$article}-->
<!--{subtemplate portal/portal_comment}-->
<!--{/if}-->
<!----><div id="diycontentcomment" class="area"></div><!---->
</div>
<!--左侧结束-->
<div class="sd pph">
<!--{hook/view_article_side_top}-->
<div class="drag">
<!----><div id="diyrighttop" class="area"></div><!---->
</div>
<!--{if $cat}-->
<div class="bm">
<div class="bm_h cl">
<h2>{lang category_related}</h2>
</div>
<div class="bm_c">
<ul class="xl xl2 cl">
<!--{loop $cat $value}-->
<li><a href="http://www.mamicode.com/{echo getportalcategoryurl($value)}">$value</a></li>
<!--{/loop}-->
</ul>
</div>
</div>
<!--{/if}-->
<!--{if $cat}-->
<div class="bm">
<div class="bm_h cl">
<h2>{lang sub_category}</h2>
</div>
<div class="bm_c">
<ul class="xl xl2 cl">
<!--{loop $cat $value}-->
<li><a href="http://www.mamicode.com/{echo getportalcategoryurl($value)}">$value</a></li>
<!--{/loop}-->
</ul>
</div>
</div>
<!--{/if}-->
<div class="drag">
<!----><div id="diy2" class="area"></div><!---->
</div>
<!--{hook/view_article_side_bottom}-->
</div>
</div>
<!--{if $_G[‘relatedlinks‘]}-->
<script type="text/javascript">
var relatedlink = [];
<!--{loop $_G[‘relatedlinks‘] $key $link}-->
relatedlink[$key] = {‘sname‘:‘$link‘, ‘surl‘:‘$link‘};
<!--{/loop}-->
relatedlinks(‘article_content‘);
</script>
<!--{/if}-->
<!--文章主体部分 end-->
<div class="wp mtn">
<!----><div id="diy3" class="area"></div><!---->
</div>
<input type="hidden" id="portalview" value="http://www.mamicode.com/1">
<!--{template common/footer}-->
DZ3.2文章内容页代码注释,很不错的。