First the mail:
Here's how the logic in the mail system is supposed to work:

If mail is sent as a function -- it must validate using site.auth.mail. No
auth page, no mail via a function
If mail is sent using a form -- it checks first if site.auth.mail exists
and if so, it requires user to pass authorization.
By default there is no mail auth page.

So if no auth page exists, you can send mail via a form without problems,
but you cannot send any mail using a function. Part of the reason for this
is someone could put a mail function in a comment box or something and
cause problem whenever some viewed that page. But to create a form, some
one has to have editor status--so you have some protection. Creating a site
auth form gives you the option of much more fine toothed control.

Nosing around the code a bit, here's a few observations...
1. line 369 in functions.php should have false rather than 'false'. This
seems to explain why your mail couldn't get sent. I'll fix in the next
release.
2. to get message output from the mail function add msg=true to the
function and put [messages] on the page. By default, messages are turned
off for functions and have to be turned on explicitly. It's the reverse for
forms.
3.On my vanilla installation (with #1 patched above), I got mail to send
properly per the authorization settings with no problem via function and
form.

Checkboxes:
Try checked=true

The reason for this is sometimes we want to change whether or not something
is checked so you can set to a variable like checked={:varname} and then
control the status by changing the variable.

Range Sliders:
That was a new one on me but they are pretty cool. I tried implementing it,
and it turned out to be quite easy, but didn't feel quite right about
adding it to the core. Partly because it doesn't yet seem to be supported
by all the browsers, but more so because there are so many other input
types, and I didn't want to add them all! :)

http://www.w3schools.com/html/html5_form_input_types.asp

   - color
   - date
   - datetime
   - datetime-local
   - email
   - month
   - number
   - range
   - search
   - tel
   - time
   - url
   - week

Rather, this seems like a candidate for a good plugin. Here's how the
script would look:

MarkUp('form', 'inputs-html5', '/(\n?)\[(color|date|...|range)((
{1,2}([-_a-z0-9]+=)?([-_a-z0-9]+\[\]|\"[^\"]*\"|\'[^\']*\'|[^\] ]+))*)?
?\]/ie', "BOLTMinputs('$2', '$3', '$1')");  // new html5 inputs

And then define for each the allowed parameters, ie:

$BOLTattrs['range'] = 'name,value,class,id,style,min,max,step';

If someone wants to write up the attrs, I'll add it to the solutions page,
or you can. It would be worth having.

Cheers,
Dan





On Sat, Mar 15, 2014 at 7:30 AM, jdoe <[email protected]>wrote:

> Hello Dan - it **was** the site.auth.mail file. Sending mails worked once
> I deleted it... I wonder why though - this is what I had in there:
>
> *: @admin
> contact*: @guest
> action.register: @guest
>
> (With those lines in there I couldn't send anything even as superadmin...)
>
> Another minor thing that I noticed, is that 'checked' tag in radiobuttons
> is not rendering in html (e.g. in [radio name='whatever' value=0 checked]
> First [radio name='whatever' value=1] Second  First doesn't get checked).
> Also it would be cool to have html5 tags like range sliders enabled ;)
>
> Thanks & regards,
> JF
>
>
> On Wednesday, 12 March 2014 18:10:03 UTC+1, Dan wrote:
>
>> Have you tried your form on a vanilla install of BoltWire just to make
>> sure it's not some setting on your system?
>>
>> Have you tried sending it as an admin just to make sure its working?
>> Superadmin should not have auth problems.  Here's a couple other questions:
>>
>> 1. Do you have a site.auth.mail page? If so, you need to make sure its
>> settings are right. Otherwise don't worry about it.
>> 2. Are you trying this on a windows server (like testing on your home
>> computer?). Windows doesn't play nice with php's mail command.
>>
>> If you send me your mail form I'll take a look, but BoltWire seems to be
>> stuck on your permissions not your form.
>>
>> Cheers,
>> Dan
>>
>>
>>
>> On Tue, Mar 11, 2014 at 5:55 PM, jdoe <[email protected]> wrote:
>>
>>> ... it now does look like the one you posted... - I added parameters to
>>> the mail command, but it still sticks to "Mail authorization failed. Mail
>>> not sent."... You think this is ssth outside BW? Thanks, JF
>>>
>>>
>>> Am Dienstag, 11. März 2014 23:13:05 UTC+1 schrieb Dan:
>>>>
>>>> Your email form should look something like this:
>>>>
>>>> [form][t]
>>>> [r][c width=100px]Your Email:
>>>> [c][text from {~email} size=30]
>>>> [r]
>>>> [c]Subject:
>>>> [c][text subject size=30]
>>>> [r][c cols=2]Message:
>>>> [r][c cols=2][box body rows=6 cols=40][box]
>>>> [r]
>>>> [c]
>>>> [c right][submit "SEND MAIL"]
>>>> [t]
>>>> [command mail [email protected] from={=from} body={=body}
>>>> subject={=subject} mode=active]
>>>> [command nextpage main.thankyou]
>>>> [form]
>>>>
>>>> You shouldn't have to worry about sitemail or authorizations, though
>>>> they can be used. Maybe you just need the mode parameter?
>>>>
>>>> Cheers,
>>>> Dan
>>>>
>>>>
>>>>
>>>> On Mon, Mar 10, 2014 at 4:55 AM, jdoe <[email protected]>wrote:
>>>>
>>>>> ... I tried - but somehow did not succeed, even despite upgrading
>>>>> everything to BW 4.07. - However my approach is still working :) so I'm
>>>>> going to stick with it for the time being even although it's probably not
>>>>> exactly a 'boltwire' way to do it ;)
>>>>>
>>>>> On a different note, I tried to get e-mail working (4.06 and 4.07),
>>>>> and despite having almost literally followed your note on
>>>>> http://www.boltwire.com/index.php?p=docs.concepts.mail (down to "And
>>>>> done!", adding an address for {sitemail} in config), I keep getting "Mail
>>>>> authorization failed. Mail not sent." issues (and indeed, with no mail
>>>>> being sent...). I learned from earlier release notes however, that the way
>>>>> how mailing is authorized changed - so probably I'm missing an easy clue
>>>>> here...
>>>>>
>>>>> On yet a different note, my sincere congrats on BW - remarkable work!
>>>>> :)
>>>>>
>>>>> Thanks & regards,
>>>>> JF
>>>>>
>>>>>
>>>>> Am Mittwoch, 5. März 2014 15:42:30 UTC+1 schrieb Dan:
>>>>>>
>>>>>> I think you could also do
>>>>>>
>>>>>> [[{+p}|img:somefile.jpg|data-lightbox='' rel='']]
>>>>>>
>>>>>> or if you need the directory:
>>>>>>
>>>>>> [[{+p}|[^somefile.jpg dir='pix'^]|data-lightbox='' rel='']]
>>>>>>
>>>>>> The third section (after the second pipe) allows you to insert any of
>>>>>> the allowed attrs. You would need to add the data-lightbox of course:
>>>>>>
>>>>>> $BOLTattrs['a'] = 'id,class,href,name,style,rev,
>>>>>> rel,target,title,accesskey,tabindex,class,id,xmllang';
>>>>>>
>>>>>> Glad you got it working.
>>>>>>
>>>>>> Cheers,
>>>>>> Dan
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Wed, Mar 5, 2014 at 7:12 AM, jdoe <[email protected]>wrote:
>>>>>>
>>>>>>> Hi Dan - thanks for the reply.
>>>>>>>
>>>>>>> Changing BOLTargs and adapting variables.php worked - the markup had
>>>>>>> to be adapted though, since lightbox-data actually works in <a> rather 
>>>>>>> than
>>>>>>> <img> tags; so I finally got a working code using:
>>>>>>>
>>>>>>> "<a href='https://........./{+p}' data-lightbox='results'>[^{+p}
>>>>>>> dir='.......'^]</a>"   in the fmt string of the search.
>>>>>>>
>>>>>>> Thanks again!
>>>>>>> Cheers,
>>>>>>> JF
>>>>>>>
>>>>>>>
>>>>>>> Am Sonntag, 2. März 2014 14:48:28 UTC+1 schrieb Dan:
>>>>>>>>
>>>>>>>> Glad you got #0 and #3 resolved, and that #1 is at least
>>>>>>>> understood. If you need help implementing some alternate solution, let 
>>>>>>>> me
>>>>>>>> know.
>>>>>>>>
>>>>>>>> I did look into number 2 and discovered why it wasn't working for
>>>>>>>> you. The rel attribute works fine but the data-lightbox parameter is 
>>>>>>>> not
>>>>>>>> recognized because of the hyphen. As it is, BoltWire recognizes 
>>>>>>>> paremeter
>>>>>>>> labels that include the \w characters (a-z0-9_). But I can definitely 
>>>>>>>> see
>>>>>>>> the need for being able to use lightbox--and I assume the data-lightbox
>>>>>>>> label is not negotiable... :)
>>>>>>>>
>>>>>>>> To fix it, try going to engine.php and replacing the first line of
>>>>>>>> the BOLTargs function down near the bottom (line 221) with this:
>>>>>>>>
>>>>>>>> function BOLTargs($x, $type='', $pat='(?>([-\\w]+)=)') {
>>>>>>>>
>>>>>>>> I've tried it and it seems to work just fine now with your
>>>>>>>> parameter. I'll add it to the next release as a bug fix/feature
>>>>>>>> enhancement. Remember, to reset the allowed img attributes in 
>>>>>>>> config.php,
>>>>>>>> not index.php. And your page markup will look like
>>>>>>>>
>>>>>>>> [^boltwire.gif rel=whatever data-lightbox={p}^]  (or {+p} in a
>>>>>>>> template).
>>>>>>>>
>>>>>>>> Cheers,
>>>>>>>> Dan
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Sat, Mar 1, 2014 at 12:53 PM, jdoe <[email protected]>wrote:
>>>>>>>>
>>>>>>>>> ... wow, ok  - here we go :)
>>>>>>>>>
>>>>>>>>> re 0) - a workaround is working now staging the process based on
>>>>>>>>> your earlier 'forwarding' suggestion, i.e.  [if condition]<(forward
>>>>>>>>> some.page)> [if]   ...so thanks for that one.
>>>>>>>>>
>>>>>>>>> re 1) - Instead of a customised link (which does work, of course)
>>>>>>>>> I actually intended the user to use the regular 'print' link in the
>>>>>>>>> standard menu (like he would for any other page). - But when going 
>>>>>>>>> that
>>>>>>>>> route, $_POST & $_GET specs tagged to the original page call are lost.
>>>>>>>>>
>>>>>>>>> re 2) - data-lightbox={+p} indeed is intended to tag the image for
>>>>>>>>> a nice javascript-based display handler. I added the tag to the img
>>>>>>>>> attribute as suggested, but when looking at the source output, this is
>>>>>>>>> still not being rendered.  (it should be a simple concept, though - 
>>>>>>>>> here is
>>>>>>>>> the link to the js in case this is of interest:
>>>>>>>>> lokeshdhakar.com/projects/*lightbox2*
>>>>>>>>>
>>>>>>>>> re 3) - works as suggested - thanks :)
>>>>>>>>>
>>>>>>>>> Thanks & regards,
>>>>>>>>> JF
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>  --
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "BoltWire" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>> send an email to [email protected].
>>>>>>> To post to this group, send email to [email protected].
>>>>>>>
>>>>>>> Visit this group at http://groups.google.com/group/boltwire.
>>>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>>>
>>>>>>
>>>>>>  --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "BoltWire" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> To post to this group, send email to [email protected].
>>>>> Visit this group at http://groups.google.com/group/boltwire.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "BoltWire" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at http://groups.google.com/group/boltwire.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "BoltWire" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/boltwire.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/boltwire.
For more options, visit https://groups.google.com/d/optout.

Reply via email to