you are right, but there's a reason for it: i marked them public in case other templates want to use them by url
~ is a valid character for files, so introducing this feature was a debatable decision, i prefer to not extend it to folders.
it is also not necessary because you can use use ?mode=section with folders.
add attached file ( which contain "this is the file" ) to root of vfs
add this section in the tpl
[test|public]
this is a section
go to this url
127.0.0.1/~test
pay attention to the result: a recording is proposed, record in any directory and then examine the content
the file has priority over the section whatever the chosen location.
among others:
"because we must use use ?mode=section with folders", the name must appear in the url like all names starting with ajax.
but all ajax sections can be made non-public for the benefit of a single section by using some changes
[ajax
|public|no log]
{.check session.}
{.$ajax.{.postvar|method.}.}
[ajax.mkdir
|public|no log]
[ajax.rename
|public|no log]
[ajax.move
|public|no log]
[ajax.comment
|public|no log]
[ajax.changepwd
|public|no log]
function ajax(method, data, cb) {
if (!data)
data = {};
data.method = method; data.token = HFS.sid; // avoid CSRF attacks
showLoading()
// calling this section 'under' the current folder will affect permissions commands like {.get|can delete.}
return $.post(
"?mode=section&id=ajax", data).then(function(){
if (cb)
showLoading(false)
;(cb||getStdAjaxCB()).apply(this,arguments)
}, ajaxError);
}//ajax
also added an example of a new method for changing the password, including the need for the old password and confirmation of the new one to validate the action, naturally the old password is encrypted when sent and compared by hfs to validate the new one.
it is not possible to use complex encryption for the new one but it does not appear in plain text when sent
the big advantage is that it avoids accidentally changing the current password
moving the mouse over the eyes to the right of the input fields allows you to view their content