[geeklog-devel] [geeklog-cvs] Geeklog-1.x

Mark R. Evans mevans at ecsnet.com
Sun Nov 25 19:14:11 EST 2007


Oliver,

I'll see if I can explain this so you can understand it:

You modified COM_siteFooter() to allow the left blocks to be created there
instead of COM_siteHeader.

First, let's look at the parameters that are passed to COM_siteFooter():

* @param   boolean     $rightblock     Whether or not to show blocks on
right hand side default is no
* @param   array       $custom         An array defining custom function to
be used to format Rightblocks

OK, so we can pass a boolean to turn on / off the right blocks and pass a
custom function to format the right blocks.   The first thing you should
notice is that there is no information being passed to control the left
blocks.  That should be your first red flag that this simply won't work, but
let's keep going.

As we move through the code, we get to the part that creates the left
blocks, if first checks to see if $custom is defined.  If so, it does:

        if( is_array( $custom ))
        {
            $function = $custom[0];
            if( function_exists( $function ))
            {
                $lblocks = $function( $custom[1], 'left' );
            }
        }

But wait, I passed a custom function to handle the right blocks, not the
left blocks.  Hmm, this is a problem.

Then, just below that code, you check the following:

    if( $_CONF['right_blocks_in_footer'] == 1 && $rightblock)
    {
        $rblocks = '';

OK, makes sense, if there is something in $rightblocks and we should create
them in the footer call, we need to process.  But what comes next is more
broken code:

        if( is_array( $what ))
        {
            $function = $what[0];
            if( function_exists( $function ))
            {
                $rblocks = $function( $what[1], 'right' );
            }
            else
            {
                $rblocks = COM_showBlocks( 'right', $topic );
            }
        }
$what is never defined in COM_siteFooter().  It doesn't exist.  It does
exist in COM_siteHeader() and that is where it appears this code was
copied.  The desired outcome simply cannot happen because you reference a
variable that doesn't exist in the function.

So, let's recap.  What this patch accomplishes is the ability to build the
left blocks in the footer, but it removes the ability to have any custom
functions to format those left blocks, it removes the ability to dynamically
have either left-content-right or left-content or content-right.  For a
detailed explanation why this won't work you can see my previous post where
all this was detailed out:

http://eight.pairlist.net/pipermail/geeklog-devel/2007-November/002642.html

This post didn't seem to gather much attention as no one bothered to
comment.  I detailed pretty well why your approach won't work in that post,
maybe I just used too many big words.

Please let me know if you need any additional details or additional
explanations.  I'll be happy to walk through the code line by line if
necessary.

Thanks!
Mark

On 11/25/07, Oliver Spiesshofer <oliver at spiesshofer.com> wrote:
>
> Mark R. Evans wrote:
> > Joe,
> > It appears the feature freeze was only limited to some, not all.
> >
> http://eight.pairlist.net/pipermail/geeklog-devel/2007-September/002325.html
> > <
> http://eight.pairlist.net/pipermail/geeklog-devel/2007-September/002325.html
> >
> > - Oliver announces he can make a pure CSS layout.   On Sept 27, he
> > committed the changes:
> >
> http://eight.pairlist.net/pipermail/geeklog-cvs/2007-September/003523.html
> > <
> http://eight.pairlist.net/pipermail/geeklog-cvs/2007-September/003523.html
> >
> > Too bad this particular change doesn't actually work, it just
> > complicates the code and doesn't produce anything useful.
> have discussed with Dirk on this and posted it in a much reduced
> version of what was initially announced, and it works fine. If you have
> problems to get it run I recommend you to discuss technical issues
> instead of accusing people. How often do i have to say this?
> > The XHTML is finally adopted, talk about new features!
> > Let's see, Blaine committed a new feature just this week.  I'm sure I
> > could go dig through CVS and find a few more, but why bother...
> Yeah, why bother if you can just go and complain, why work on something?
> > The reason I am so passionate about this is that there are a few
> > things with Geeklog v1.5 that really bring Geeklog to a point that it
> > is truly an incredible CMS.  The new installation and online
> > configuration are wonderful enhancements that addressed an area where
> > Geeklog needed a shot in the arm.
> > The XHTML capability now opens up Geeklog to some incredible options.
> Why do you complain that it is in the code then?
>
> Oliver
> _______________________________________________
> geeklog-devel mailing list
> geeklog-devel at lists.geeklog.net
> http://eight.pairlist.net/mailman/listinfo/geeklog-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist8.pair.net/pipermail/geeklog-devel/attachments/20071125/5f4503ce/attachment.html>


More information about the geeklog-devel mailing list