rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: Asim on November 15, 2007, 08:39:30 AM

Title: Question about New file flagged
Post by: Asim on November 15, 2007, 08:39:30 AM
hi guys  ::)

i have a question about the new files added to MY HFS

I'M using 2.2a

i choose flag files added recently

but i want the new flag to come to every user who eneter my webshare but if he see it before (the new file) , it will not shown to him again

i hope i clearify my idea

kindest regards ::)
Title: Re: Question about New file flagged
Post by: Foggy on November 15, 2007, 08:45:39 AM
I don't quite understand what you are trying to say. I get the impression that English isn't your first language, if it isn't you can post in your first language and we'll try and help.
Title: Re: Question about New file flagged
Post by: Giant Eagle on November 15, 2007, 09:17:30 AM
Its quite clear to me: "only show the new flag to every user once; once they've seen it, don't show it again to that user."

Unfortunately, that not something we can do. It's something for rejetto to decide :)
Title: Re: Question about New file flagged
Post by: Foggy on November 15, 2007, 10:12:31 AM
I see now. Thats not a bad idea for an option.
Title: Re: Question about New file flagged
Post by: Mars on November 15, 2007, 11:33:32 AM
it's not possible to refers all files they are new for each user, the analysis is made according to the date of the file and the duration of display of new file.

a possiblity is to add and %item-old% according with %new%  where %item-old%=%timestamp%-%item-added%
Title: Re: Question about New file flagged
Post by: rejetto on November 15, 2007, 04:38:02 PM
it's not very practical to do...
when the user "see" the file?
- when it's downloaded?
- when the user read the name? (we don't know)
- when it appears on the screen? (we don't know, he may need to scroll the page before)
- when it is listed?

and we should track this information for every file multiplied every user.
Title: Re: Question about New file flagged
Post by: MarkV on November 16, 2007, 11:16:06 PM
Well you'd need cookies for that, it has to be stored client-side.

(Even account data is not linked to VFS, that means multiple VFS vs. accounts.)
Title: Re: Question about New file flagged
Post by: TSG on November 17, 2007, 08:19:08 AM
Cookies is the best way.

I don't see how this is a F.A.Q ? lol

I guess we'll move it later.

Here is some javascript for cookies. If you know how to use javascript.

Code: [Select]
/* Cookie Code. */
var exp = new Date();//New date object.
exp.setTime(exp.getTime()+(1000*60*60*24*7));//Set timeout to 7 days.
function setCookie(name,val,expires) {
document.cookie=name+"="+escape(val)+"; path=/"+((expires == null)?"":"; expires="+expires.toGMTString());
}
function getCookie(name) {
cname=name+"=";
dc=document.cookie;
if(dc.length>0) {
begin=dc.indexOf(cname);
if(begin!=-1) {
begin+=cname.length;
end=dc.indexOf(";",begin);
if(end==-1)end=dc.length;
return unescape(dc.substring(begin,end));
}
}
return null;
}

To set a value:    setCookie("COOKIE_NAME", "COOKIE_VALUE", exp)

To get a value:    getCookie("COOKIE_NAME")
Title: Re: Question about New file flagged
Post by: Mars on November 17, 2007, 08:07:46 PM
solution into topic http://www.rejetto.com/forum/index.php?topic=5227.0

I use a topic new on the same subject because of the importance of the brought solution and so that rejetto takes note more quickly