_publisher->show_plugin_name() . " " . $this->_publisher->show_plugin_version() . " cmsdAm plugin!!"; } function graphic_section_tree() { //return $this->cms->sections->section_included; // Get the sorted sections tree $section_tree = $this->cms->sections->section_sorted_tree(); //print_r ($_sections_tree); $n_sections = count($section_tree); $previous_level = 0; $first_element = 1; $last_element = 0; echo ""; echo ""; // Here we have finished. $previous_level = $level; $first_element = 0; } echo "
"; echo "home"; for ($i=0; $i<$n_sections; $i++) { // Scan the sorted section tree echo "
"; if ($i+1 == $n_sections) { // Last element $last_element = 1; $next_element_level = 0; } else { $next_element_level = $this->cms->sections->section_treelevel($section_tree[$i+1]); } $level = $this->cms->sections->section_treelevel($section_tree[$i]); //echo "DEBUG: publisher_plugin: " . $section_tree[$i] . //" level: " . $level . " previous level: " . $previous_level . "
"; // Here we have alla data to begin. if ($first_element == 1) { // First element if ($last_element == 1) { // Last element echo "
"; //echo "First, Last, without childs
\n"; } if ($last_element == 0) { if ($next_element_level>$level) { // We have a child echo "
"; //echo "First, not last, we have a child
\n"; } else { echo "
"; //echo "First, not last, we don't have a child
\n"; } } } else { // Not first element if (($previous_level < $level) || ($level>1)) { // We are a child for ($j=2; $j<=$level; $j++) { echo ""; } if ($last_element == 1) { // Last element echo "
"; //echo "Not first, Last, without childs
\n"; } if ($last_element == 0) { if ($next_element_level>$level) { // We have a child echo "
"; //echo "Not first, not last, we have a child
\n"; } else { echo "
"; //echo "Not first, not last, we don't have a child
\n"; } } } else { // We are not a child if ($last_element == 1) { // Last element echo "
"; //echo "Not first, Last, without childs
\n"; } if ($last_element == 0) { if ($next_element_level>$level) { // We have a child echo "
"; //echo "Not first, not last, we have a child
\n"; } else { echo "
"; //echo "Not first, not last, we don't have a child
\n"; } } } } echo $this->cms->sections->section_llink($section_tree[$i]); echo "
"; } } $this->included->publisher->api = new _Publisher_api; // This is to make variables visible from the api class $this->included->publisher->api->cms = &$cms; $this->included->publisher->api->_publisher = &$this->included->publisher; //echo $this->included->publisher->api->hello_world() . "
\n"; $this->included->publisher->api->graphic_section_tree(); ?>