Re: [phpslash-users] Glossary 0.65
Brought to you by:
joestewart,
nhruby
From: Joe S. <jo...@be...> - 2001-12-10 21:48:23
|
Thanks Lars - It's been committed to -ft cvs. On Mon, Dec 10, 2001 at 10:06:37PM +0100, Lars Heuer wrote: > Hi phpSlash Users, > > I changed the Glossary.class. > 1st it has the same fault like Author (missing "?>" at the end of the > class) > > 2nd I think for templates it's better to define two rows, because the > background-color now is defined by the template "glossarySearch.tpl" > not by the Glossary.class. > > Changes in Glossary::searchGlossary($search): > -- > $this->templ->set_block("searchglossary" , "first_row" , "f_rows"); > $this->templ->set_block("searchglossary" , "second_row" , "s_rows"); > $i = 0; > while ($this->db->next_record()) { > if ($i%2 == 0) { > $this->templ->set_var(array( > FIRST_TERM => $this->db->f("term"), > FIRST_DEF => $this->db->f("def") > )); > $this->templ->parse("f_rows","first_row",true); > } > else { > $this->templ->set_var(array( > SECOND_TERM => $this->db->f("term"), > SECOND_DEF => $this->db->f("def") > )); > $this->templ->parse("f_rows","second_row",true); > } > ++$i; > -- > I deleted the variables cellcolor_1 and cellcolor_2, too. > > The changes in glossarySearch.tpl are analogue, it's my XHTML'ed > version. > > I attached the files. > > Regards, > Lars |