[geeklog-devel] The Mysterious Case of the Double Blocks (was 1.5.1 - what's left to do?)
Blaine Lang
devel at portalparts.com
Sat Aug 16 15:53:28 EDT 2008
Michael Jervis wrote:
> $what is due to a copy/paste from COM_siteHeader. $what can be 'menu',
> 'none' or an array. 'menu' is the default and all of core except two
> places use it. Those places use 'none' (display no left blocks I
> *think*). No where uses the array option. If $what is an array (in
> COM_siteHeader), $what[0] is a custom block rendering function,
> $what[1] is the first argument and 'right' or 'left' the second.
>
> The same functionality was already available in COM_siteFooter, but
> using the $custom variable.
>
> So the code boils down to:
>
> 1) Insane logic for deciding whether or not to do right blocks.
> 2) Several sets of duplicate logic for deciding what/how to get the right blocks
> 3) Code for rendering the right blocks.
>
> I've turned it into one bit of code, which is all in one place and
> commented and only 24 lines including 1 new 12 line comment block
> explaining it so it doesn't get confusing again.
>
Michael, you will be retaining the support for $what being a custom
function right as thats used in a number of plugins.
- Blaine
More information about the geeklog-devel
mailing list