1
script_fu
Header-en, Center Block was assigned up and down.

hhttp://linux2.ohwada.net/modules/mydownloads/


//========================================================
// hack version of XOOPS header.php
// 2005-01-10 K.OHWADA
//========================================================

* Change of header.php
There two changes.
It is necessary to also change a theme template,
in order to confirm change.
In addition, you can use the conventional theme template,
although not to confirm change.

(1) Correspond to RSS Auto Discovery.
xoops_rss is asigned for theme templates.

Setted up "RSS 1.1 : XOOPS extention" as a default.
-----
$xoopsTpl->assign('xoops_rss', 'rss.php' );
-----

You can set up XOOPS backend.php.
-----
$xoopsTpl->assign('xoops_rss', 'backend.php' );
-----

(2) Center Block was assigned up and down.
xoops_ccblocks_up and xoops_ccblocks_down are asigned for theme templates.
conventional xoops_ccblocks is asigned too.
If weight value is ten or less, block is assigned to xoops_ccblocks_up.
If it is more than ten, block is assigned to xoops_ccblocks_down.

-----
if ( $block_arr[$i]->getVar('weight') < 10)
{
$xoopsTpl->append('xoops_ccblocks_up', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent));
}
else
{
$xoopsTpl->append('xoops_ccblocks_down', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent));
}
-----

* Change of theme template.
The template "theme.html" of theme "default" was changed.

(1) Correspond to RSS Auto Discovery.

The following is added to theme.html.
-----

-----

(2) Center Block was assigned up and down.
theme.html was changed.

Before change
-----


<{foreach item=block from=$xoops_ccblocks}>
<{include file="default/theme_blockcenter_c.html"}>
<{/foreach}>


-----

After change
-----


<{foreach item=block from=$xoops_ccblocks_up}>
<{include file="default/theme_blockcenter_c.html"}>
<{/foreach}>



:
:



<{foreach item=block from=$xoops_ccblocks_down}>
<{include file="default/theme_blockcenter_c.html"}>
<{/foreach}>


-----

The following is added to style.css.
-----
td#centerCcolumnDown {padding: 0px 3px 1px 3px;}
td#centerCcolumnDown legend.blockTitle {padding: 3px; color: #639ACE; font-weight: bold; margin-top: 0px; margin-right: 0px; margin-left: 0px;}
td#centerCcolumnDown div.blockContent {border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-bottom: 1px solid #dddddd; padding: 3px; margin-right: 0px; margin-left: 0px; margin-bottom: 2px; line-height: 120%;}
-----

(3) template passed W3C Validator.
http://validator.w3.org/


* The enclosed files
- html/header.php
- html/themes/default_k/

2
script_fu
Re: Header-en, Center Block was assigned up and down.

This hack above solves a problem I have had with the center blocks. This should be standard in core and themes...

Login

Who's Online

476 user(s) are online (342 user(s) are browsing Support Forums)


Members: 0


Guests: 476


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits