Author Topic: Flash Folder Tree  (Read 19787 times)

0 Members and 1 Guest are viewing this topic.

Offline bacter

  • Operator
  • Tireless poster
  • *****
  • Posts: 682
    • View Profile
Re: Flash Folder Tree
« Reply #15 on: November 24, 2007, 02:50:52 PM »
mars:
I've already considered the use of frames for that purpose, but as generating the tree on serverside is relativly slow, I think it would be much faster to load a stored file that can be valid as long as we don't change the vfs-tree, also, because it may be necesary to generate that tree several times during a session if the visitor jumps to other pages and it could be necessary to reload the mainpage. But probably I will use this system in lack of other possibilities.

Foggy:
Many thanks for your offer, it would be interesting to see and learn something with your code. I would agree you if you could paste the code in a message, as with the templates i'm working on these days there is no working upload section. Thankyou.
your computer has no brain - use your own !

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12903
    • View Profile
Re: Flash Folder Tree
« Reply #16 on: November 24, 2007, 02:56:17 PM »
I like the frame idea by mars.
What bacter asks seems to be unsafe. An URL storing files. But the idea is to cache a listing.
I could create a cache in RAM for listings.
You pass the URL you want adding a &cache-id=stupidname&cache-expire=10
Anyone accessing such URL when the cache is not expired, will make HFS skip the phase where it collects the list of files and just use the cached listing.

I'm unsure if only thing to skip/cache is the listing itself, or the produced output.
The output would be even easier to implement.

Offline Foggy

  • Tireless poster
  • ****
  • Posts: 806
    • View Profile
Re: Flash Folder Tree
« Reply #17 on: November 24, 2007, 03:00:48 PM »
Thats not a bad idea but I have no use for such a feature as I've perfected my flash cookies and it remembers the tree structure between pages.

Offline Mars

  • Operator
  • Tireless poster
  • *****
  • Posts: 1859
    • View Profile
Re: Flash Folder Tree
« Reply #18 on: November 24, 2007, 03:15:08 PM »
Quote
I could create a cache in RAM for listings

i had same idea:

hfs conserverait en cache le résultat de la commande ?recursive . Quand un upload est effectué, le cache est mis à jour, l'administrateur peut choisir le timing de rafraichissement du cache entre 5mn,15mn, 30mn,1H
et celui ci est forcé quand un upload ou un ?recursive ou un ajout dans vfs est effectué, comme cela hfs ne rechercherait pas dans toute l'arborescence du dos pour n'afficher que quelques fichiers.

quand il ya 1 ou 2 utilisateurs qui utilisent en même temps ?recursive ça va encore mais imaginons que une centaine de personnes en même temps le fassent : le disque dur va exploser alors que si la même information est en cache le résultat est plus rapide pour l'ensemble des utilisateurs, et il n'y a pas besoin d'avoir un cache pour chaque session.
« Last Edit: January 26, 2010, 06:47:56 PM by Mars »

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12903
    • View Profile
Re: Flash Folder Tree
« Reply #19 on: November 24, 2007, 04:07:14 PM »
et celui ci est forcé quand un upload ou un ?recursive ou un ajout dans vfs est effectué, comme cela hfs ne rechercherait pas dans toute l'arborescence du dos pour n'afficher que quelques fichiers.

this "rules" are not enough.
when you have real folders, the listing may change without having an upload or a VFS change.
even if you have a file in your vfs, that file has been modified, so its timestamp is different, the result of ?recursive should be different if it displays the timestamp as well.

there is a solution to this problem, but i won't implement it in HFS 2, because it is 90% implemented in the experiment for HFS 3.

Offline bacter

  • Operator
  • Tireless poster
  • *****
  • Posts: 682
    • View Profile
Re: Flash Folder Tree
« Reply #20 on: November 24, 2007, 09:49:31 PM »
Quote
You pass the URL you want adding a &cache-id=stupidname&cache-expire=10
Anyone accessing such URL when the cache is not expired, will make HFS skip the phase where it collects the list of files and just use the cached listing.

That's a very good idea! But I don't understand what would be the difference between the listing or the produced output.

I think having some form of coma separated list would be enough, as in most cases y suppose that formatting or asigning of the values can be done in the template.
your computer has no brain - use your own !

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12903
    • View Profile
Re: Flash Folder Tree
« Reply #21 on: November 25, 2007, 04:13:26 PM »
the listing is the list of files before it is applied to the template

Offline Foggy

  • Tireless poster
  • ****
  • Posts: 806
    • View Profile
Re: Flash Folder Tree
« Reply #22 on: November 26, 2007, 06:57:36 AM »
I updated the first post with my latest version.



Updated yet again :P

I also updated the preview.

Anyone know why %, / and some other characters arnt bold in the quote I made about auto expand?
« Last Edit: November 30, 2007, 06:57:29 AM by Foggy »

Offline Foggy

  • Tireless poster
  • ****
  • Posts: 806
    • View Profile
Re: Flash Folder Tree
« Reply #23 on: December 06, 2007, 12:34:02 PM »
It will now check each time the current folder is changed if the logged in user has changed, and if it has it will reflect any changes that changing the user had on the folder structure. eg. more folders are now accessible due to restrict access permissions.
Posted on: December 03, 2007, 10:24:03 PM
Version 1.0 of the folder tree is released with a change in the clickable folders.
You can now click on the folder once to expand/minimize it or you can double click on it to open the folder.

Now that I have time and have had some ideas for it, it is really starting to come along. Tomorrow I might try and neaten up the code and shrink the size down a bit.

Also if someone would like to have a go at creating a skin/style for it I'll let you know how its done. To do that though you will need flash 8, not sure but you might need the professional version.