- 时间:2019-01-31 02:10 编辑:2KB 来源:2KB.COM 阅读:355
- 扫一扫,手机访问
- 分享
-
扫描二维码,分享到微信
打开微信
使用"扫一扫"
再点击微信界面右上角三个点标志
分享到微信朋友和朋友圈。
摘要:
页头文件路径:template/default/common/header.htm
header.htm文件二次加载的文件有:
template/default/common/header_common.htm 全局公共文件
|--该文件中包含了页面TITLE,对浏
页头文件路径:template/default/common/header.htm header.htm文件二次加载的文件有: template/default/common/header_common.htm 全局公共文件 |--该文件中包含了页面TITLE,对浏览器的申明,以及全局必须存在的基本代码,所以不建议新手修改此文件 template/default/common/header_diy.htm DIY模式时加载的DIY浮层菜单 template/default/common/member/login_simple.htm 右上角迷你登陆框(未登录时调用该文件) </head>以上的代码必须保留,此段代码为所有页面必须使用的脚本、样式载入,去掉后页面将会错误显示!! 除了保留</head>以上的代码,以下代码也是必须存在的 页面中的ajax交互功能必须依赖的代码: <div id="append_parent"></div><div id="ajaxwaitid"></div> DIY功能必须的代码: <!--{if $_GET[&#39;diy&#39;] == &#39;yes&#39; && (CURMODULE == &#39;topic&#39; || $_G[&#39;group&#39;][&#39;allowdiy&#39;]) && !empty($_G[&#39;style&#39;][&#39;tplfile&#39;])}--> <!--{template common/header_diy}--> <!--{/if}--> <!--{if CURMODULE == &#39;topic&#39; && $topic && empty($topic[&#39;useheader&#39;]) && !empty($_G[&#39;style&#39;][&#39;tplfile&#39;]) && ($_G[&#39;group&#39;][&#39;allowdiy&#39;] || $_G[&#39;group&#39;][&#39;allowaddtopic&#39;] && $topic[&#39;uid&#39;] == $_G[&#39;uid&#39;] || $_G[&#39;group&#39;][&#39;allowmanagetopic&#39;])}--> <a id="diy-tg" href="Javascript:openDiy();" title="{lang open_diy}" class="y"><img src="{STATICURL}image/diy/panel-toggle.png" alt="DIY" /></a> <!--{/if}--> 页头广告调用代码:放置于<div id="hd">上面 <!--{ad/headerbanner/wp a_h}--> 导航条当前位置获取代码,必须放置于logo代码前面 <!--{eval $mnid = getcurrentnav();}--> 二级导航调用代码:放置于二级导航代码后面 <!--{ad/subnavbanner/a_mu}--> 页头搜索条代码,根据自己模板的结构设计放到需要的位置即可 <!--{subtemplate common/pubsearchform}--> 全局框架代码,该代码的闭合在footer.htm文件第一行</div>中 <div id="wp" class="wp"> 此外页头文件包含几个插件嵌入点代码,作为一个完整的discuz模板,插件钩子是必须存在的: 顶部导航左嵌入点: <!--{hook/global_cpnav_extra1}--> 顶部导航右嵌入点: <!--{hook/global_cpnav_extra2}--> 右上角登录状态嵌入点(个人设置前面): <!--{hook/global_usernav_extra1}--> 右上角登录状态嵌入点(退出按钮前面): <!--{hook/global_usernav_extra2}--> 右上角登录状态嵌入点(第二行第一位): <!--{hook/global_usernav_extra3}--> 全局页尾 页尾文件路径:template/default/common/footer.htm 页尾文件担负整个模板的重要的收尾工作,如果缺少必须的代码,同样也会导致整个程序各个功能不能正常使用! 页尾文件第一句(必须存在): </div> PS:这个闭合的标签是页头文件的<div id="wp" class="wp"> 站长推荐功能调用代码: <!--{eval $focusid = getfocus_rand($_G[basescript]);}--> <!--{if $focusid !== null}--> <!--{eval $focus = $_G[&#39;cache&#39;][&#39;focus&#39;][&#39;data&#39;][$focusid];}--> <div class="focus" id="sitefocus"> <div class="bm"> <div class="bm_h cl"> <a href="Javascript:;" Onclick="setCOOKIE(&#39;nofocus_$focusid&#39;, 1, $_G[&#39;cache&#39;][&#39;focus&#39;][&#39;COOKIE&#39;]*3600);$(&#39;sitefocus&#39;).style.display=&#39;none&#39;" class="y" title="{lang close}">{lang close}</a> <h2><!--{if $_G[&#39;cache&#39;][&#39;focus&#39;][&#39;title&#39;]}-->{$_G[&#39;cache&#39;][&#39;focus&#39;][&#39;title&#39;]}<!--{else}-->{lang focus_hottopics}<!--{/if}--></h2> </div> <div class="bm_c"> <dl class="xld cl bbda"> <dt><a href="{$focus[&#39;url&#39;]}" class="xi2" target="_blank">$focus[&#39;subject&#39;]</a></dt> <!--{if $focus[image]}--> <dd class="m"><a href="{$focus[&#39;url&#39;]}" target="_blank"><img src="{$focus[&#39;image&#39;]}" alt="$focus[&#39;subject&#39;]" /></a></dd> <!--{/if}--> <dd>$focus[&#39;summary&#39;]</dd> </dl> <p class="ptn hm"><a href="{$focus[&#39;url&#39;]}" class="xi2" target="_blank">{lang focus_show} »</a></p> </div> </div> </div> <!--{/if}--> 全局页尾广告代码调用(必须存在): <!--{ad/footerbanner/wp a_f/1}--><!--{ad/footerbanner/wp a_f/2}--><!--{ad/footerbanner/wp a_f/3}--> <!--{ad/float/a_fl/1}--><!--{ad/float/a_fr/2}--> <!--{ad/couplebanner/a_fl a_cb/1}--><!--{ad/couplebanner/a_fr a_cb/2}--> <!--{ad/cornerbanner/a_cn}--> 页尾插件嵌入点:(必须存在!) <!--{hook/global_footer}--> 页尾左框架版权信息(必须存在) <div id="frt"> <p>Powered by <strong><a href="http://www.discuz.net" target="_blank">Discuz!</a></strong> <em>$_G[&#39;setting&#39;][&#39;version&#39;]</em><!--{if !empty($_G[&#39;setting&#39;][&#39;boardlicensed&#39;])}--> <a href="http://license.comsenz.com/?pid=1&host=$_SERVER[HTTP_HOST]" target="_blank">Licensed</a><!--{/if}--></p> <p class="xs0">© 2001-2011 <a href="http://www.comsenz.com" target="_blank">Comsenz Inc.</a></p> </div> 页尾有框架菜单、备案、执行时间、统计代码 <div id="flk" class="y"> <p> <!--{loop $_G[&#39;setting&#39;][&#39;footernavs&#39;] $nav}--><!--{if $nav[&#39;available&#39;] && ($nav[&#39;type&#39;] && (!$nav[&#39;level&#39;] || ($nav[&#39;level&#39;] == 1 && $_G[&#39;uid&#39;]) || ($nav[&#39;level&#39;] == 2 && $_G[&#39;adminid&#39;] > 0) || ($nav[&#39;level&#39;] == 3 && $_G[&#39;adminid&#39;] == 1)) || !$nav[&#39;type&#39;] && ($nav[&#39;id&#39;] == &#39;stat&#39; && $_G[&#39;group&#39;][&#39;allowstatdata&#39;] || $nav[&#39;id&#39;] == &#39;report&#39; && $_G[&#39;uid&#39;] || $nav[&#39;id&#39;] == &#39;archiver&#39; || $nav[&#39;id&#39;] == &#39;mobile&#39;))}--><!--{if $nav[&#39;id&#39;] == &#39;mobile&#39; && $_G[&#39;setting&#39;][&#39;mobile&#39;][&#39;allowmobile&#39;] != 1}--><!--{eval continue;}--><!--{/if}-->$nav[code]<span class="pipe">|</span><!--{/if}--><!--{/loop}--> <strong><a href="$_G[&#39;setting&#39;][&#39;siteurl&#39;]" target="_blank">$_G[&#39;setting&#39;][&#39;sitename&#39;]</a></strong> <!--{if $_G[&#39;setting&#39;][&#39;icp&#39;]}-->( <a href="http://www.miitbeian.gov.cn/" target="_blank">$_G[&#39;setting&#39;][&#39;icp&#39;]</a> )<!--{/if}--> <!--{hook/global_footerlink}--> <!--{if $_G[&#39;setting&#39;][&#39;statcode&#39;]}-->$_G[&#39;setting&#39;][&#39;statcode&#39;]<!--{/if}--> </p> <p class="xs0"> {lang time_now} <span id="debuginfo"> <!--{if debuginfo()}-->, Processed in $_G[debuginfo][time] second(s), $_G[debuginfo][queries] queries <!--{if $_G[&#39;gzipcompress&#39;]}-->, Gzip On<!--{/if}--><!--{if $_G[&#39;memory&#39;]}-->, <!--{echo ucwords($_G[&#39;memory&#39;])}--> On<!--{/if}-->. <!--{/if}--> </span> </p> </div> 用户活动信息记录代码(必须存在): <!--{eval updatesession();}--> PS:缺少该代码直接导致用户在线时间等信息无法记录 用户升级信息弹出层:(页头右上角用户组连接弹出) <!--{if $upgradecredit !== false}--> <div id="g_upmine_menu" class="tip tip_3" style="display:none;"> <div class="tip_c"> {lang credits} $_G[member][credits], {lang thread_groupupgrade} $upgradecredit {lang credits} </div> <div class="tip_horn"></div> </div> <!--{/if}--> 用户短消息、站点邮件发送触发代码(必须存在) <!--{if !$_G[&#39;setting&#39;][&#39;bbclosed&#39;]}--> <!--{if $_G[uid] && !isset($_G[&#39;COOKIE&#39;][&#39;checkpm&#39;])}--> <script type="text/Javascript" src="home.php?mod=spacecp&ac=pm&op=checknewpm&rand=$_G[timestamp]"></script> <!--{/if}--> <!--{if !isset($_G[&#39;COOKIE&#39;][&#39;sendmail&#39;])}--> <script type="text/Javascript" src="home.php?mod=misc&ac=sendmail&rand=$_G[timestamp]"></script> <!--{/if}--> <!--{/if}--> 使用DIY功能时必须的脚本(必须存在): <!--{if $_GET[&#39;diy&#39;] == &#39;yes&#39;}--> <!--{if (CURMODULE == &#39;topic&#39; || $_G[&#39;group&#39;][&#39;allowdiy&#39;]) && (empty($do) || $do != &#39;index&#39;) && !empty($_G[&#39;style&#39;][&#39;tplfile&#39;])}--> <script type="text/Javascript" src="{$_G[setting][jspath]}common_diy.js?{VERHASH}"></script> <script type="text/Javascript" src="{$_G[setting][jspath]}portal_diy.js?{VERHASH}"></script> <!--{/if}--> <!--{if $space[&#39;self&#39;] && CURMODULE == &#39;space&#39; && $do == &#39;index&#39;}--> <script type="text/Javascript" src="{$_G[setting][jspath]}common_diy.js?{VERHASH}"></script> <script type="text/Javascript" src="{$_G[setting][jspath]}space_diy.js?{VERHASH}"></script> <!--{/if}--> <!--{/if}--> 用户提醒功能状态变更(必须存在): <!--{if $_G[&#39;member&#39;][&#39;newprompt&#39;] && (empty($_G[&#39;COOKIE&#39;][&#39;promptstate_&#39;.$_G[uid]]) || $_G[&#39;COOKIE&#39;][&#39;promptstate_&#39;.$_G[uid]] != $_G[&#39;member&#39;][&#39;newprompt&#39;]) && $_G[&#39;gp_do&#39;] != &#39;notice&#39;}--> <script type="text/Javascript">noticeTitle();</script> <!--{/if}--> 漫游通知触发代码:(管理员下弹出漫游通知) <!--{eval userappprompt();}--> 返回顶部浮动菜单 <!--{if $_G[&#39;basescript&#39;] != &#39;userapp&#39;}--> <span id="scrolltop" Onclick="window.scrollTo(&#39;0&#39;,&#39;0&#39;)">{lang scrolltop}</span> <script type="text/Javascript">_attachEvent(window, &#39;scroll&#39;, function(){showTopLink();});</script> <!--{/if}--> 程序功能最后处理代码(必须存在) <!--{eval output();}--> PS:伪静态、模块更新、Gzip等等

2KB项目(www.2kb.com,源码交易平台),提供担保交易、源码交易、虚拟商品、在家创业、在线创业、任务交易、网站设计、软件设计、网络兼职、站长交易、域名交易、链接买卖、网站交易、广告买卖、站长培训、建站美工等服务