Source for file navigation.php

Documentation is available at navigation.php

  1. <?php
  2.  
  3. /* NAP code, called by the "nap" interface class */
  4.  
  5. class pl_olga_vv_navigation {
  6.  
  7. var $_object;
  8.  
  9.  
  10. function pl_olga_vv_navigation() {
  11. $this->_object = null;
  12. }
  13.  
  14.  
  15. function is_internal() {
  16.  
  17. // return true if the current topic should not be displayed by NAP
  18. return false;
  19. }
  20.  
  21.  
  22. function get_leaves() {
  23.  
  24. // list leaves under the current topic. for example:
  25.  
  26. $topic = &$this->_object;
  27. $leaves = array ();
  28. /* if ($articles = mgd_list_topic_articles($topic->id, "reverse created")) {
  29. while ($articles->fetch ()) {
  30. $leaves[$articles->id] = array (
  31. MIDCOM_NAV_SITE => Array (
  32. MIDCOM_NAV_URL => $articles->name.".html",
  33. MIDCOM_NAV_NAME => $articles->title),
  34. MIDCOM_NAV_ADMIN => Array (
  35. MIDCOM_NAV_URL => "view/" . $articles->id,
  36. MIDCOM_NAV_NAME => $articles->title),
  37. MIDCOM_NAV_VISIBLE => ($topic->parameter("pl.olga.vv", "visible")=="false") ? false : true,
  38. MIDCOM_META_CREATOR => $articles->creator,
  39. MIDCOM_META_EDITOR => $articles->revisor,
  40. MIDCOM_META_CREATED => $articles->created,
  41. MIDCOM_META_EDITED => $articles->revised
  42. );
  43. }
  44. }*/
  45. return $leaves;
  46. }
  47.  
  48.  
  49. function get_node() {
  50.  
  51. // information about the current node (topic)
  52. $topic = &$this->_object;
  53. return array (
  54. MIDCOM_NAV_URL => "",
  55. MIDCOM_NAV_NAME => $topic->extra,
  56. MIDCOM_NAV_VISIBLE => ($topic->parameter("pl.olga.vv", "visible") == "false") ? false : true,
  57. MIDCOM_META_CREATOR => $topic->creator,
  58. MIDCOM_META_EDITOR => $topic->revisor,
  59. MIDCOM_META_CREATED => $topic->created,
  60. MIDCOM_META_EDITED => $topic->revised
  61. );
  62. }
  63.  
  64.  
  65. function set_object($object) {
  66.  
  67. debug_add ("Component: setting NAP Element to " . $object->name ." [" . $object->id . "]");
  68. $this->_object = $object;
  69. return true;
  70. }
  71.  
  72.  
  73. function get_current_leaf() {
  74. return $GLOBALS["pl_olga_vv_nap_activeid"];
  75. }
  76.  
  77. } // navigation
  78.  
  79. ?>

Documentation generated on Mon, 21 Nov 2005 18:19:46 +0100 by phpDocumentor 1.3.0RC3