rejetto forum

macro proposal: saveopt and savevfs

bacter · 5 · 6632

0 Members and 1 Guest are viewing this topic.

Offline bacter

  • Operator
  • Tireless poster
  • *****
    • Posts: 681
    • View Profile
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;
[_savevfs]
{.savevfs|Filesystem.vfs.}
{.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  ;)

your computer has no brain - use your own !


Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile
Salut bacter !

Si tu veux des macros, j'ai l'adresse d'une bonne poissonnerie!  ;D

Je suis déjà dehors... :-\

 ;)


Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile
Apart from that, I like the idea! ;)
« Last Edit: November 19, 2009, 10:46:24 PM by SilentPliz »


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2063
    • View Profile
Quote
{.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;
[_savevfs]
{.savevfs|Filesystem.vfs.}
{.add to log| filesystem saved. Motif: $1.}

Déjà fonctionnel mais il est trop tard pour poster maintenant  ;)