My projects section.

Body

EDIT: This is an old post. The section has been removed but I am keeping the post nevertheless.
I did it at last.

I aways wanted to create this section since I had foolab.

It's not exactly what I wanted it to be, But It's the best I can do at the moment.

I still need to populate it.

I've created the form using flexinode, Creaed the vocabolary hierarchy.
Overriding the node in my theme so I can display the tags like want.
Now how did I create the page itself ?
Here's the php code, It's not the best but it works:

<?php
echo "<br />";
$arr = taxonomy_get_tree(5,0,-1,1);
$y = count($arr);
for (
$x = 0; $x < $y; $x++)
{
$count = 0;
$ch = taxonomy_get_children($arr[$x]->tid, 5);
//print_r($ch);
$j = count($ch);
$_ch = array();
for (
$i = 0; $i < $j; $i++)
{
$ch_a = array_shift($ch);
$_url = "/taxonomy/term/" . $ch_a->tid;
$_count = taxonomy_term_count_nodes($ch_a->tid);
$count += $_count;
$_name = $ch_a->name . " (" . $_count . ")";
$_ch[] = l($_name, $_url);
}
$url = "/taxonomy/term/" . $arr[$x]->tid;
$name = $arr[$x]->name . " (" . $count . ")";
echo
l($name, $url);
echo
theme_item_list($_ch);
echo
"<br />";
}
?>

Add new comment

The content of this field is kept private and will not be shown publicly.