1 • 将模板复制到您的主题文件夹中(从默认主题)- theme_blockcenter_c
- theme_blockcenter_l
- theme_blockcenter_r
- theme_blockleft.html
- theme_blockright.html
2 • 修改 theme.htmla) HEAD 部分
删除(如果我没弄错,已经被 <{$xoops_module_header}> 调用过了)
<script type="text/javascript">
script>
添加(需要动态调用模块模板)
<{assign var=theme_name value=$xoTheme->folderName}>
b) BODY 部分
替换旧的 canvas 代码为 /默认主题.html 代码
<{if $xoops_showlblock}>
<td id="leftcolumn">
<{foreach item=block from=$xoBlocks.canvas_left}>
<{includeq file="$theme_name/theme_blockleft.html"}>
<{/foreach}>
td>
<{/if}>
<td id="centercolumn">
<{if $xoBlocks.page_topleft or $xoBlocks.page_topcenter or $xoBlocks.page_topright}>
<table cellspacing="0">
<tr>
<td id="centerCcolumn" colspan="2">
<{foreach item=block from=$xoBlocks.page_topcenter}>
<{includeq file="$theme_name/theme_blockcenter_c.html"}>
<{/foreach}>
td>
tr>
<tr>
<td id="centerLcolumn">
<{foreach item=block from=$xoBlocks.page_topleft}>
<{includeq file="$theme_name/theme_blockcenter_l.html"}>
<{/foreach}>
td>
<td id="centerRcolumn">
<{foreach item=block from=$xoBlocks.page_topright}>
<{includeq file="$theme_name/theme_blockcenter_r.html"}>
<{/foreach}>
td>
tr>
table>
<{/if}>
<div id="content">
<{$xoops_contents}>
div>
<{if $xoBlocks.page_bottomleft or $xoBlocks.page_bottomright or $xoBlocks.page_bottomcenter}>
<table cellspacing="0">
<{if $xoBlocks.page_bottomcenter}>
<tr>
<td id="bottomCcolumn" colspan="2">
<{foreach from=$xoBlocks.page_bottomcenter item=block}>
<{include file="$theme_name/theme_blockcenter_c.html"}>
<{/foreach}>
td>
tr>
<{/if}>
<{if $xoBlocks.page_bottomleft or $xoBlocks.page_bottomright}>
<tr>
<td id="bottomLcolumn">
<{foreach from=$xoBlocks.page_bottomleft item=block}>
<{include file="$theme_name/theme_blockcenter_l.html"}>
<{/foreach}>
td>
<td id="bottomRcolumn">
<{foreach from=$xoBlocks.page_bottomright item=block}>
<{include file="$theme_name/theme_blockcenter_r.html"}>
<{/foreach}>
td>
tr>
<{/if}>
table>
<{/if}>
td>
<{if $xoops_showrblock}>
<td id="rightcolumn">
<{foreach item=block from=$xoBlocks.canvas_right}>
<{includeq file="$theme_name/theme_blockright.html"}>
<{/foreach}>
td>
<{/if}>
3 • 模板修改中心模块模板使用以下标签(theme_blockcenter_c.html、theme_blockcenter_l.html 和 theme_blockcenter_r.html)
-
: 删除它
-
: 替换为
4 • 样式表修改a) 模块
重复顶部中心模块的样式
td#centerCcolumn {padding: 0px;}
td#centerCcolumn div.blockTitle {padding: 10px 3px 3px 15px; color: #000000; font-weight: bold; margin-top: 0px; margin-right: 0px; margin-left: 0px;}
td#centerCcolumn div.blockContent {border-bottom: 1px solid #dddddd; padding: 5px 15px; margin-right: 0px; margin-left: 0px; margin-bottom: 3px; line-height: 130%;}
td#centerLcolumn {width: 50%; padding: 0px 3px 0px 0px;}
td#centerLcolumn div.blockTitle {padding: 10px 3px 3px 10px; color: #000000; font-weight: bold; margin-top: 0px;}
td#centerLcolumn div.blockContent {padding: 5px; margin-left: 0px; margin-right: 0px; margin-bottom: 2px; line-height: 120%;}
td#centerRcolumn {width: 50%; padding: 0px 3px 0px 0px;}
td#centerRcolumn div.blockTitle {padding: 10px 3px 3px 10px; color: #000000; font-weight: bold; margin-top: 0px;}
td#centerRcolumn div.blockContent {padding: 5px; margin-left: 0px; margin-right: 0px; margin-bottom: 2px; line-height: 120%;}
将“center”替换为“bottom”,以将相同的样式应用到下方的块中。
例如这样
td#bottomCcolumn {padding: 0px;}
td#bottomCcolumn div.blockTitle {padding: 10px 3px 3px 15px; color: #000000; font-weight: bold; margin-top: 0px; margin-right: 0px; margin-left: 0px;}
td#bottomCcolumn div.blockContent {border-bottom: 1px solid #dddddd; padding: 5px 15px; margin-right: 0px; margin-left: 0px; margin-bottom: 3px; line-height: 130%;}
td#bottomLcolumn {width: 50%; padding: 0px 3px 0px 0px;}
td#bottomLcolumn div.blockTitle {padding: 10px 3px 3px 10px; color: #000000; font-weight: bold; margin-top: 0px;}
td#bottomLcolumn div.blockContent {padding: 5px; margin-left: 0px; margin-right: 0px; margin-bottom: 2px; line-height: 120%;}
td#bottomRcolumn {width: 50%; padding: 0px 3px 0px 0px;}
td#bottomRcolumn div.blockTitle {padding: 10px 3px 3px 10px; color: #000000; font-weight: bold; margin-top: 0px;}
td#bottomRcolumn div.blockContent {padding: 5px; margin-left: 0px; margin-right: 0px; margin-bottom: 2px; line-height: 120%;}
b) 主菜单和用户菜单
为了获得漂亮的菜单,请检查display: block;指令。
引用
引用
#mainmenu a {display: block;}
#usermenu a {display: block;}
如果你更新了一个“旧”主题,最好在评论中添加一个下载链接