I made all the changes in engine.php,
As for markups.php, I added svg to the list of image types, I also added it
to the upload command and to the upload markup function (2x) so we could be
consistent throughout. Probably somewhere we need to find a simpler way to
keep all these places in sync.
I didn't change the fontstyles markup because many times I want to bold a
header or something like this:
**bold header
Without having to include the closing tag. The /m bounds it to the end of
the line.
As for the changes in library.php, could you send me the entire
BOLTsavepage function? I think I'm missing something as the patch doesn't
show how firstanchor and lastanchor are set. I'm willing to make that
change...
I didn't feel comfortable with changing line 1637 to trim because sometimes
I may want white space at the beginning or end of a page.
Wrapping the page write lines in a conditional is a good idea but I
modified it slightly like this. I thought there might be times where I want
to clear out a page completely so I deleted the first of the 3 conditions.
And I moved clearstatcache inside as it only needs to be run if there is a
page write.
if ($content != $oldcontent || $data != $newdata) {
$mypage = fopen("pages/$fpage", "wb");
fwrite($mypage, $content.$data);
fclose($mypage);
clearstatcache();
}
Thanks for so many good suggestions. It's reassuring to know someone is
looking over the code so carefully! :)
Cheers,
Dan
On Fri Dec 05 2014 at 9:59:34 AM Tiffany Grenier <[email protected]>
wrote:
> By the way, I made a patch file for a few corrections I made on y own
> version of Boltwire. It's mainly simple typo fix and slight improvement
> proposition.
> Please find it attached, review it and keep the changes you like. If need,
> I would use a webhook or overwrite a markup rule after next release for my
> local version.
> Cheers,
> Tiffany
>
> Le vendredi 5 décembre 2014 16:25:13 UTC+1, Dan a écrit :
>>
>> Sure! Good idea. Just made all these changes for the next release.
>>
>> Cheers,
>> Dan
>>
>> On Fri Dec 05 2014 at 8:33:20 AM Tiffany Grenier <[email protected]>
>> wrote:
>>
> I have to keep working on this "keyword" idea, see where it goes, and
>>> maybe write a plugin or something.
>>> About the counting issue, I found another way. It's incredible how
>>> powerful Boltwire is. Thanks again, by the way, for this great tool! And
>>> thank you for the inpage modification.
>>>
>>> I also propose to provide more useful information in the messages, like
>>> in the following cases:
>>> - Replace *if ($fmt == '') return 'Output format not found.';* by* if
>>> ($fmt == '') return "Output format $fmt not found.";*
>>> - Replace *if ($template == '') return 'Output template not found.';*
>>> by *if ($template == '') return 'Output template $template not found.';*
>>> - Replace *if ($myrule == '') return 'Index rule not found';* by *if
>>> ($myrule == '') return 'Index rule $myrule not found*'*;*
>>> - Replace *if (! function_exists($func)) return 'Mode not found.';* by*
>>> if (! function_exists($func)) return 'Mode $mode not found.';*
>>> - Replace *exit("Script not found...");* by *exit("Script $script not
>>> found...");*
>>>
>>> Cheers,
>>> Tiffany
>>>
>>> Le lundi 3 novembre 2014 21:14:42 UTC+1, Dan a écrit :
>>>
>>>> Here's a few quick responses:
>>>>
>>>> First of all, English is a tricky language where you an have verbs and
>>>>> nouns spelled exactly the same way. This is giving me headaches while
>>>>> translating my website into French, and with the possibility to also use
>>>>> the translated version of command, it is getting even worse. I tend to
>>>>> translate commands and button texts as verbs, and action names or page
>>>>> titles as nouns ("change" becomes something like "recent changes","create"
>>>>> something like "new page", "register" like "registration" and so on).
>>>>>
>>>>
>>>> Makes sense. Not sure this needs to be in the core, but possibly...
>>>>
>>>>
>>>>> Even if you choose not to keep my separation of things, I think it
>>>>> would be nice to introduce a list of translatable "keywords" in addition
>>>>> to
>>>>> "messages" and regular "language" strings. Anything not found in the
>>>>> "keywords" file would be look for in the "language" file.
>>>>>
>>>>
>>>> Not sure what you mean. Right now, site.language.fr is mostly key
>>>> words. You can add message strings to it if you want, but I'm mostly
>>>> worried about buttons and headers, etc.
>>>>
>>>>
>>>>> Then, I also wanted to suggest some grouping of the "actions"
>>>>> appearing in the "top" zone by default, like "Site actions", "Page
>>>>> actions", "Member/Account actions"; and why not a "quicklinks" system var
>>>>> that can also appear either in the top zone or in the side one. But I can
>>>>> also write a recipe for this.
>>>>>
>>>>
>>>> I think these are easy enough to customize for the user. A recipe would
>>>> be great.
>>>>
>>>>
>>>>> Also, and please forgive me if I missed this on Boltwire's website, I
>>>>> would love to be able to count the number of field parts using the info
>>>>> command (and I would be even better if the info command worked also for
>>>>> data fields, but I think this is planned for later).
>>>>>
>>>>
>>>> So if you have on a page field: one | two | three, you want to return 3
>>>> for the number of parts? You could try this extension:
>>>>
>>>> function BOLTinfoParts($info, $args, $page) {
>>>> return count(explode(' | ', $info[$args[2]]));
>>>> }
>>>>
>>>> then put [(info parts fieldname)]
>>>>
>>>> Curious what you are using this for? Is it something that could be
>>>> commonly used? Not sure I see the value of putting this in the core.
>>>>
>>>>
>>>>> And last, but not least, it would be great if the search "inpage"
>>>>> parameter also worked for page titles, which are sometimes included in the
>>>>> header and not in the page in itself.
>>>>>
>>>>
>>>> I just modified the inpage conditional to this:
>>>>
>>>> function BOLTCinpage($args='') {
>>>> global $pageLink, $BOLTid;
>>>> $page = BOLTinit($pageLink, $args[1], $args['page']);
>>>> $find = BOLTinit($BOLTid, $args[2], $args['find']);
>>>> if ($args['data'] == 'true') $data = 'data';
>>>> $content = BOLTloadpage($page, '', $data);
>>>> if ($args['case'] == 'false') {
>>>> $content = strtolower($content);
>>>> $find = strtolower($find);
>>>> }
>>>> if (strpos($content, $find) !== false) return true;
>>>> $find2 = BOLTurl2utf($find);
>>>> if (strpos($content, $find2) !== false) return true;
>>>> }
>>>>
>>>> So if you do [if inpage find=term data=true] it will scan for your
>>>> phrase in either the page content or any data var. It doesn't specifically
>>>> point out titles but it was easier than giving some option for specifying
>>>> which fields to include for indexing.
>>>>
>>>> Also remember, if you are using an index, you can include the data the
>>>> same way:
>>>>
>>>> forum: mode=text group=forum data=true...
>>>>
>>>> Cheers,
>>>> Dan
>>>>
>>>> --
>>> 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.