您现在的位置是:首页 > cms教程 > Discuz教程Discuz教程

discuz门户文章页面模板修改方式实例

张津广2025-06-29Discuz教程已有人查阅

导读修改内容:view.htm1.文章标题,模板代码文章标题, 前台代码2.文章信息,模板代码:文章信息:前台代码3.相关阅读 模板代码

修改内容:view.htm
1.文章标题,模板代码
<h1 class="ph">$article[title] <!--{if $article['status'] == 1}-->({lang moderate_need})<!--{elseif $article['status'] == 2}-->({lang ignored})<!--{/if}--></h1>
文章标题, 前台代码
<h1 class="ph">同样做游戏手柄,小米和UC有啥不一样? </h1>
2.文章信息,模板代码:
<p class="xg1">
$article[dateline]<span class="pipe">|</span>
{lang view_publisher}: <a href="home.php?mod=space&uid=$article[uid]">$article[username]</a><span class="pipe">|</span>
{lang view_views}: <em id="_viewnum"><!--{if $article[viewnum] > 0}-->$article[viewnum]<!--{else}-->0<!--{/if}--></em><span class="pipe">|</span>
{lang view_comments}: <!--{if $article[commentnum] > 0}--><a href="$common_url" title="{lang view_all_comments}"><em id="_commentnum">$article[commentnum]</em></a><!--{else}-->0<!--{/if}-->
<!--{if $article[author]}--><span class="pipe">|</span>{lang view_author_original}: $article[author]<!--{/if}-->
<!--{if $article[from]}--><span class="pipe">|</span>{lang from}: <!--{if $article[fromurl]}--><a href="$article[fromurl]" target="_blank">$article[from]</a><!--{else}-->$article[from]<!--{/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="portal.php?mod=portalcp&ac=article&op=edit&aid=$article[aid]">{lang edit}</a>
<!--{if $article[status]>0 && ($_G['group']['allowmanagearticle'] || $categoryperm[$value['catid']]['allowmanage'])}-->
<span class="pipe">|</span><a href="portal.php?mod=portalcp&ac=article&op=verify&aid=$article[aid]" id="article_verify_$article[aid]" onclick="showWindow(this.id, this.href, 'get', 0);">{lang moderate}</a>
<!--{else}-->
<span class="pipe">|</span><a href="portal.php?mod=portalcp&ac=article&op=delete&aid=$article[aid]" id="article_delete_$article[aid]" onclick="showWindow(this.id, this.href, 'get', 0);">{lang delete}</a>
<!--{/if}-->
<!--{/if}-->
<!--{hook/view_article_subtitle}-->
</p>
文章信息:前台代码
<p class="xg1">
2015-6-4 14:44<span class="pipe">|</span>
发布者: <a href="home.php?mod=space&uid=1">admin</a><span class="pipe">|</span>
查看: <em id="_viewnum">122</em><span class="pipe">|</span>
评论: 0<span class="pipe">|</span>来自: <a href="http:// .pingwest.com/" target="_blank">品玩</a></p>
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="$raid" />
<li>? <a href="{$rvalue[uri]}">{$rvalue[title]}</a></li>
<!--{/loop}-->
</ul>
</div>
</div>
<!--{/if}-->
相关阅读:前台代码
<div id="related_article" class="bm">
<div class="bm_h cl">
<h3>相关阅读</h3>
</div>
<div class="bm_c">
<ul class="xl xl2 cl" id="raid_div"><input type="hidden" value="1">
<li>? <a href="portal.php?mod=view&aid=1">1800元人民币的手柄长什么样?</a></li>
<input type="hidden" value="3">
<li>? <a href="portal.php?mod=view&aid=3">PS3手柄选购完全指南 教您如何辨识真假</a></li>
<input type="hidden" value="5">
<li>? <a href="portal.php?mod=view&aid=5">盛大推出新款游戏,你猜猜是什么?</a></li>
</ul>
</div>
</div>

本文标签:

很赞哦! ()

相关源码

  • (自适应)大气壁挂炉暖气设备家用电器模板带加盟申请和下载资料为壁挂炉、暖气片等供暖设备企业设计的PbootCMS模板,通过响应式技术实现跨终端展示产品参数和技术细节。后台统一管理确保采暖系统数据、服务网点信息实时同步更新查看源码
  • (自适应)中英双语配线器材扎带线卡网站pbootcms模板免费下载为线缆管理、电气配线领域打造的响应式网站模板,采用PbootCMS内核开发,可快速搭建企业级产品展示平台,数据实时同步管理。查看源码
  • (自适应响应式)超市仓储仓库货架展架网站pbootcms源码下载本模板为货架展架、仓储货架行业量身打造,采用PbootCMS内核开发,充分考虑了货架产品展示和企业形象展示的需求。模板设计简洁大方,突出产品特点,能够有效展示各类货架产品的规格参数和应用场景,帮助访客快速了解企业核心业务和产品优势。查看源码
  • (自适应)宽屏大气红色机械设备pbootcms模板源码下载为机械设备制造企业设计的响应式网站模板,采用PbootCMS内核开发。宽屏布局突出设备展示效果,红色工业风格贴合机械行业属性,支持PC端与手机端自动适配查看源码
  • (PC+WAP)红色驾校培训学车在线预约源码下载基于PbootCMS内核开发的驾校培训专用网站模板,深度适配驾驶培训行业展示需求。采用PC与移动端同步响应设计,单一后台统一管理内容数据,更换图文素材后可快速转变为其他行业网站。查看源码
  • (自适应响应式)刷卡机POS机无线支付设备pbootcms网站源码下载本模板基于PbootCMS系统开发,为支付终端设备企业设计,特别适合POS机、移动支付终端、刷卡设备等金融科技产品展示。采用响应式布局技术,确保各类支付终端产品在不同设备查看源码
分享笔记 (共有 篇笔记)
验证码:

本栏推荐