rejetto forum
May 24, 2012, 11:49:13 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: This forum is free, you do NOT need to register to post. But you may.
PROBLEMS? QUESTIONS? CLICK HERE!
Fill the survey!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: %number% in [folder]  (Read 2560 times)
0 Members and 2 Guests are viewing this topic.
Foggy
Insane poster
*****
Offline Offline

Australia Australia

Posts: 806


View Profile
« on: December 07, 2007, 02:07:52 AM »

I was thinking that if we had a way to get the number of items in a folder(not the current folder but subfolder's of the current folder) we should be able to make use of the new macros(or create one) to get multipage file systems quite easily.

I've got plenty of time on my hands currently and I'm thinking of having a go at creating a template based on a forum I visit and I've got the perfect idea of how to use this.
Logged
bacter
Operator
Insane poster
*****
Offline Offline

Spain Spain

Posts: 679


View Profile
« Reply #1 on: December 07, 2007, 06:01:51 AM »

That is something very close related to the folder-tree-generation problem.

I wonder if rejetto could open the most powerfull macro of hfs that was there already before macros were named: %list% !

list is now hidden and could be understood as (I use here %..% instead of {{section|..}} to read it easier) :

{{list | %encoded-folder% | %folder | %file% | %link% }}

If %list% could be opened in such a manner, and if we could add two parameters: recursive and filter we would greatly enhance the possibilities:
we  could create a foldertree and the filelist in one step:

{{list | 'root'| %foldertree% | | | 'recursive'}}
{{list | %encoded-folder% | %folder | %file% | %link% }}
in this example %foldertree% would only add the item-url% and name to an array in javascript.

or we could do what foggy wants:

{{list | %encoded-folder% | %recfolder% | %file% | %link% }}
....
[recfolder]
{{list | %Item-url% | %foldercountitems% | %filecountitems% | %linkcountitems% }}
or:
{{list | %Item-url% | | %filecountitems% |||'filesfilter'}}
in this example also it is supposed to use arrays for the filelist iith a counterelement in the case of folders (perhaps in place of size).










Logged

your computer has no brain - use your own !
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11829


View Profile
« Reply #2 on: December 07, 2007, 02:29:34 PM »

I was thinking that if we had a way to get the number of items in a folder(not the current folder but subfolder's of the current folder) we should be able to make use of the new macros(or create one) to get multipage file systems quite easily.

to know the number of files in every subfolder we must scan the whole tree every time.
even with virtual folder, a file listed there may not exist on disk anymore.
but, anyway, with real folders for sure.

i don't understand how subfolders are related to "multipage".
Logged
Foggy
Insane poster
*****
Offline Offline

Australia Australia

Posts: 806


View Profile
« Reply #3 on: December 07, 2007, 06:51:18 PM »

i don't understand how subfolders are related to "multipage".

if you can get the number of items in the subfolder you could easily divide that by 10,20,25,etc to get the number of pages and then create links with offset.
Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11829


View Profile
« Reply #4 on: December 07, 2007, 08:39:55 PM »

why should i want to have the pages of a subfolder?
Logged
Foggy
Insane poster
*****
Offline Offline

Australia Australia

Posts: 806


View Profile
« Reply #5 on: December 07, 2007, 09:41:15 PM »

so you can choose which page of the folder to goto from the list instead of going into the folder first.
Logged
rejetto forum
« Reply #5 on: December 07, 2007, 09:41:15 PM »

Do you like this software? Consider even $2
 Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11829


View Profile
« Reply #6 on: December 07, 2007, 09:55:06 PM »

and how do i know the number of the right page before i even enter?
Logged
Foggy
Insane poster
*****
Offline Offline

Australia Australia

Posts: 806


View Profile
« Reply #7 on: December 07, 2007, 10:06:35 PM »

You don't but if you are searching for something specific you use ?search=
Logged
Foggy
Insane poster
*****
Offline Offline

Australia Australia

Posts: 806


View Profile
« Reply #8 on: December 07, 2007, 10:26:07 PM »

I get the feeling that what I'm trying to say isn't being fully understood so Ill try and explain it a bit better.

What I ask is that we be able to use %number% in the list on folders to list the amount of items like it does once you are inside the folder.

If we can get the amount of items, it would then be easy to write some javascript or other code that will use offset to create links to pages.

eg.

name:Folder123 Items:66 page:1 2 3

name:Folder456 Items:7 page:1

etc

I hope that makes a bit more sense because it could be useful.
Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11829


View Profile
« Reply #9 on: December 07, 2007, 10:41:22 PM »

i use the pages when i have an idea of the content (then i'm already in), and try to figure it out the right page.
i would not enjoy such links.

what you explained in your last post is exactly what i imagined at start, but it had no sense in my mind.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!


Google visited last this page May 23, 2012, 06:10:06 PM