Re: On and OFF Left Column
List posts in the topic
Re: On and OFF Left Column
msg# 1.1.1
This is the first posting.
I just have read the book 'Customizing XOOPS', Mr.GOTO & Mr.UEMATSU wrote.
It is GREAT, I fully satisfied what I had been in trouble and I can understand systematically about XOOPS.
By the way, I have already made a hack below before I read. And I wonder the hack is all right. I want the best method if it is wrong.
Line 166 of '/xoops/header.php'
-----------------------------------
switch ($block_arr[$i]->getVar('side')) {
case XOOPS_SIDEBLOCK_LEFT:
// begin //
if (!isset($show_lblock)) {
$xoopsTpl->assign('xoops_showlblock', 1);
$show_lblock = 1;
}
// finish //
$xoopsTpl->append('xoops_lblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent));
break;
-------------------------------------
And change the themes file about 'theme.html'
--------------------------------------
<!-- Display left blocks if any -->
// begin //
<{if $xoops_showlblock == 1}>
<td id="leftcolumn">
<!-- Start left blocks loop -->
<{foreach item=block from=$xoops_lblocks}>
<{if $block.title}>
<div align=center class="blockTitle">
<{$block.title}>
</div>
<{/if}>
<div class="blockContent"><{$block.content}></div>
<{/foreach}>
</td>
<{/if}>
<!-- End left blocks loop -->
// finish //
---------------------------------------------------------
This will make no left block if no module block on left block is set. :lol: :lol:
Votes:1
Average:0.00
Posts tree