For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > June 2005 > Re: [PEAR] HTML_Template_Sigma









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PEAR] HTML_Template_Sigma
Alexey Borzov

2005-06-06, 8:56 pm

Hi,

Cliff wrote:
> I know I have posted before with a stupid PHP problem that had nothing
> do with PEAR.
> This time, however, I have made sure it is a problem with
> HTML_Template_Sigma, as the looping works fine but the templates
> output is not working as it should.
>
> http://pearbb.net
>
> It shows one (the last) category and 0 forums, while there are in fact
> 3 categories and 5 forums.
>
> http://pearbb.net/Includes/main.phps - the code
> http://pearbb.net/Templates/1/boards.tpl - the template


Well, you never actually loop over a 'rootforums' block. You do
$global->tpl->setCurrentBlock( "rootforums" );
and after that you do
$global->tpl->parseCurrentBlock();
But between these calls you do either
$global->tpl->setCurrentBlock( "linkforums" );
or
$global->tpl->setCurrentBlock( "forums" );
therefore that parseCurrentBlock() loops over either 'linkforums' or 'forums'.

But that's only the part of the problem, I suspect that your /* loop through
forums */ part does not work at all. I can't comment further as I do not know
what junk you actually keep in the database.

> Could someone point out what I have done wrong?


You didn't get yourself a debugger. And didn't even bother to do debug output in
your scripts.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com