hil...
can someone translate it into english, please?
Thanx in advance,
Mauricio
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:
hi kenchan.
At first, thank you for buying my book.
The codes looks safe enough.
But I think there are no necessity to hack header.php.
<!-- Display left blocks if any -->
<{if count($xoops_lblocks) > 0}>
<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}>
<!-- End left blocks loop -->
</td>
<{/if}>
I'm sorry that I don't check the code woks or not
Thank you for your reply.
This is much clever customizing.
Thnaks.