Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - bacter

Pages: [1]
RAWR-Designs / New admin functions for terayon
« on: December 22, 2009, 10:44:12 PM »
User zhordrak has posted modified terayon template with some admin functions: Add users, set folder permissions..


Programmers corner / macro proposal: saveopt and savevfs
« on: November 19, 2009, 06:59:51 PM »
Templates tend to include tools for user-administration (add user, change password ..) and to allow to use the use of the {.set account|...} and {.new account|....}. Also macros to manipulate the virtual file system (adding folders ...) are used in some templates.

At the moment, we have an option in the menu that allows to save the options file 'every xxx seconds'. As there is no need to save the options file every xx seconds as no modifications goes on, and as there is no automatic saving of the virtual filesystem, i suggest two new macros that allow to do this.

{.saveopt|file/reg.}  saves the options to file or register
{.savevfs|filename.} saves te virtual filesystem to file

This allows to fire this tasks when needed, after after modifing something in accounts or in the vfs.

Another idea:
As this tasks are not needed in the template, they could be executed from the events script. As there could also be other tasks that could be executed outside of the template, i suggest also a new macro

{.toggleevent|eventname|optional parameters.}

this would allow to fire events that are defined int the events script.

{.toggleevent|_saveufs|new folder 'campics' added.}  in the template
 executes the event;
{.add to log| filesystem saved. Motif: $1.}
If the use of optional parameters would be a problem, it can be implemented without them, as we can always use #vars  ;)

Programmers corner / Request for changing postvar (and urlvar) behaviour
« on: November 04, 2009, 04:20:37 PM »
When sending from a form with method 'get' or 'post', values that contain curlybraces with his points or the macro expression separator '|', the values seem to be sent to the server.. but hfs clears the whole content of this values that contain {., {: and .}, :} on arriving.!

I see this when the method is 'get' at least, and experience the same when the method is 'post'.

This is really annoying when you type  or modify a chunk of text and loose it this way. I suppose that for security reasons no macros (or elements of) can be accepted in this type of data... but perhaps it would be possible to 'escape' in some way the macro delimiters. Using html char values like { do not solve the problem.
This escape could be replacing the signs in the incoming postvar for further use in some way like this:
{. --> {+., 
.} --> .+},
{: --> {+:,
:} --> :+} , etc.
| --> ¦
or this way:
{  -->  ({)
}  -->  (})
|  -->  (or)
This would allow to save {.any macro|expr.} as {+.any macro¦expr.+}  or ({).any macro(or)expr.(}), something that can never be reverted to a executable macro. This would allow to use the macro signs {:{.another macro.}:} inside documents used in a wiki, forum or any cms.

When loading such a file, then we can then replace the codes with the original signs and no macro formed this way will be executed.

Thanks for a possible solution.

Bug reports / error in macro substring
« on: October 16, 2009, 09:49:10 AM »
There is a error in the substring macro when the include option should include the final delimiter(2,3): instead of including the delimiter, the extracted substring is shortened.


sample string: abcd[123456]efgh
Macro: {.substring|[|]|abcd[123456]efgh|include=x.}
        -> typing error found by mars :D

no include option: [123456
with include = 0 : 123456
with include = 1 : [123456
with include = 2 : 12345      ------> should be 123456]
with include = 3 : [12345     ------> should be [123456]  

Bug reports / How should HFS behave on shutdown?
« on: May 11, 2009, 10:42:56 AM »
In the german board has rised up the following problem/question:

Fact: It is supposed that the option Menu -> start/exit -> Auto-save VFS on exit is activated.

When a user shuts down Windows directly or with help of a shutdownmanager or using windows-shutdown.exe in programmed tasks, hfs does nos save the vfs, as the program is not finished in the regular way (as with hfs.exe -q or exit), the task is simply killed.

This means, that recent modifications of de vfs (added files or folders) and download- counters etc. are then not saved.

I don't know if this behaviour is a question of windows (killing processes when shutting down), or if this is, as Wasserfloh says, a bug of hfs (if windows or shutdown sends a quit signal/request to hfs ?).

Bug reports / ¿bug in substring macro?
« on: January 27, 2008, 12:50:44 PM »
If you use
and frompattern does not exist, substring returns the full string, and i think in this case it should return void.

HFS ~ HTTP File Server / HFS in magazine CHIP-online(german):
« on: January 23, 2008, 08:28:09 PM »
HFS today in german computer-magazine CHIP-online:

HTML & templates / once more %lang%
« on: November 11, 2007, 01:59:16 PM »
As the first point I want to thank to Rejetto for the great effort done with the last releases to version 2.3. The new features are a great improvement.

One new feature is the %lang% value that contains a value sent to the server from the browser.

In my case using Firefox and IE, lang returns es-us (that may stand for spanish-US = spanglish), while the information that I can retrieve form the navigator-object is es-ES. Firefox doesn't support neither user- nor browserlanguage, so I get them from the useragent or versionstring. IE fills out correctly the values.

But the problem at which I want to point is another.

If we cant SET the %lang% value, I think it is almost useless. Getting the browserlanguage is no problem, and if a template supports the language, it's ok. But the reason for a language value when I proposed this, was that the visitor can SELECT between different languages this one he best understands when his language isn't directly supported. The interesting thing would be that this value should be stored during his conection and would be available in every (diff) template, avoiding the need to overload folder- and uplinks with stuff like #lang=..

It would be great to have ?lang=.. to set %lang% in the main template!


HTML & templates / create POLL's in HFS
« on: October 31, 2007, 12:27:41 AM »
Somebody asked how to do polls in hfs. Here two junks of code to show how you can do this in hfs with overloading of the url. I also propose two ways of getting the results.

I think polls in webpages are not very useful, but somebody may like it.

HTML & templates / external command
« on: October 26, 2007, 02:02:29 PM »
HFS is great and it's growing. So there are a lot of feature requests and a long todo list, and rejetto is the only coder in delphi.

So why not open a door in hfs that permits other coders to append some features they need, writing small pieces of code in other languages and that doesn't interfere with the mainprogram?

My proposal is, to have , in the same way as we can define what the historyfiles contains and logs, perhaps with a filter for lines containing ?,#,&, a definition of a command to execute. Or having hfs loading a dll (if it exists) with the only entrypoint 'hfsext'. The unique value passed should be the full defined history line.

This way we could use address-overload to realize some tasks as:
  • #createdir=name, #delfile=name
  • #adduser=username, creating a usernamecode.htm with a key that could be read in a frame of the template, and once it were downloaded, could be erased. etc..
And without overload, we could create account-deletion with timeout.
we could ban users who try to access with no hfs-generated commands etc.

I know we could achieve some of this things with a resident program that continuously checks the history-file, but as most tasks would only occur a few times a day (or even less),  I think that it would be better invoke that program only when needed, defined by a filter like history creation.

Other languages / change description of this section
« on: October 02, 2007, 06:33:57 PM »
to Rejetto:

I suggest to change the description of this section that is now:

for all languages - post in you native language - no official support


français, português, deutsch, español, nederlands, svenska ... etc.  - no official support

for those who don't even understand your description. :)

Deutsch / Hilfe un Ratschläge auf Deutsch
« on: October 01, 2007, 02:06:41 PM »
Wenn du Probleme mit HFS hast oder irgendwelche Fragen zu seinem Funktionieren hast, kannst du in diesem Forum schreiben und Hilfe bekommen.

Español / Ayuda y consejos en castellano
« on: October 01, 2007, 02:02:04 PM »
Si tienes cualquier duda o necesitas ayuda con HFS, y no encuentras la respuesta en la wiki

puedes exponer en este foro tu problema.

HFS ~ HTTP File Server / userparam's and %lang%
« on: September 26, 2007, 07:03:39 PM »
The language feature may be very interesting, but:
1. I think it will be difficult to get the language from browser info or based on the ip.
2. not everybody who uses hfs may use or understand more than one language, and even if they do, it's likely that guests with other languages connect to the site, and it would be useless to have lang-value for a language not supported.
Conclusion: In order to simplify the implementation of %lang% and it's use, I propose to make it user-selectable in the template with a method that somebody posted in this forum for other uses:
the method would be a link for each language supported by the site to the same page, adding a param.

example:   http://miserverip:port/?lang=it

Rejetto's work would be, where the logstring for requesterd gets is generated, to strip off what's coming after the '?' sign, check, if its 'lang' and put the value 'it' or whatever the href sends, into the %lang% variable asociated to the user, where the value remains during the session.
This involves to have bigger storage structure for each conected user, where until now there was only (I suppose, because I didn't view the source code..) a pair of values: username, userip.

By that way, I suggest also to add to more params like lang, that may be named 'upar1', 'upar2' and these values could be associated in the same way als ?lang=____. I want to use this params to select different styles, so that the user can select between different letter-size depending on it's screen, or to select fast-display-template with minimal graphic overhead instead of full presentation, depending on its conection (slow modem or LAN). Perhaps other users faind additional aplications for this.

If You go on working on that new user-structure, think also in adding a field for 'memberofgroups', that would be necessary to implement user-groups in the manner I will propose in a separate thread.

In a later future we could also think to leave these values in the user-account-management.

HFS ~ HTTP File Server / new symbols [user1][user2].. -> %user1% ...
« on: August 22, 2007, 11:23:13 PM »
I think it would be interesting to have HFS recognize on all pages it creates tree or four nes symbols [userN] to include with %userN%. This would make a lot more easier personalizing the templates, for example to put a header on all(or some) pages, or a sidebar, or a footer etc. I propose to add this on the todo-list.

Pages: [1]