Software > F.A.Q.s

Flash Folder Tree

(1/5) > >>

Foggy:
I've had some free time and decided I'd try and create a browseable folder tree. Here is what I have so far, again it uses the same files.lst file as the search I created but a newer version of it. So it will only show the folders that the current user has access to.
If you click on one of the folders it will take you to that folder so you must use the arrows to browse it.

You can see a preview of it HERE Note: The preview is not the most current version.

To use, just simply use the files.lst file and place the swf/html file somewhere in your vfs/template.

Comments/suggestions please. :)


The latest version I've made should work and have the following features.


* Flash Cookies - Retain the directory structure between pages, so no need to redownload files.lst. It will check if the information is more than 1 hour old and redownload if necessary.
* Auto Expand - Automatically expand to the current folder.
* Default Files.lst - No longer needing the custom files.tpl file, Work off of the hfs default.
* Manual Update - Right Click and select "Update" to redownload the files.lst and retrieve any changes in the vfs.
* Clickable Folders - Double Click on the folder to open it in the current window. One click will Expand/Minimize the folder.
* Restricted Access - Automatically updates when logged in user changes and protected folders become avaliable.
Auto Expand: To use the auto expand you have to pass the current url to the tree either by a querystring or flashvars in a variable called "current_location". I recommend the use of flashvars as that way the .swf is cached and not redownloaded every time the user changes the page.

Restricted Access: You need to pass the name of the current user to the tree same way as you do with the url, but this time inside the "user" variable.

you can use this code as an example to automatically send the variable if you are calling it from the template and not the html file.

--- Quote from: Example TPL Code ---<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="550" height="400">
<param name="movie" value="relative path to folder tree.swf">
<param name="quality" value="high">
<param name="FlashVars" value="current_location=http://%host%%folder%&user=%user%">
<embed src="relative path to folder tree.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="550" height="400" flashvars="current_location=http://%host%%folder%&user=%user%"></embed>
</object>
--- End quote ---

ELEVENNNN:
woo hoo! I like it. Great work foggy, thanks for the time.  It works perfectly and has endless potential, and though its simplistic it does the job and looks much better than the search imo.

Thanks
Posted on: November 20, 2007, 06:30:23 PMHmm..


--- Quote ---%files%

[files]
<?xml version="1.0" encoding="iso-8859-1"?>
<list>
%list%</list>

[file]
   <item url="%encoded-folder%%item-url%" name="%item-name%" type="file"/>
[folder]
   <item url="%encoded-folder%%item-url%" name="%item-name%" type="folder"/>

--- End quote ---

Right now im just using exactly what you gave me and I havent had any luck.  I moved over the html and flash file to the root and replaced the tpl file with the one in my hfs root. ( I want to embed it to work along the side first ).  Is this the same issue, do I need to enable compressed browsing or anything?

As of now it loads the flash file and its empty.
Posted on: November 20, 2007, 06:40:33 PMThis works great now.  I'm not sure if the result will be the same for others, but my problem was the filelist.tpl... I had to physically move or delete the originally filelist.tpl (in my case from Terayon) and then move over the other filelist.tpl from the zip/rar.. a simple overwrite left a cached file (of sorts) and it would not work.

Good work Josh, and thanks for your time again.. going to bed.

TSG:
 ::) 3 posts in a row elevennnn? I will merge them for you  :-\.

Ye this is a nice idea with room to build upon :)

Unknown8063:
Oh very nice.  Great work Foggy!

Foggy:
I have made a couple changes that will reduce the amount of processing needed on the client side and the size of the xml file used to generate the tree. Just download the folder tree.zip from the first post and its the same as the first version.

Edit: With the changes I made hfs is now only transferring 6000bytes instead of 43000 bytes for my vfs, so that is quite an improvement especially if you have lots of files and not many folders.

Navigation

[0] Message Index

[#] Next page

Go to full version