[geeklog-users] Theming Possibilities

Dirk Haun dirk at haun-online.de
Sun Feb 16 15:36:05 EST 2003


Kyle Rove <krove at pyramid.net> wrote:

>Compare R/L blocks to story blocks, then try and notice that GL's 
>original setup would only allow me to have the same block template for 
>both the main search block and the left blocks (which would have been 
>very ugly).

Are you aware of the "hack" that allows for different left and right
blocks? It's linked from the theme documentation. This may also help here
(see below).


>I modified the call to create the search block to include a 
>different template:
>http://teamtest.the-depths-of-hell.com/geeklog/public_html/search.php

I can't access that page without logging in but I guess what you're
trying to do is to use one set of block header/footer for the actual
blocks in the left and right column and another one for the blocks in the
center / content area.

My "Rude Colors" theme uses a variation of the above-mentioned hack to do
exactly that. In the theme's functions.php, use this:

--- snip ---
$result = DB_query("SELECT onleft,name FROM {$_TABLES['blocks']} WHERE
is_enabled = 1");
$nrows = DB_numRows($result);
for ($i = 1; $i <= $nrows; $i++) {
    $A = DB_fetchArray($result);
    $_BLOCK_TEMPLATE[$A['name']] = 'blockheader-lr.thtml,blockfooter-
lr.thtml'; 
}

$_BLOCK_TEMPLATE['whats_related_block'] = 'blockheader-
lr.thtml,blockfooter-lr.thtml';
$_BLOCK_TEMPLATE['story_options_block'] = 'blockheader-
lr.thtml,blockfooter-lr.thtml';
--- snip ---

No need to modify any of Geeklog's core files ...

bye, Dirk


-- 
http://www.haun-online.de/
http://www.tinyweb.de/




More information about the geeklog-users mailing list