Folder-Tree v2.0

Instructions

  1. You only need to edit one file: photosturism.js .
  2. If you want the names of the folders and documents to be links themselves, include
      USETEXTLINKS = 1
    at the top of the file.
  3. Create the root folder with the command foldersTree = gFld("Been There", "photos.html").  'gFld' takes a name and and optional URL, and returns the folder. You can give any name to your root folder.
    Place a folder inside another folder by using the function 'insFld([parent folder], [child folder])'.
  4. To create a document link use the function 'gLnk'. It takes three arguments:

         Doc type: '0' for local documents, '1' for remote docs that open in a new window, '2' for
         remote docs that open in the right frame.
         Title: Text to be displayed in the tree.
         Link: URL of the document

    To place the document inside the tree use the function 'insDoc([parent folder], [document link])'.

  5. If you want to rename this or any other of the files included in the .ZIP, you will have to take in account the file dependencies: ftexample.html includes photosturismLF.html and photos.html; photosturismLF.html includes ftie4style.css, ftiens4.js, and photosturism.js .
  6. The file with the FRAMESET tag is ftexample.html . This version of the script requires that the tree is placed in a frame.

When you're done with the instalation process and your site goes public, please add a link to the script's home page:
http://www.geocities.com/marcelino_martins/foldertree.html
 
 

FAQ

Q: Is there any way of making the tree open folders other than the default on creation time?
A: Yes, you will have to change your version of the photosturismLF.html. Suppose I want the 'Been There' tree to open showing the link to Portugal/Lisboa. In this case I only have to add two lines in the photosturismLF.html file:
... other html keywords above
initializeDocument() // <- insert after this line
clickOnNode(1) // new text added to file
clickOnNode(15) // new text added to file
... other html keywords below

To find out the ID of the folder to be used as the argument of clickOnNode(ID) open the tree in the browser and move your mouse over the +/- nodes to the left of the folders.

Q: How can I change the background color of the left frame (the one with the tree)?
A: Edit the file ftie4style.css. This file defines the CSS styles for the script. Refer to CSS documentation for more details.

Q: Can I have the tree without the frames?
A: Yes. Instead of using the ftexample.html file, which uses frames, link directly with photosturismLF.html (you may want to rename this).
When pressing a link on the tree for the first time a new window will be open. Further activations will use that same window.
Press here to see what I mean.

1