rejetto forum
Software => HFS ~ HTTP File Server => Topic started 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 ::)
-
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.
-
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 :)
-
I see now. Thats not a bad idea for an option.
-
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%
-
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.
-
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.)
-
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.
/* 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")
-
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