rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: Mars on November 17, 2007, 08:03:14 PM

Title: %new% resolved, Cookies are not necessary
Post by: Mars on November 17, 2007, 08:03:14 PM
next topic from http://www.rejetto.com/forum/index.php?topic=5210.0 (http://www.rejetto.com/forum/index.php?topic=5210.0)


into hfs accounts are a class like

Quote
Taccount = record   // user/pass profile
    user, pwd, redir: string;
    enabled, noLimits: boolean;
    end;

user = login
pwd = password

Account properties:
redir =  'After login redirect to'
enable = true/false
limits = true/false

 what is new?

Quote
Taccount = record   // user/pass profile
    user, pwd, redir: string;
    enabled, noLimits: boolean;
    timecreate,timenew: Tdatetime;
    end;


timecreate create will be the date that account was creating
timenew will be the date (next is important) that the registered user has use the 'new' service

we can include an address line operator   ~new  (as ~login -->[loggedin] or  ~upload -->[upload])  with a section [new] who work as:

if user is not logged , login and password are required to access the new.
if user is logged web page from url http://server/~new  equal   http://server/&recursive&new

at the difference that
 "http://server/&recursive&new" use time defined with  'flag files added recently" and will continue to work as before.
 "http://server/~new"  use time of last used this command line.

if you have use '~new' 3 days ago then this date was stored into 'timenew' and all files created after this date appears in the '~new' web page. and then actual time is now stored into 'timenew' and another use of '~new' web page after a few minutes give 'No files found' until some files are added into hfs.


NOTE:
For any not constructive comment it's better to read again and to understand the brought solution. In spite of my pitiful English, I think of having given all the necessary explanations; once coded this solution will seem simple in the usage.




Title: Re: %new% resolved ,Cookies are not necessary
Post by: Giant Eagle on November 17, 2007, 08:48:41 PM
Just like "Show unread posts since last visit. " inside this forum?

Wouldn't that require some kind of database? storing all that data inside a .ini file cant be good if you have +50 users. and +5000 files
Title: Re: %new% resolved ,Cookies are not necessary
Post by: Mars on November 17, 2007, 09:26:07 PM
Quote
Wouldn't that require some kind of database? storing all that data inside a .ini file cant be good if you have +50 users. and +5000 files

no more just a date of the last use with url http://server/~new to compare

The previous one Identification AND the last time of use of http://server/~new URL will define the  stored time into timenew   

If you connect in time T,  you can use the url  'http://server/~new' as often as you want in the same session,
The shown result will be the same, more the new files arrived in the course of session.

If you open another session , time of the previous session is use to define what are the new files since the last session or since the last  'http://server/~new' in the previous sessions (it is not necessarily the last session)

for files they are more old than this date 'timenew',  they don't appear in file listing.
Title: Re: %new% resolved ,Cookies are not necessary
Post by: Giant Eagle on November 17, 2007, 10:13:21 PM
With a certain file limit ofcourse?

otherwise, ppl who never clicked it before will be given the whole fileserver as 'new' :P

I do like the idea, now its up to the creatah! to decide what to do with it.


P.s. a more proper way to describe it than just 'new' would be "Show new files since last visit"
Title: Re: %new% resolved ,Cookies are not necessary
Post by: Mars on November 17, 2007, 10:18:33 PM
time of creating account can be use to initiate timenew, and after we can offer by url a possibility to define itself this dateby example

http://server/?timenew=17/11/2007  this in  format dd/mm/yyyy

we can define a %timenew% var to use into templates.
Title: Re: %new% resolved, Cookies are not necessary
Post by: Mars on November 20, 2007, 01:53:17 AM
The implementation in hfs is soon ended, the interface with template is at the end of study.
Title: Re: %new% resolved, Cookies are not necessary
Post by: bacter on November 20, 2007, 07:51:38 AM
Mars:

if I understand how you think to add to new values to each account, the same metod would also permit to add a 'lang' (for language) to that record. that could be set with '~setlang=fr' or '~setlang=de', what would be more useful that the %lang%value returned from the browser ...

--> see rejettos comment in 
http://www.rejetto.com/forum/index.php?topic=5183.msg1029465#msg1029465 (http://www.rejetto.com/forum/index.php?topic=5183.msg1029465#msg1029465)
Title: Re: %new% resolved, Cookies are not necessary
Post by: Mars on November 20, 2007, 08:46:29 AM
It is always possible to store an information as %lang in a user account quite as its age, or the color of the eyes. The question is to know very exactly what is going to be the real use of this addition, and in which precise custom (with its limits) we can use it?
ref to your post http://www.rejetto.com/forum/index.php?topic=5183.msg1029465#msg1029465 (http://www.rejetto.com/forum/index.php?topic=5183.msg1029465#msg1029465)
Title: Re: %new% resolved, Cookies are not necessary
Post by: rejetto on November 20, 2007, 10:58:33 PM
it seems a good idea, i will add it to the to-do-list