[geeklog-devel] The Mysterious Case of the Double Blocks (was 1.5.1 - what's left to do?)

Michael Jervis mjervis at gmail.com
Sat Aug 16 12:56:10 EDT 2008


Right I've tidied this all up.

show_right_blocks_in_footer if reversed (i.e. set to 0) includes them
in the header. Otherwise they are in the footer. Unless COM_siteFooter
was called with -1 (or the default), unless show_right_blocks is set
to true, in which case it overrides the value the software passed in.

$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.

Commit to follow a bit more testing.

Ow.

Mike



More information about the geeklog-devel mailing list