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-05, 3:57 pm

Hi,

Cliff wrote:
> I have a problem with HTML_Template_Sigma.
>
> http://pearbb.net
> When you hover over a category link (the orange div ones), it links to
> forum-.php
> It should, however, link to forum-{id}.php
> Something must have gone wrong with setting the variable, as the
> variable itself holds the id correctly.
>
> http://pearbb.net/Includes/main.phps - the code
> http://pearbb.net/Templates/1/boards.tpl - the template
>
> Could somebody please assist me with this?


Your problem has little to do with HTML_Template_Sigma, there is a problem in
your code here:
while( $roots = $result->fetchrow(DB_FETCHMODE_ASSOC) )
{
$this->roots[]['id'] = $roots['id'];
$this->roots[]['name'] = $roots['name'];
}

You get an array of the following structure from this:
array(
array('id' => id),
array('name' => name),
array('id' => id),
array('name' => name)
);

I bet that's not exactly the thing you wanted...

I suggest starting with something less complicated than a full-blown bulletin
board if you want to learn PHP by creating an OpenSource project.
Sponsored Links







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

Copyright 2008 codecomments.com