Extension talk:TreeAndMenu

error messages
I've tried to install it on my wiki but i get a lot of errors when i make a tree-entry on a page. (the tree is properly displayed!) The error messages are similar to this:
 * Notice: Use of undefined constant wgUser - assumed 'wgUser' in /var/www/html/wikidelfia/extensions/Treeview3.php on line 59

In the localsettings I put : include_once('extensions/treeview3.php') and the $wgTreeViewImages = array( with the proper links to the images. What is going wrong? --BB70 11:28, 14 March 2007 (UTC)
 * I know what that is - that's a setting in your php.ini that doesn't allow the array indexes to have their quotes missing - just put quotes around all the arrays, or download again - I've change the code to not depend on that setting now (I think I got them all, here's the diff). --Nad 23:19, 14 March 2007 (UTC)
 * It helps a little.. but i still get errors like: Notice: Undefined index: doc in /var/www/html/wikidelfia/extensions/Treeview3.php on line 84 (same for line 79 till 83) and these two: Notice: Undefined index: openlevels in /var/www/html/wikidelfia/extensions/Treeview3.php on line 85 ; Notice: Undefined offset: 5 in /var/www/html/wikidelfia/extensions/Treeview3.php on line 93. And there is a pop-up box with the message [object error] --BB70 07:42, 16 March 2007 (UTC)
 * You have your settings set extrememly strictly for it not to allow reading uninitialised variables and indexes! Check if it works now, I've made it only read them if they exist. --Nad 09:43, 16 March 2007 (UTC)
 * This works! Thank you for the quick response... --BB70 12:02, 18 March 2007 (UTC)

parameter openlevel
When I use the paramater openlevel=1 (I also tried id=1) the tree stays closed. I tried the example in the article-text with the same result. Is there something else in the configuration I must change to get this work? --BB70 09:11, 19 March 2007 (UTC)
 * I've found the solution... It's not openlevel but openlevels --BB70 09:52, 19 March 2007 (UTC)
 * Sorry about that - typo fixed --Nad 21:00, 19 March 2007 (UTC)

Display only text of first item?
i have done the following:

1) copy and paste treeview3.php into extensions folder

2) include_once('extensions/treeview3.php'); $wgTreeViewImages = array( 'plus' => '/intranet2/mwiki/images/7/72/Arrow-closed.png', 'minus' => '/intranet2/mwiki/images/a/a0/Arrow-open.png', 'opened' => '/intrane2/mwiki/images/4/46/Folder_opn_sml_blu.gif', 'closed' => '/intranet2/mwiki/images/6/6e/Folder_sml_blu.gif', 'doc' => '/intranet2/mwiki/images/e/e3/Doc-icon.gif', 'spacer' => '/intranet2/mwiki/images/c/c0/spacer.png' ); 3) edit a page with following:

but so far all i get is Root displayed as text. i have done chmod 777 for the images above. There is not even an error message shown. Can someone help me? i am using lattest mediawiki with php5, Mysql5 and apache2.
 * If the images aren't showing then the path is probably wrong or the images don't exist, because the wiki must be able to access them since its the one that should have saved them there - have you uploaded them into your wiki and checked that their exact paths in browser properties of the images? --Nad 09:35, 23 March 2007 (UTC)
 * When i put all images file into one single folders, they work.. very strange. But then the tree only work on preview screen. if i click saved, the tree are all expanded and the 'arrow' image clicking give me no response. Is there sth wrong with my wiki installation? i was testing out the "pdf extension" which was experimental exhibit the similar behavior. It seems to me sth is wrong with my wiki setting. it is my first time setting up wiki ....any help appreciated.
 * What's the url of your wiki, I'll have a quick look --Nad 00:58, 26 March 2007 (UTC)
 * i afraid i can't as it is in LAN. Is there any particular file you want to look up ? i can post it here.
 * What it says in special:version is always useful, and the LocalSettings.php file since no other files should have been changed in anyway other than that (apart from the added items in extensions). Also it sounds from what you've said that you're putting the images directly into the file structure - I find it best to use the wiki's "upload file" process instead so you can be sure that they're in the exact state that the wiki needs them in. You can then get the actual file path the wiki's put them at by getting the image's properties in your browser. --Nad 03:14, 26 March 2007 (UTC)


 * Also if you go to a page with a tree, do an edit preview and save the html source of the page that would be useful too because from that I can see both the tree's wikitext and the rendered html result. --Nad 03:28, 26 March 2007 (UTC)
 * I have put the 3 file into text, as they are probably too long to post it out. special_versionsrc_pg_after_click_SavePagePreview_src_page [http://m LocalSettings.php]
 * Besides, my first post make a mistake about the root directory. the wiki root dir is /intranet2/ which is not the same as apache root dir. I imagine it probably be the source of problem. I realize that javascript isn't generated in resultant page.