Page 1 of 1

Structured comments

Posted: Wed Oct 26, 2005 9:59 am
by xfish5
Jcart | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]


Hello, 
i make strctured comments with graphics. Tree view. View without graphics is ok, but i need help with graphic. 
Table in is: ID, ID_REPLY, SUBJECT,...etc. 

Have you please any free resolution or small code snipets on approbation for this problems? 



Thanks for suggestion!

Code: Select all

function echoTree(&$tree) {
   global $gfx_i, $gfx_l, $gfx_t; // This is for grafics view
   static $level = 0;
   
   if(count($tree)) { 
      foreach($tree['childs'] as $id => $node) {
         echo str_repeat('<img src="./gfx/nic.gif" height="21" width="12">', $level);
         echo $node['subject'].' - ID: '.$id.', ID_REPLY: '.$node['id_reply'].'<br />'."\n";
         if(count($node['childs'])) {
            $level++;
            echoTree($node);
            $level--;
         }            
      }
   }   
}

Jcart | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]