One problem I often find is the control of blocks.... sometimes, I want to use different blocks for different parts of the site.
With static pages, I have got over this by creating "inline blocks" - basically, parsing the page for [[IB function_name]] and then calling that function and replacing in the block HTML (code coming later).
With plugins, it is a little more difficult. For example, I don't want to show the topics block except when viewing stories - other times, I show my own menu. When browing the links, it is not important that the user knows there is a topic called "dull stories from my last holiday in Bournemouth".
I think the short answer to this is that the option for determining when to show a block (in the block manager) should have the options:
Always (always show the block)
All topics (but not in plugins)
... normal topics listed here.....
To do this, you need to:
1) edit layout/theme/admin/blocks.thtml to add a new "notplugins" category.
2) edit admin/blocks.php to populate the new "notplugins" values.
3) edit lib-common.php (COM_showBlocks) to check for this:
Text Formatted Code
if( !empty( $topic ))
{
$sql .= " AND (tid = '$topic' OR (tid = 'all' AND type <> 'layout') OR (tid = 'notplugins'))";
}
And I think that was all I did. I think this would be useful (and not difficult) to add to Geeklog core. Any takers?
Cheers,
Euan.
-- Heather Engineering
-- No job too small