On Sat, Jul 25, 2009 at 11:29 AM, Mark
Marijnissen<[email protected]> wrote:
>
> I am creating a site that uses forms, and needs to keep a sort of
> "database". Since I really love boltwire, I thought I'd make a
> jumpstart and use boltwire as engine instead of creating everything
> from scratch.
Glad you like BoltWire! And if you want to create a real database,
I've been meaning to create a simple database plugin, just haven't had
time. I can do that if you want. Though in many ways, doing it within
BoltWire pages is easier and in some situations possibly faster.
> The advantage: lots of functionality already, especially with users,
> registering, layout, create pages, etc...
> The disadvantage: sometimes I do not know how to get things done, or
> sometimes I lose overview over what is happening.
>
> Especially commands and functions are difficult. There are only good
> for really simple things. For the more essential core of my site, I
> use a plugin with some custom functions and commands I call from the
> pages. I love the help function, it really makes life easier! However,
> when writing my plugin, I also get a bit lost:
>
> * What is the BOLTarray? Couldn't figure that out exactly looking at
> the source code.
The BOLTarray is the set of all field/value pairs sent to the forms
processor from a form. It will include even the session fields. So for
example in the mail command, you can also look for fields that are not
true commands like subject, to, from, body, etc., and use those in
generating your email. Some commands use it, some don't need it.
> * What is the ZONE argument in the functions for?
Almost invariably it is not used. But in a custom plugin you could
write a function that works different ways depending on which zone it
was in: main, side, header/footer, etc. Basically it just tells which
zone the function is being called from.
> * Why are all commands preceded by [session ...]? It this necessary?
Sessions are similar to hidden fields, except if you look in the html
code, the session fields are not visible even there. So for example,
in a mail form, it's better to use session than hidden for the to or
from field, to keep the email addresses secure, but you can do it
either way. Most commands that write to a page require you to use the
session input type for security reasons, to prevent someone from
submitting a falsified form and wreaking havoc on your site. Currently
this list includes:
authkey
backup
copy
create
delete
edit
enable
if
info
join
log
login
mail
register
rename
reset
restore
savedata
unstamp
validate
upload
(see engine.php line 141). It is configurable of course. And it may be
there are things that should be added/dropped to this list. I haven't
evaluated it in a while. So these commands will always be ignored if
not submitted as a session input type.
> What does it do? Is is possible to store session variables?
As for storing session variables, it should be easy enough to setup a
simple command for that. But nothing by default for writing them in
the core. The {?var} format will read session values I believe. On the
other hand, there is a cookies plugin which works very nicely if you
need that kind of functionality. I think you might find that useful.
> * What is the difference between {id} and {member}?
Generally the id is the actual page name (lower case), and member can
be any case. It seems I set up a way where optionally the id and
member could be completely different, but I don't see that now in the
code, looking quickly. Generally, member is used in markups like this,
rather than id, so: [[~bob]] => Bob (link). It is possible to use a
different field for the display in this case. I use "RealName" on my
FAST site, so it can be anything.
Thanks for the good questions. Let me know if you have more!
Cheers,
Dan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---