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]
> <javascript:>> 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] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> 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.
engine.php
---
172c172
< $out = str_replace("[[$zone]]", BOLTgetzones($zone), $out); // Do each zone, including [[main]] which loads the actual content of the page
---
> $out = str_replace("[[$zone]]", BOLTgetzones($zone), $out); // Do each zone
213c213
< //BOLToutputPage($out);//why twice?
---
> BOLToutputPage($out);
---
functions.php
---
308c308
< if (strpos($dir, '..') !== false) return BOLTmessage('lastmodified', $args);
---
> if (strpos(dir, '..') !== false) return BOLTmessage('lastmodified', $args);
594,595c594,595
< }
<
---
> }
>
---
library.php
---
970,972c970,972
< if (isset($firstanchor)) {
< if ($firstanchor == '#') {
< if (strpos($out, '[['.$lastanchor) !== false) return substr($out, 0, strpos($out, '[['.$lastanchor));
---
> if (isset($anchor)) {
> if ($anchor == '#') {
> if (strpos($out, '[[#') !== false) return substr($out, 0, strpos($out, '[[#'));
975c975
< elseif (preg_match('/\[\['.$firstanchor.'(\|.+)?\]\]/', $out, $matches) == 1) {
---
> elseif (preg_match('/\[\['.$anchor.'(\|.+)?\]\]/', $out, $matches) == 1) {
977c977
< if (strpos($out, '[['.$lastanchor) !== false) return substr($out, 0, strpos($out, '[['.$lastanchor));
---
> if (strpos($out, "[[#") !== false) return substr($out, 0, strpos($out, "[[#"));
1637c1637
< $content = trim($content);
---
> if ($content == ' ') $content = '';
1651,1655d1650
< if ($oldcontent == '' || $content != $oldcontent || $data != $newdata) {
< $mypage = fopen("pages/$fpage", "wb");
< fwrite($mypage, $content.$data);
< fclose($mypage);
< }
1657a1653,1655
> $mypage = fopen("pages/$fpage", "wb");
> fwrite($mypage, $content.$data);
> fclose($mypage);
1795a1794
> $s = $args['sort'];
---
markups.php
---
43c43
< MarkUp('links', 'image', '/(img|link)\:(([-_a-zA-Z0-9\/\:\.]+)\.(gif|jpg|jpeg|png|pdf|svg))/e', "BOLTMuploads('$2')"); // img:file.gif
---
> MarkUp('links', 'image', '/(img|link)\:(([-_a-zA-Z0-9\/\:\.]+)\.(gif|jpg|jpeg|png|pdf))/e', "BOLTMuploads('$2')"); // img:file.gif
52c52
< MarkUp('style', 'fonts', '/((\*|\/|\_|\||@|#)(\2+))(.+?)(\1)/me', "BOLTMfontstyles('$1', '$4')"); // Misc BOUNDED shortcuts *Bo/It_Un|Hi@Sp#Bx...
---
> MarkUp('style', 'fonts', '/((\*|\/|\_|\||@|#)(\2+))(.+?)(\1|$)/me', "BOLTMfontstyles('$1', '$4')"); // Misc shortcuts *Bo/It_Un|Hi@Sp#Bx...