您的位置:首页 > 其它

【项目开发】 Discuz 头部和尾部模板修改

2014-08-09 16:36 429 查看
文件注释说明:

1. 头部文件修改注释

<!--**********************Header.htm模板注释开始*********************************-->

<!--*XHTML DTD声明不可改动*-->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<htmlxmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type"content="text/html; charset=$charset" />

<!--*$navtitle:当前页面的导航, $bbname:站点名称,$seotitle:标题附加字*-->

<title>$navtitle $bbname$seotitle - Powered byDiscuz!</title>

<!--*其他头部信息感谢CS1.3指正*-->

$seohead

<!--*关键字部分这块基本不需要动了 直接后台可以设置的*-->

<meta name="keywords"content="{$metakeywords}$seokeywords" />

meta name="description" content="$metadescription $bbname$seodescription - Discuz! Board" />

<meta name="generator" content="Discuz!$version" />

<meta name="author" content="Discuz! Team andComsenz UI Team" />

<meta name="copyright" content="2001-2009Comsenz Inc." />

<meta name="MSSmartTagsPreventParsing"content="True" />

<meta http-equiv="MSThemeCompatible"content="Yes" />

<meta http-equiv="x-ua-compatible"content="ie=7" />

<!--无图版(achiever)链接-->

link rel="archives" title="$bbname" href="{$boardurl}archiver/"/>

<!--*RSS链接*-->

$rsshead

<!--*未知变量 暂时保留*-->

$extrahead

<!--*载入CSS模板 不可改动*-->

{csstemplate}

<!--*一些全局变量 不可改动*-->

<scripttype="text/javascript">var STYLEID = '{STYLEID}',IMGDIR = '{IMGDIR}', VERHASH = '{VERHASH}', charset = '$charset',discuz_uid =$discuz_uid, cookiedomain = '$cookiedomain', cookiepath ='$cookiepath', attackevasive
= '$attackevasive', disallowfloat ='$disallowfloat', creditnotice = '{if$creditnotice}$creditnames{/if}', {if in_array(CURSCRIPT,array('viewthread', 'forumdisplay'))}gid =parseInt('$thisgid'){elseif CURSCRIPT == 'index'}gid =parseInt('$gid'){else}gid = 0{/if},
fid = parseInt('$fid'), tid =parseInt('$tid')</script>

<!--*{$jspath}:后台>全局>优化设置>服务器优化>JavaScript脚本目录*-->

<script type="text/javascript"src="{$jspath}common.js?{VERHASH}"></script>

</head>

<body id="{CURSCRIPT}"onkeydown="if(event.keyCode==27) returnfalse;">

<!--*浮动窗和一些载入动作*-->

<divid="append_parent"></div><divid="ajaxwaitid"></div>

<div id="header">

<divclass="wrap s_clear">

<!--*$indexname为后台设置的首页文件名,{BOARDLOGO}为站点logo,在风格编辑中修改*-->

<h2><ahref="$indexname"title="$bbname">{BOARDLOGO}</a></h2>

<!--*用户工具栏开始*-->

<divid="umenu">

<!--*判断是否已登录这里是已登录*-->

<!--{if$discuz_uid}-->

<!--*用户名*-->

<cite><ahref="space.php?uid=$discuz_uid"class="noborder">$discuz_userss</a>

<!--*如果当前用户的用户组允许隐身 就显示在线/隐身切换链接*-->

<!--{if$allowinvisible}--><spanid="loginstatus"><!--{if!empty($invisible)}--><ahref="member.php?action=switchstatus" onclick="ajaxget(this.href,'loginstatus');doane(event);">{langlogin_invisible_mode}</a><!--{else}--><ahref="member.php?action=switchstatus"
title="{langlogin_switch_invisible_mode}" onclick="ajaxget(this.href,'loginstatus');doane(event);">{langlogin_normal_mode}</a><!--{/if}--></span><!--{/if}--></cite>

<spanclass="pipe">|</span>

<!--*判断如果UCenter中存在UCHome应用 就显示该用户个人空间链接UCHome是优先的.*-->

<!--{if$ucappopen['UCHOME']}-->

<ahref="{$uchomeurl}/space.php?uid=$discuz_uid"target="_blank">{langspace_short}</a>

<!--*判断如果UCenter中存在X-Space应用 就显示该用户个人空间链接如果想要默认为XSpace的 可以调转下和UCHome判断的顺序*-->

<!--{elseif$ucappopen['XSPACE']}-->

<ahref="{$xspaceurl}/?uid-$discuz_uid"target="_blank">{langspace_short}</a>

<!--{/if}-->

<!--*"提醒"的链接是判断当*-->

<aid="myprompt" href="notice.php"

<!--*判断如果有新提醒 当鼠标移到上边就弹出菜单*-->

<!--{if$prompt}-->class="new"onmouseover="showMenu({'ctrlid':this.id})"<!--{/if}-->>{langnotice}</a>

<!--*当有新提醒的时候显示红色信封*-->

<spanid="myprompt_check"></span>

<!--*短消息链接*-->

<ahref="pm.php" id="pm_ntc" target="_blank">{langpm_center}</a>

<!--*判断如果开启了论坛任务就显示论坛任务链接*-->

<!--{if$taskon}-->

<aid="task_ntc"

<!--*判断如果当前用户有未完成的任务显示未完成任务图标和进行中任务链接*-->

{if$doingtask}href="task.php?item=doing" class="new" title="{langtask_unfinish}"{else}href="task.php"{/if}target="_blank">{langtask}</a>

<!--{/if}-->

<spanclass="pipe">|</span>

<!--*个人中心链接*-->

<ahref="memcp.php">{languser_center}</a>

<!--*判断当前用户的管理组为版主或超级版主时显示modcp.php版主管理面板*-->

<!--{if$discuz_uid && $adminid> 1}--><ahref="modcp.php?fid=$fid" target="_blank">{langmodcp}</a><!--{/if}-->

<!--*判断当前用户的管理组为管理员时显示admincp.php系统设置*-->

<!--{if$discuz_uid && $adminid ==1}--><a href="admincp.php"target="_blank">{langadmincp}</a><!--{/if}-->

<ahref="logging.php?action=logout&formhash={FORMHASH}">{langlogout}</a>

<!--*当前用户如果为从其他应用(比如UCHome)过来论坛登录的就显示需要先激活验证*-->

<!--{elseif!empty($_DCOOKIE['loginuser'])}-->

<cite><aid="loginuser"class="noborder">$_DCOOKIE['loginuser']</a></cite>

<ahref="logging.php?action=login" onclick="showWindow('login',this.href);return false;">{langactivation}</a>

<ahref="logging.php?action=logout&formhash={FORMHASH}">{langlogout}</a>

<!--*游客状态下 显示注册登陆链接.$regname和$reglinkname为后台自定义的注册链接文字和注册文件名*-->

<!--{else}-->

<ahref="$regname" onclick="showWindow('register', this.href);returnfalse;"class="noborder">$reglinkname</a>

<ahref="logging.php?action=login" onclick="showWindow('login',this.href);return false;">{langlogin}</a>

<!--{/if}-->

</div>

<!--*头部广告位*-->

<divid="ad_headerbanner"><!--{if $admode&&!empty($advlist['headerbanner'])}-->$advlist[headerbanner]<!--{/if}--></div>

<!--*导航栏开始*-->

<divid="menu">

<ul>

<!--*判断是否开启了分栏模式 开启的话就在导航栏加入分栏链接*-->

<!--{if$_DCACHE['settings']['frameon'] >0}-->

<li>

<spanclass="frameswitch">

<!--*判断当前用户分栏状态来切换平板模式和分栏模式链接*-->

<scripttype="text/javascript">

if(top == self) {

{if($_DCACHE['settings']['frameon'] == 2&& !defined('CACHE_FILE')&& in_array(CURSCRIPT,array('index', 'forumdisplay', 'viewthread'))&& (($_DCOOKIE['frameon'] == 'yes'&& $_GET['frameon'] !=
'no') ||(empty($_DCOOKIE['frameon']) &&empty($_GET['frameon']))))}

top.location='frame.php?frameon=yes&referer='+escape(self.location);

{/if}

//分栏模式

document.write('<ahref="frame.php?frameon=yes" target="_top"class="frameon">{langframeon_column}<\/a>');

} else {

//平板模式

document.write('<ahref="frame.php?frameon=no" target="_top"class="frameoff">{langframeon_flat}<\/a>');

}

</script>

</span>

</li>

<!--{/if}-->

<!--*这部分一些变量有待确认*-->

<!--{loop$navs $id $nav}-->

<!--*$id == 3为插件*-->

<!--{if $id ==3}-->

<!--*判断插件如果在后台设置为在导航栏显示,而不是加入插件菜单项目,那么就以平板导航样式显示在导航栏上感谢CS1.3指正*-->

<!--{if!empty($plugins['jsmenu'])}-->

$nav[nav]

<!--{/if}-->

<!--*插件下拉菜单*-->

<!--{if!empty($plugins['links'])}-->

<!--{loop$plugins['links'] $module}-->

<!--{if !$module['adminid'] ||($module['adminid'] && $adminid> 0 &&$module['adminid'] >=$adminid)}--><li>$module[url]</li><!--{/if}-->

<!--{/loop}-->

<!--{/if}-->

<!--{else}-->

<!--*判断当前导航栏允许使用的用户组CS1.3*-->

<!--{if !$nav['level'] ||($nav['level'] == 1 && $discuz_uid)|| ($nav['level'] == 2 && $adminid> 0) || ($nav['level'] == 3&& $adminid ==1)}-->$nav[nav]<!--{/if}-->

<!--{/if}-->

<!--{/loop}-->

<!--*判断当前页面是否属于“$BASEFILENAME ”,如果是的话,导航菜单背景高亮感谢CS1.3*-->

<!--{ifin_array($BASEFILENAME, $navmns)}-->

{eval $mnid = $BASEFILENAME;}

<!--{elseif$navmngs[$BASEFILENAME]}-->

<!--{loop $navmngs[$BASEFILENAME]$navmng}-->

<!--{if $navmng[0] ==array_intersect_assoc($navmng[0], $_GET)}-->{eval$mnid =$navmng[1];}<!--{/if}-->

<!--{/loop}-->

<!--{/if}-->

</ul>

<!--*如果当前链接存在于导航栏中导航背景高亮*-->

<scripttype="text/javascript">

varcurrentMenu = $('mn_$mnid') ? $('mn_$mnid') :$('mn_$navmns[0]');

currentMenu.parentNode.className= 'current';

</script>

</div>

<!--*风格切换按钮JavaScript不可改动*-->

<!--{if!empty($stylejumpstatus)}-->

<scripttype="text/javascript">

functionsetstyle(styleid) {

str = ('{echo str_replace("'", "\\'",urlencode($_SERVER[QUERY_STRING]))}');

str =str.replace(/(^|&)styleid=\d+/ig, '');

str = (str != '' ? str + '&' :'') + 'styleid=' + styleid;

location.href = '$BASESCRIPT?' + str;

}

</script>

<ulid="style_switch">

<!--{loop$styles $id $stylename}-->

<li{if$id == STYLEID}class="current"{/if}><a href="###"onclick="setstyle($id)" title="$stylename" style="background:$styleicons[$id];">$stylename</a></li>

<!--{/loop}-->

</ul>

<!--{/if}-->

</div>

<!--*"提醒"的弹出菜单*-->

<divid="myprompt_menu" style="display:none"class="promptmenu">

<divclass="promptcontent">

<ulclass="s_clear">

<!--{loop$prompts $promptkey $promptdata}-->

<!--{if$promptkey}-->

<!--*通知类型和数量*-->

<li{if!$promptdata[new]} style="display:none"{/if}<aid="prompt_$promptkey" href="{if$promptdata[script]}$promptdata[script]{else}notice.php?filter=$promptkey{/if}"target="_blank">$promptdata[name]($promptdata[new])</a></li><!--{/if}-->

<!--{/loop}-->

</ul>

</div>

</div>

</div>

<!--*Discuz插件钩子详见相关插件开发手册*-->

$pluginhooks[global_header]

<!--**********************Header.htm模板注释结束*********************************-->

复制代码
2. 尾部文件修改注释

<!--**********************Footer.htm模板注释开始*********************************-->

</div>

<!--*载入下拉菜单jsmenu.htm*-->

{subtemplate jsmenu}

<!--*判断新手任务如果未完成载入task_newbie_js.htm*-->

<!--{if $prompts['newbietask']&&$newbietasks}-->{templatetask_newbie_js}<!--{/if}-->

<!--*页尾通栏广告位*-->

<!--{if $admode&&!empty($advlist)}-->

<div class="ad_footerbanner"id="ad_footerbanner1">$advlist[footerbanner1]</div><!--{if$advlist[footerbanner2]}--><divclass="ad_footerbanner"id="ad_footerbanner2">$advlist[footerbanner2]</div><!--{/if}--><!--{if$advlist[footerbanner3]}--><divclass="ad_footerbanner"id="ad_footerbanner3">$advlist[footerbanner3]</div><!--{/if}-->

<!--{else}-->

<divid="ad_footerbanner1"></div><divid="ad_footerbanner2"></div><divid="ad_footerbanner3"></div>

<!--{/if}-->

<!--*Discuz插件钩子详见相关插件开发手册*-->

$pluginhooks[global_footer]

<!--*底部信息部分*-->

<div id="footer">

<div class="wraps_clear">

<!--*右侧*-->

<divid="footlink">

<p>

<!--*$siteurl:网站URL,$sitename:网站名称.在后台>全局>站点信息中设置*-->

<strong><ahref="$siteurl"target="_blank">$sitename</a></strong>

<!--*判断如果填写了网站备案信息代码就显示*-->

<!--{if$icp}-->( <ahref="http://www.miibeian.gov.cn/"target="_blank">$icp</a>)<!--{/if}-->

<spanclass="pipe">|</span>

<!--*联系我们$adminemail在config.inc.php中修改*-->

<ahref="{lang'>mailto:$adminemail">{langcontactus}</a>

<!--*判断当前用户的用户组是否允许查看论坛统计*-->

<!--{if$allowviewstats}--><spanclass="pipe">|</span><ahref="stats.php">{langstats}</a><!--{/if}-->

<!--*判断是否启用了achiever*-->

<!--{if$archiverstatus}--><spanclass="pipe">|</span><ahref="archiver/"target="_blank">Archiver</a><!--{/if}-->

<!--*判断是否启用了WAP功能*-->

<!--{if$wapstatus}--><spanclass="pipe">|</span><ahref="wap/"target="_blank">WAP</a><!--{/if}-->

<!--*第三方统计代码*-->

<!--{if$statcode}--><spanclass="pipe">|$statcode</span><!--{/if}-->

$pluginhooks[global_footerlink]

</p>

<pclass="smalltext">

<!--*当前时间*-->

{langtime_now}

<!--*判断是否显示程序运行信息*-->

<!--{ifdebuginfo()}-->, <spanid="debuginfo">Processed in $debuginfo[time]second(s), $debuginfo[queries] queries

<!--*判断是否开启了内置Gzip压缩*-->

<!--{if$gzipcompress}-->, Gzipenabled<!--{/if}--></span><!--{/if}-->.

</p>

</div>

<!--*左侧*-->

<divid="rightinfo">

<!--*Discuz版权信息*-->

<p>Powered by<strong><ahref="http://www.discuz.net"target="_blank">Discuz!</a></strong><em>$version</em>

<!--*如果为授权客户在后台可以开启显示授权信息*-->

<!--{if!empty($boardlicensed)}--> <ahref="http://license.comsenz.com/?pid=1&host=$_SERVER[HTTP_HOST]"target="_blank">Licensed</a><!--{/if}--></p>

<!--*Comsenz版权信息*-->

<pclass="smalltext">© 2001-2009<a href="http://www.comsenz.com"target="_blank">ComsenzInc.</a></p>

</div>

{evalupdatesession();}

</div>

</div>

<!--*判断如果开启了分栏模式就加载iframe.js*-->

<!--{if $_DCACHE['settings']['frameon']&& in_array(CURSCRIPT,array('index', 'forumdisplay', 'viewthread'))&& $_DCOOKIE['frameon'] =='yes'}-->

<script type="text/javascript"src="{$jspath}iframe.js?{VERHASH}"></script>

<!--{/if}-->

{eval output();}

</body>

</html>

<!--**********************Footer.htm模板注释结束*********************************-->
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: