On Sun, Aug 2, 2009 at 6:03 AM, Mark
Marijnissen<[email protected]> wrote:
>
> Hi Dan,
>
> * What would be nice if you could work with tabs! Like \t gets
> converted to a real tab, or something. I often use tabs for simple
> aligning and stuff.

Currently you can cut and paste tabs into BoltWire and it will convert
them to 5 spaces or so. You could always write a markup pattern that
did the same with \t.  But they don't line up like tabs. I don't think
that's really possible in html.

> * Is it really necessary to use all the different tags for functions/
> commands? I would be a lot easier if you just always could use [[..]]
> for links and {..} for variables and [{..}] for functions or
> something. I haven't looked at the code, and I do not know how PHP's
> regex functions work, but i though of some recursive function. I mean:
>
> while (match for [(..)])
> str[] = the match for  [(..)]
> for (i = end to begin)
> str(i) = process_function

The problem is not just getting recursiveness to work. We had that
somewhat working at various points in the past--but I did run into
some technical problems. The format I used was [(func (func2
(func3)))].  Looked ok but limits the ability to use () inside
functions. The other issue is timing. I want some functions to process
after conditions for example, and others before. So using our current
syntax overcomes both of those problems and has worked really well.

> same could be done for the nested if's.

I've tried implementing this but could not get it to work properly.
I'm open to code suggestions. But it's not trivial.

> Further, it would be nice if PHP in code.embed page gets executed, and
> if you can save/edit the config.php, plugins, etc. Than you can really
> edit and configure boltwire from the browser. Although i propably
> still keep using notepad2 for the syntax highlighting.

To be honest, I don't know how to do this. When the server sends
index.php to the php interpreter and triggers BoltWire, it generates
the html output that becomes the page. to do what you are asking we
would have to somehow send it back a second time to allow further
processing of any php in the output. Which isn't really possible. We
could have embed scan for a <? ?> pattern and try executing the code
contained in it. But I'm not to keen on using eval any more than I
have to. Big security problem. More suitable for a plugin or
something. Just not sure how it would work.

> I have also found another bug:
> [(include group.boys lines=1)]
> [(include group.boys lines=3)]
>
> only retrieves the first line, the third line is not retrieved!

Ok, I've taken a look at this and don't have a good solution. There is
a check in the include function that keeps the same page from being
included more than once. This is to prevent infinite loops which lock
up your site. A very elegant suggestions someone offered awhile back.
But it doesn't work in this situation. I'm open to suggestions on how
to fix this. Options:

1) Put a configurable max include limit which would allow you to
include a page 5 or 10 times but no more.
2) A way to turn off the flag if the contents include do not include
the string "(include".

This latter option might be the best... Seems adding this line to the
very end of the include function (just before it says "return $out;"
does the trick reasonably well:

        if (strpos($out, '(include') === false) $BOLTincludedPages[$page] = 
false;

You get a bit odd results if you put something like [(include {p})] on
a page along with other includes to the same page, but you don't get
the infinite loop. So maybe this works ok...

> I also would like to be able to override the login and register
> functions, which is currently not possible. Also, you can login with
> your e-mail, but if multiple persons register with the same e-
> mail,..only the first person can login! So, there should be a check if
> the e-mail adress already exists. But not by default, because probably
> not everyone wants that. Also, if the e-mail adress is the unique name
> you need to login, you can easily have the same member names. In
> short: there should be an option whether to use member-name or e-mail
> for registering. The one you use for registering, that what should be
> allowed only once. For e-mail adresses you have the problem that @'s
> and dots get converted, so perhaps the ID (or login page) should be
> converted to something like: markmarijnissen[at]gmail[dot]com or
> whatever.

You can always override any function in BoltWire very easily. First,
you can create your own custom login2 command (based off the core
function) and then just use that in your actions instead of login. But
to be more clever about it, you can use toolmapping to connect login
to login2 so your function is used instead of mine. Just put this in
the config.php just before your custom login2 command:

$BOLTtoolmap['f']['login'] = 'login2';

This means whenever BoltWire sees a login command it will map that
over to your custom login2 function.

Second it seems you could easily enough setup a line or two in your
login form to check and see if an account with the given email exists.
It would look something like:

[session search "group=login data="email={=email} fmt=count"]
[session if "equal {search} 1 ? warn=Account with this email account exists..."]

Not tested, just a quick shot. Would this work for your needs? Maybe
I'll add this to my site!

> That are my thoughts on the subject. Excellent work, this boltwire.

Thanks for the encouragement. It is always a work in progress. But I
am very happy with the way it has turned out. It is working
beautifully for me on my site. Thanks for everyone's input.

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
-~----------~----~----~----~------~----~------~--~---

Reply via email to