模板制作修改 Discuz! X3 header.htm 文件解析

[复制链接]
小小军 发表于 2013-9-30 23:00:55 [模板制作修改] 显示全部楼层 |阅读模式 上一主题 下一主题

马上注册,一起探讨正确快速的建站方法

您需要 登录 才可以下载或查看,没有帐号?快速注册

x
  1. <!--{subtemplate common/header_common}-->
  2. <meta name="application-name" content="$_G['setting']['bbname']" />
  3. <meta name="msapplication-tooltip" content="$_G['setting']['bbname']" />
  4. <!--{if $_G['setting']['portalstatus']}--><meta name="msapplication-task" content="name=$_G['setting']['navs'][1]['navname'];action-uri={echo !empty($_G['setting']['domain']['app']['portal']) ? 'http://'.$_G['setting']['domain']['app']['portal'] : $_G[siteurl].'portal.php'};icon-uri={$_G[siteurl]}{IMGDIR}/portal.ico" /><!--{/if}-->
  5. <meta name="msapplication-task" content="name=$_G['setting']['navs'][2]['navname'];action-uri={echo !empty($_G['setting']['domain']['app']['forum']) ? 'http://'.$_G['setting']['domain']['app']['forum'] : $_G[siteurl].'forum.php'};icon-uri={$_G[siteurl]}{IMGDIR}/bbs.ico" />
  6. <!--{if $_G['setting']['groupstatus']}--><meta name="msapplication-task" content="name=$_G['setting']['navs'][3]['navname'];action-uri={echo !empty($_G['setting']['domain']['app']['group']) ? 'http://'.$_G['setting']['domain']['app']['group'] : $_G[siteurl].'group.php'};icon-uri={$_G[siteurl]}{IMGDIR}/group.ico" /><!--{/if}-->
  7. <!--{if helper_access::check_module('feed')}--><meta name="msapplication-task" content="name=$_G['setting']['navs'][4]['navname'];action-uri={echo !empty($_G['setting']['domain']['app']['home']) ? 'http://'.$_G['setting']['domain']['app']['home'] : $_G[siteurl].'home.php'};icon-uri={$_G[siteurl]}{IMGDIR}/home.ico" /><!--{/if}-->
  8. <!--{if $_G['basescript'] == 'forum' && $_G['setting']['archiver']}-->
  9.   <link rel="archives" title="$_G['setting']['bbname']" href="{$_G[siteurl]}archiver/" />
  10. <!--{/if}-->
  11. <!--{if !empty($rsshead)}-->$rsshead<!--{/if}-->
  12. <!--{if widthauto()}-->
  13.   <link rel="stylesheet" id="css_widthauto" type="text/css" href="data/cache/style_{STYLEID}_widthauto.css?{VERHASH}" />
  14.   <script type="text/javascript">HTMLNODE.className += ' widthauto'</script>
  15. <!--{/if}-->
  16. <!--{if $_G['basescript'] == 'forum' || $_G['basescript'] == 'group'}-->
  17.   <script type="text/javascript" src="{$_G[setting][jspath]}forum.js?{VERHASH}"></script>
  18. <!--{elseif $_G['basescript'] == 'home' || $_G['basescript'] == 'userapp'}-->
  19.   <script type="text/javascript" src="{$_G[setting][jspath]}home.js?{VERHASH}"></script>
  20. <!--{elseif $_G['basescript'] == 'portal'}-->
  21.   <script type="text/javascript" src="{$_G[setting][jspath]}portal.js?{VERHASH}"></script>
  22. <!--{/if}-->
  23. <!--{if $_G['basescript'] != 'portal' && $_GET['diy'] == 'yes' && check_diy_perm($topic)}-->
  24.   <script type="text/javascript" src="{$_G[setting][jspath]}portal.js?{VERHASH}"></script>
  25. <!--{/if}-->
  26. <!--{if $_GET['diy'] == 'yes' && check_diy_perm($topic)}-->
  27. <link rel="stylesheet" type="text/css" id="diy_common" href="data/cache/style_{STYLEID}_css_diy.css?{VERHASH}" />
  28. <!--{/if}-->
  29. </head></p><p><body id="nv_{$_G[basescript]}" class="pg_{CURMODULE}{if $_G['basescript'] === 'portal' && CURMODULE === 'list' && !empty($cat)} {$cat['bodycss']}{/if}" onkeydown="if(event.keyCode==27) return false;">
  30. <div id="append_parent"></div><div id="ajaxwaitid"></div>
  31. <!--{if $_GET['diy'] == 'yes' && check_diy_perm($topic)}-->
  32.   <!--{template common/header_diy}-->
  33. <!--{/if}-->
  34. <!--{if check_diy_perm($topic)}-->
  35.   <!--{template common/header_diynav}-->
  36. <!--{/if}-->
  37. <!--{if CURMODULE == 'topic' && $topic && empty($topic['useheader']) && check_diy_perm($topic)}-->
  38.   $diynav
  39. <!--{/if}-->
  40. <!--{if empty($topic) || $topic['useheader']}-->
  41.   <!--{if $_G['setting']['mobile']['allowmobile'] && (!$_G['setting']['cacheindexlife'] && !$_G['setting']['cachethreadon'] || $_G['uid']) && ($_GET['diy'] != 'yes' || !$_GET['inajax']) && ($_G['mobile'] != '' && $_G['cookie']['mobile'] == '' && $_GET['mobile'] != 'no')}-->
  42.    <div class="xi1 bm bm_c">
  43.        {lang your_mobile_browser}<a href="{$_G['siteurl']}forum.php?mobile=yes">{lang go_to_mobile}</a> <span class="xg1">|</span> <a href="$_G['setting']['mobile']['nomobileurl']">{lang to_be_continue}</a>
  44.    </div>
  45.   <!--{/if}-->
  46.   <!--{if $_G['setting']['shortcut'] && $_G['member'][credits] >= $_G['setting']['shortcut']}-->
  47.    <div id="shortcut">
  48.     <span><a href="javascript:;" id="shortcutcloseid" title="{lang close}">{lang close}</a></span>
  49.     {lang shortcut_notice}
  50.     <a href="javascript:;" id="shortcuttip">{lang shortcut_add}</a></p><p>   </div>
  51.    <script type="text/javascript">setTimeout(setShortcut, 2000);</script>
  52.   <!--{/if}-->
  53.   <div id="toptb" class="cl">
  54.    <!--{hook/global_cpnav_top}-->
  55.    <div class="wp">
  56.     <div class="z">
  57.     <!--设为首页以及收藏和左侧顶部导航-->
  58.      <!--{loop $_G['setting']['topnavs'][0] $nav}-->
  59.       <!--{if $nav['available'] && (!$nav['level'] || ($nav['level'] == 1 && $_G['uid']) || ($nav['level'] == 2 && $_G['adminid'] > 0) || ($nav['level'] == 3 && $_G['adminid'] == 1))}-->$nav[code]<!--{/if}-->
  60.      <!--{/loop}-->
  61.      
  62.      <!--插件钩子global_cpnav_extra1-->
  63.      <!--{hook/global_cpnav_extra1}-->
  64.     </div>
  65.     <div class="y">
  66.      <a id="switchblind" href="javascript:;" onclick="toggleBlind(this)" title="{lang switch_blind}" class="switchblind">{lang switch_blind}</a>
  67.      <!--插件钩子global_cpnav_extra2-->
  68.      <!--{hook/global_cpnav_extra2}-->
  69.      
  70.      <!--右侧侧顶部导航-->
  71.      <!--{loop $_G['setting']['topnavs'][1] $nav}-->
  72.       <!--{if $nav['available'] && (!$nav['level'] || ($nav['level'] == 1 && $_G['uid']) || ($nav['level'] == 2 && $_G['adminid'] > 0) || ($nav['level'] == 3 && $_G['adminid'] == 1))}-->$nav[code]<!--{/if}-->
  73.      <!--{/loop}--></p><p>     <!--框屏窄屏切换-->
  74.      <!--{if empty($_G['disabledwidthauto']) && $_G['setting']['switchwidthauto']}-->
  75.       <a href="javascript:;" id="switchwidth" onclick="widthauto(this)" title="{if widthauto()}{lang switch_narrow}{else}{lang switch_wide}{/if}" class="switchwidth"><!--{if widthauto()}-->{lang switch_narrow}<!--{else}-->{lang switch_wide}<!--{/if}--></a>
  76.      <!--{/if}-->
  77.      
  78.      <!--DIY按钮-->
  79.      <!--{if $_G['uid'] && !empty($_G['style']['extstyle'])}--><a id="sslct" href="javascript:;" onmouseover="delayShow(this, function() {showMenu({'ctrlid':'sslct','pos':'34!'})});">{lang changestyle}</a><!--{/if}-->
  80.      <!--{if check_diy_perm($topic)}-->
  81.       $diynav
  82.      <!--{/if}-->
  83.     </div>
  84.    </div>
  85.   </div></p><p>  <!--{if !IS_ROBOT}-->
  86.    <!--{if $_G['uid']}-->
  87.    
  88.    <!--消息提醒下拉菜单-->
  89.    <ul id="myprompt_menu" class="p_pop" style="display: none;">
  90.     <li><a href="home.php?mod=space&do=pm" id="pm_ntc" style="background-repeat: no-repeat; background-position: 0 50%;"><em class="prompt_news{if empty($_G[member][newpm])}_0{/if}"></em>{lang pm_center}</a></li></p><p>     <li><a href="home.php?mod=follow&do=follower"><em class="prompt_follower{if empty($_G[member][newprompt_num][follower])}_0{/if}"></em><!--{lang notice_interactive_follower}-->{if $_G[member][newprompt_num][follower]}($_G[member][newprompt_num][follower]){/if}</a></li></p><p>    <!--{if $_G[member][newprompt] && $_G[member][newprompt_num][follow]}-->
  91.      <li><a href="home.php?mod=follow"><em class="prompt_concern"></em><!--{lang notice_interactive_follow}-->($_G[member][newprompt_num][follow])</a></li>
  92.     <!--{/if}-->
  93.     <!--{if $_G[member][newprompt]}-->
  94.      <!--{loop $_G['member']['category_num'] $key $val}-->
  95.       <li><a href="home.php?mod=space&do=notice&view=$key"><em class="notice_$key"></em><!--{echo lang('template', 'notice_'.$key)}-->(<span class="rq">$val</span>)</a></li>
  96.      <!--{/loop}-->
  97.     <!--{/if}-->
  98.     <!--{if empty($_G['cookie']['ignore_notice'])}-->
  99.     <li class="ignore_noticeli"><a href="javascript:;" onclick="setcookie('ignore_notice', 1);hideMenu('myprompt_menu')" title="{lang temporarily_to_remind}"><em class="ignore_notice"></em></a></li>
  100.     <!--{/if}-->
  101.     </ul>
  102.    <!--{/if}-->
  103.    
  104.    <!--风格颜色下拉菜单选择-->
  105.    <!--{if $_G['uid'] && !empty($_G['style']['extstyle'])}-->
  106.     <div id="sslct_menu" class="cl p_pop" style="display: none;">
  107.      <!--{if !$_G[style][defaultextstyle]}--><span class="sslct_btn" onclick="extstyle('')" title="{lang default}"><i></i></span><!--{/if}-->
  108.      <!--{loop $_G['style']['extstyle'] $extstyle}-->
  109.       <span class="sslct_btn" onclick="extstyle('$extstyle[0]')" title="$extstyle[1]"><i style='background:$extstyle[2]'></i></span>
  110.      <!--{/loop}-->
  111.     </div>
  112.    <!--{/if}-->
  113.    
  114.    <!--这里是快捷下拉菜单-->
  115.    <!--{subtemplate common/header_qmenu}-->
  116.   <!--{/if}-->
  117.   
  118.   <!--这里是广告wp a_h-->
  119.   <!--{ad/headerbanner/wp a_h}-->
  120.   <div id="hd">
  121.    <div class="wp">
  122.     <div class="hdc cl">
  123.    
  124.     <!--这里是网站顶部logo-->
  125.      <!--{eval $mnid = getcurrentnav();}-->
  126.      <h2><!--{if !isset($_G['setting']['navlogos'][$mnid])}--><a href="{if $_G['setting']['domain']['app']['default']}http://{$_G['setting']['domain']['app']['default']}/{else}./{/if}" title="$_G['setting']['bbname']">{$_G['style']['boardlogo']}</a><!--{else}-->$_G['setting']['navlogos'][$mnid]<!--{/if}--></h2>
  127.      
  128.      <!--调用模版/登陆信息header_userstatus-->
  129.      <!--{template common/header_userstatus}-->
  130.     </div></p><p>    <div id="nv">
  131.    
  132.      <!--这里是快捷菜单按钮-->
  133.      <a href="javascript:;" id="qmenu" onmouseover="delayShow(this, function () {showMenu({'ctrlid':'qmenu','pos':'34!','ctrlclass':'a','duration':2});showForummenu($_G[fid]);})">{lang my_nav}</a>
  134.      <ul>
  135.      
  136.       <!--这里是导航菜单-->
  137.       <!--{loop $_G['setting']['navs'] $nav}-->
  138.        <!--{if $nav['available'] && (!$nav['level'] || ($nav['level'] == 1 && $_G['uid']) || ($nav['level'] == 2 && $_G['adminid'] > 0) || ($nav['level'] == 3 && $_G['adminid'] == 1))}--><li {if $mnid == $nav[navid]}class="a" {/if}$nav[nav]></li><!--{/if}-->
  139.       <!--{/loop}-->
  140.      </ul>
  141.      
  142.      <!--插件钩子global_nav_extra-->
  143.      <!--{hook/global_nav_extra}-->
  144.     </div>
  145.    
  146.     <!--插件下拉菜单-->
  147.     <!--{if !empty($_G['setting']['plugins']['jsmenu'])}-->
  148.      <ul class="p_pop h_pop" id="plugin_menu" style="display: none">
  149.      <!--{loop $_G['setting']['plugins']['jsmenu'] $module}-->
  150.        <!--{if !$module['adminid'] || ($module['adminid'] && $_G['adminid'] > 0 && $module['adminid'] >= $_G['adminid'])}-->
  151.        <li>$module[url]</li>
  152.        <!--{/if}-->
  153.      <!--{/loop}-->
  154.      </ul>
  155.     <!--{/if}-->
  156.     <!--二级竖排导航-->
  157.     $_G[setting][menunavs]
  158.    
  159.     <!--二级横排导航-->
  160.     <div id="mu" class="cl">
  161.     <!--{if $_G['setting']['subnavs']}-->
  162.      <!--{loop $_G[setting][subnavs] $navid $subnav}-->
  163.       <!--{if $_G['setting']['navsubhover'] || $mnid == $navid}-->
  164.       <ul class="cl {if $mnid == $navid}current{/if}" id="snav_$navid" style="display:{if $mnid != $navid}none{/if}">
  165.       $subnav
  166.       </ul>
  167.       <!--{/if}-->
  168.      <!--{/loop}-->
  169.     <!--{/if}-->
  170.     </div>
  171.    
  172.     <!--这里是广告wp a_mu->
  173.     <!--{ad/subnavbanner/a_mu}-->
  174.    
  175.     <!--调用模版/搜索框pubsearchform-->
  176.     <!--{subtemplate common/pubsearchform}-->
  177.    </div>
  178.   </div>
  179.   
  180.   <!--插件钩子global_header-->
  181.   <!--{hook/global_header}-->
  182. <!--{/if}-->
  183. <div id="wp" class="wp">
复制代码
  1. <p><!--{if $_G['uid']}-->
  2. <div id="um"></p><p> <!--调用用户头像-->
  3. <div class="avt y"><a href="home.php?mod=space&uid=$_G[uid]"><!--{avatar($_G[uid],small)}--></a></div>
  4. <p>

  5.   <!--判断是否用QQ登陆-->
  6.   <strong class="vwmy{if $_G['setting']['connect']['allow'] && $_G[member][conisbind]} qq{/if}"><a href="home.php?mod=space&uid=$_G[uid]" target="_blank" title="{lang visit_my_space}">{$_G[member][username]}</a></strong></p><p>  <!--用户在线隐身切换-->
  7.   <!--{if $_G['group']['allowinvisible']}-->
  8.   <span id="loginstatus">
  9.    <a id="loginstatusid" href="member.php?mod=switchstatus" title="{lang login_switch_invisible_mode}" onclick="ajaxget(this.href, 'loginstatus');return false;" class="xi2"></a>
  10.   </span>
  11.   <!--{/if}-->
  12.   
  13.   <!--插件钩子global_usernav_extra1-->
  14.   <!--{hook/global_usernav_extra1}-->
  15.   
  16.   <span class="pipe">|</span>
  17.   
  18.   <!--插件钩子global_usernav_extra4-->
  19.   <!--{hook/global_usernav_extra4}-->
  20.   
  21.   <!--用户设置-->
  22.   <a href="home.php?mod=spacecp">{lang setup}</a>
  23.   
  24.   <!--用户消息-->
  25.   <span class="pipe">|</span><a href="home.php?mod=space&do=pm" id="pm_ntc"{if $_G[member][newpm]} class="new"{/if}>{lang pm_center}</a>
  26.   
  27.   <!--用户提醒-->
  28.   <span class="pipe">|</span><a href="home.php?mod=space&do=notice" id="myprompt"{if $_G[member][newprompt]} class="new"{/if} onmouseover="showMenu({'ctrlid':'myprompt'});">{lang remind}<!--{if $_G[member][newprompt]}-->($_G[member][newprompt])<!--{/if}--></a><span id="myprompt_check"></span>
  29.   <!--{if empty($_G['cookie']['ignore_notice']) && ($_G[member][newpm] || $_G[member][newprompt_num][follower] || $_G[member][newprompt_num][follow] || $_G[member][newprompt])}--><script language="javascript">delayShow($('myprompt'), function() {showMenu({'ctrlid':'myprompt','duration':3})});</script><!--{/if}--></p><p>  <!--论坛任务-->
  30.   <!--{if $_G['setting']['taskon'] && !empty($_G['cookie']['taskdoing_'.$_G['uid']])}--><span class="pipe">|</span><a href="home.php?mod=task&item=doing" id="task_ntc" class="new">{lang task_doing}</a><!--{/if}--></p><p>  <!--门户管理-->
  31.   <!--{if ($_G['group']['allowmanagearticle'] || $_G['group']['allowpostarticle'] || $_G['group']['allowdiy'] || getstatus($_G['member']['allowadmincp'], 4) || getstatus($_G['member']['allowadmincp'], 6) || getstatus($_G['member']['allowadmincp'], 2) || getstatus($_G['member']['allowadmincp'], 3))}-->
  32.    <span class="pipe">|</span><a href="portal.php?mod=portalcp"><!--{if $_G['setting']['portalstatus'] }-->{lang portal_manage}<!--{else}-->{lang portal_block_manage}<!--{/if}--></a>
  33.   <!--{/if}--></p><p>  <!--板块管理-->
  34.   <!--{if $_G['uid'] && $_G['group']['radminid'] > 1}-->
  35.    <span class="pipe">|</span><a href="forum.php?mod=modcp&fid=$_G[fid]" target="_blank">{lang forum_manager}</a>
  36.   <!--{/if}--></p><p>  <!--云平台-->
  37.   <!--{if $_G['uid'] && $_G['adminid'] == 1 && $_G['setting']['cloud_status']}-->
  38.    <span class="pipe">|</span><a href="admin.php?frames=yes&action=cloud&operation=applist" target="_blank">{lang cloudcp}</a>
  39.   <!--{/if}-->
  40.   
  41.   <!--后台管理-->
  42.   <!--{if $_G['uid'] && getstatus($_G['member']['allowadmincp'], 1)}-->
  43.    <span class="pipe">|</span><a href="admin.php" target="_blank">{lang admincp}</a>
  44.   <!--{/if}-->
  45.   
  46.   <!--插件钩子global_usernav_extra2-->
  47.   <!--{hook/global_usernav_extra2}-->
  48.   
  49.   <!--用户退出-->
  50.   <span class="pipe">|</span><a href="member.php?mod=logging&action=logout&formhash={FORMHASH}">{lang logout}</a>
  51. </p>
  52. <p>

  53.   <!--插件钩子global_usernav_extra3-->
  54.   <!--{hook/global_usernav_extra3}-->
  55.   <a href="home.php?mod=spacecp&ac=credit&showcredit=1" id="extcreditmenu"{if !$_G[setting][bbclosed]} onmouseover="delayShow(this, showCreditmenu);" class="showmenu"{/if}>{lang credits}: $_G[member][credits]</a>
  56.   <span class="pipe">|</span><a href="home.php?mod=spacecp&ac=usergroup" id="g_upmine" class="showmenu" onmouseover="delayShow(this, showUpgradeinfo)">{lang usergroup}: $_G[group][grouptitle]</a>
  57. </p>
  58. </div>
  59. <!--{elseif !empty($_G['cookie']['loginuser'])}-->
  60. <p>
  61. <strong><a id="loginuser" class="noborder"><!--{echo dhtmlspecialchars($_G['cookie']['loginuser'])}--></a></strong>
  62. <span class="pipe">|</span><a href="member.php?mod=logging&action=login" onclick="showWindow('login', this.href)">{lang activation}</a>
  63. <span class="pipe">|</span><a href="member.php?mod=logging&action=logout&formhash={FORMHASH}">{lang logout}</a>
  64. </p>
  65. <!--{elseif !$_G[connectguest]}-->
  66. <!--{template member/login_simple}-->
  67. <!--{else}-->
  68. <div id="um">
  69. <div class="avt y"><!--{avatar(0,small)}--></div>
  70. <p>
  71.   <strong class="vwmy qq">{$_G[member][username]}</strong>
  72.   <!--{hook/global_usernav_extra1}-->
  73.   <span class="pipe">|</span><a href="member.php?mod=logging&action=logout&formhash={FORMHASH}">{lang logout}</a>
  74. </p>
  75. <p>
  76.   <a href="home.php?mod=spacecp&ac=credit&showcredit=1">{lang credits}: 0</a>
  77.   <span class="pipe">|</span>{lang usergroup}: $_G[group][grouptitle]
  78. </p>
  79. </div>
  80. <!--{/if}--> </p>
复制代码
原文出自:http://www.exceltop.com





上一篇:Discuz! X系列任意版本到 Discuz! X3.1 升级图文教程
下一篇:discuz! X2.5 及X2系列头部登陆框美化 懒人包

大神点评2

v4521 发表于 2014-4-6 16:15:09 [模板制作修改] 显示全部楼层
文章不错,有一定吸引力。
chinayikao 发表于 2014-10-29 14:20:39 [模板制作修改] 显示全部楼层
非常不错,学习了!
您需要登录后才可以回帖 登录 | 快速注册

本版积分规则

快速回复 返回顶部 返回列表