I'm being busy so just reply briefly. Easy things go first, and
debates go last.
> > 1. Added a line to the initialization routine in engine.php so that
> > all admins actually have 'editor' membership as official site
> > mentioned:
>
> > if (strpos(",$BOLTmemberships,", ',admin,')) $BOLTmemberships .=
> > ',editor';
>
> This may be a good idea, but I'm not fully convinced it is needed in
> the core. Superadmins already have super privileges, and there may be
> times you grant editors different powers from admins. It seems more
> logical to me to add people individually to the appropriate lists,
> even if it means adding them to more than one list. It is also easy
> enough to do this in a config file or a plugin. But if the group feels
> differently we can change the default behavior to this.
According to official site it says that admins are editors, editors
are members, and members are guests.
So I think this would be more resonable.
> > 4. Besides 3, added an escape for $myquery so that search results
> > containing encoded UTF-8 urls are not transferred back to UTF-8,
> > making a mistake link like <a href="??">??</a>.
>
> Can you specify where you put this? Normally that variable is used to
> carry values from one page to another (via sessions), so they cannot
> be escaped. Unless you are talking about having them escaped after
> they are retrieved from the session for the next page. I would think
> the place is engine.php, lines 178-180, but there is no myquery there,
> so I'm not sure what you mean...
In BOLTdomarkup:
$out = str_replace('[results]', $myquery, $out);
$out = str_replace('[results]', BOLTescape($myquery), $out);
If the value is not escaped, contents containing '%xx' would be
further changed back to UTF-8.
> > 10.Modified the rule of /= =/ in markup.php by removing the
> > unnecessary call of BOLTescape (done in BOLTcharEncode) and changed
> > the encode parameter to "lines" so that multi-lines are displayed
> > properly.
>
> You are right about the first point. As for the second, do you mean
> you changed the default fmt from '' to 'lines'? I'm not so sure about
> that. Can you give me an example of where the display is not correct?
old: MarkUp('pre', 'nomarkup', '/\/\=(.*?)\=\//se', "BOLTcharEncode
('$1', ENT_COMPAT, 'UTF-8')"); // /=no markup=/
new: MarkUp('pre', 'nomarkup', '/\/\=(.*?)\=\//se', "BOLTcharEncode
('$1', 'lines')"); // /=no markup=/
Just to make multiline text displayed as multiline instead of single
line, like:
/=
test
test2
test3
=/
> > 12.Modified markup.php so that HTML tags with post-blanks or post-
> > slashes like <br /> are allowed. Also fixed a problem for edit-
> > conflict box displaying disorder by not recognizing <br />s.
>
> What rule did you use... Doesn't it allow invalid possibilities,
> like: <i /> or <b />? Do we want that? Not sure we do actually...
As I said, the major purpose is to support <br />. I didn't filter the
possibilities like <i /> but since it's still validate html form, I'd
like to just leave the problem to the user if he types something like
that.
By the way, I'm too lasy to filter </xxx/>, if you think it's a big
problem you can modify it.
old: MarkUp('style', 'html', '/<([\/]?)([a-z0-9]+)>/ie',
"BOLTMhtml('$1', '$2')"); // allowed html
new: MarkUp('style', 'html', '/<([\/]?)([a-zA-Z0-9]+)( ?\/?)>/
ie', "BOLTMhtml('$1', '$2', '$3')"); // allowed html
also modify BOLTMhtml to:
function BOLTMhtml($slash1='', $command, $slash2='') {
## FUNCTION THAT TAKES HTML SAVED ON A PAGE IN AN INACTIVE FORM AND
REACTIVATES ALLOWED HTML RULES. SEE BOLTattrs FOR A LIST OF ALLOWED
HTML RULES
$BOLThtml = BOLTattrs('html');
$command = strtolower($command);
if (!empty($slash1)) $output = "$slash1$command";
else $output = "$command$slash2";
if (in_array($command, $BOLThtml)) return "<$output>";
return "<$output>";
}
> > 13. Modified BOLTXdelete in commands.php so that on deleting field-
> > modified system pages it returns to the system folder instead of being
> > emptied, which may corrupt the whole site if it happens on code.skin.
>
> This cannot really be done--in the case when you want to delete some
> system file, such as an action page or something. If you delete an
> empty page a second time it reverts to the system page. I think that
> is a better approach. If the code.skin page got cleared out, I think
> we could get BoltWire to work in such a way it pulls in the skin
> automatically. For example, we could have a default skin in the
> default installation, rather than the system folder. And just set the
> default skin to 'default', rather than blank. This seems a better
> solution. I've been kind of thinking about moving that way anyway.
Agree. Sorry for not noticing the double-delete feature.
> > 14.Moved site.script to code.script to match the system setting. Also
> > edited several places so that code* and template* are now always
> > showed as source in normal and preview mode, and code.embed and
> > code.script never are. A new config "codePagesExclude" is created with
> > default value "code,code.embed,code.script,template", which lists all
> > pages that are code* or template* while not displayed as code. Also
> > made a function BOLTcodePageGroup as a shortcut to do the complicate
> > match.
>
> I'm not sure it is best to have site.script in the code.script
> hierarchy, which is set aside for certain kinds of scripts. Could
> work, but in my mind all site information is in the site hierarchy,
> and all actual scripts are in code.script.
I changed this back in 3.3.2f2. I agree it would be better to stay at
site.script.
> > 17.Modified BOLTFpreview in functions.php so that on previewing page $
> > escaped by `, <code> or /= =/ no more displayed as $, and '~data~'
> > no more displayed as '~data~'.
>
> Would you be so kind as to post your fix so I could incorporate it
> into the core?
I've change a bit..
if ($args['output'] == 'escape') return BOLTescape($preview);
// $preview = str_replace(Array("\r\n", "\r", '~data~', '<'), Array
("\n", "\n", '~da`ta~', '<'), $preview);
$preview = BOLTsaveEscapes($preview);
$preview = preg_replace('/([\\n]?)\[form(
(?:"*.?"|\'*.?\'|\[\]|\]\]|
=\]|[^\]])*)?\]/', '$1', $preview);
$preview = preg_replace('/([\\n]?)\[session(
(?:"*.?"|\'*.?\'|\[\]|\]
\]|=\]|[^\]])*)?\]/', '', $preview);
$preview = preg_replace('/\[\(preview(.*?)\)\]\n?/', '',
$preview);
if (BOLTcodePageGroup($pageLink)) return BOLTMcode($preview,
'preview');
// if (substr($pageLink, 0, 5) == 'code.') return
BOLTMcode($preview,
'preview');
$preview = BOLTdomarkup("\n$preview", $pageLink, '', '', false);
BOLTcodePageGroup is a function I added to engine.php, to unify and
simplify all likely things
function BOLTcodePageGroup($page, $type='MAIN') {
## RETURNS WHETHER A PAGE BELONGS TO CODE PAGE GROUP, WHICH MEANS THAT
IT IS DISPLAYED IN CODE BOX
return (BOLTpageCheck(BOLTconfig('BOLTcodePages',
'code').'*,'.BOLTconfig('BOLTtemplatePages', 'template').'*',$page)
&& ! BOLTpageCheck(BOLTconfig('BOLTcodePagesExclude',
'code,code.embed,template'),$page));
}
> > 18.Fixed "site.join" so that it doesn't show ugly "adminAdmin";
> > duplicated 'editor' and 'admin' were also excluded.
>
> Thanks. Just added... (but to action.join).
Still broken. Suggest:
old: Select group: [select which][option admin][option editor]
[(search group=group template="=[option {+p2}]"
exclude=template.admin,template.editor)]
new: Select group: [select which][option admin "Admin"][option
editor "Editor"][(search group=group exclude=group.admin,group.editor
template="=[option {+p2} {+page}]")]
> > 19.Modified "action.data" so that it works correctly. Interestingly,
> > in the old version fieldname were mismatched, however it still worked
> > in v3.3.1 and earlier.
>
> Can you explain what is incorrect about that data action? I have not
> noticed any problems with it?
I don't know why action.data now works in 3.3.3, but it didn't work
(cannot add a data or change a data via the form) in 3.3.2 and worked
in 3.3.1. And it worked after the modifying:
old: [text list_fieldnames "{?fieldnames}" size=40] [submit
value='New Fields']
new: [text fieldnames "{?fieldnames}" size=40] [submit value='New
Fields']
> > 20."site.language" do not contain several system messages, which were
> > also included in the pack.
>
> If you can list them, I'll add them...
Oops, it's so long a list...
In site.language, site.messages, and functions.php:
1) language adds:
Preview Mode. ::
Plugin $1 enabled. ::
Plugin $1 disabled. ::
To create a new account, please choose a member name and password ::
Forwarded from $1 to $2. ::
Page $1 included. ::
Not authorized to include page $1. ::
Unable to write info var to $1. ::
Log entered on page $1. ::
Not authorized to enter log on page $1. ::
Mail authorization failed. Mail not sent. ::
BCC mailing not permitted. Mail not sent. ::
Missing required parameter. Mail not sent. ::
Memberships updated. ::
Script $1 executed. ::
Source retrieved for page $1. ::
Not authorized to view source of $1. ::
File access blocked. ::
oops ::
This plugin does not add any pages to your site. ::
2) messages, add:
file_blocked: File access blocked.
func_forward: Forwarded from $1 to $2.
func_include: Page $1 included.
func_include_auth: Not authorized to include page $1.
func_info_auth: Unable to write info var to $1.
func_log: Log entered on page $1.
func_log_auth: Not authorized to enter log on page $1.
func_mail_auth: Mail authorization failed. Mail not sent.
func_mail_bcc_auth: BCC mailing not permitted. Mail not sent.
func_mail_param: Missing required parameter. Mail not sent.
func_memberships: Memberships updated.
func_script: Script $1 executed.
func_source: Source retrieved for page $1.
func_source_auth: Not authorized to view source of $1.
info_blocked: oops
plugin_nopage: This plugin does not add any pages to your site.
3) functions.php, modify all that likes old to new (params only):
old: if ($args['msg'] == 'true') BOLTmsg('func_forward', "Forwarded
from $pageLink to $args[1].");
new: if ($args['msg'] == 'true') BOLTmsg('func_forward', "~
$pageLink~$args[1]");
list following:
if ($args['msg'] == 'true') BOLTmsg('func_include_auth', "Not
authorized to include page $page");
if ($args['msg'] == 'true') BOLTmsg('func_include', "Page $page
included.");
if ($args['msg'] == 'true') BOLTmsg('func_log_auth', "Not authorized
to enter log on page $target");
if ($args['msg'] == 'true') BOLTmsg('func_log', "Log entered on page
$target");
if ($args['msg'] == 'true') BOLTmsg('func_script', "Script $args[1]
executed.");
if ($args['msg'] == 'true') BOLTmsg('func_source_auth', "Not
authorized to view source of $page.");
if ($args['msg'] == 'true') BOLTmsg('func_source', "Source retrieved
for page $page.");
others include:
old:
if ($pages == '') return 'This plugin does not add any pages to your
site.';
new:
if ($pages == '') return BOLTtranslate(BOLTinfoVar('site.messages',
'plugin_nopage', 'This plugin does not add any pages to your site.'));
old:
if ($args['msg'] == 'true') BOLTmsg('func_info_auth', "Unable to write
info var to $target.");
return 'oops';
new:
if ($args['msg'] == 'true') BOLTmsg('func_info_auth',
"~$target");
return BOLTtranslate(BOLTinfoVar('site.messages',
'info_blocked'));
> > 21.Fixed several typos and nonsense or missense lines seen anywhere.
>
> If you want to see those included in the core please specify them. I'd
> rather not have to download your version and try to track down every
> change you've made. It's much easier for me to one by one go through
> and evaluate your proposed changes and then either incorporate them
> into the core or not. That's basically how the system here has worked
> to date.
Typos, missense, and optomizations: small things, some may just be
funny. just to be picky.
old: if ((!isset($BOLTarray['nextpage'])) || ($BOLTarray['nextpage']
== '')) $BOLTarray['nextpage'] = $pageLink;
new: if (empty($BOLTarray['nextpage'])) $BOLTarray['nextpage'] =
$pageLink;
old: MarkUp('if', 'if*', '/\[if\* (.*?)\](.*?)\[(if\*|else\*)\]/se',
"BOLTMif('$1', '$2', '$3', '*')"); // [if]
new: MarkUp('if', 'if*', '/\[if\* (.*?)\](.*?)\[(if\*|else\*)\]/se',
"BOLTMif('$1', '$2', '$3', '*')"); // [if*]
old: MarkUp('form', 'func', '/<\((.*?)\)>/e', "BOLTMfunc
('$1')"); // [(func params)]
new: MarkUp('form', 'func', '/<\((.*?)\)>/e', "BOLTMfunc
('$1')"); // <(func params)>
old: function BOLTtranslate($text, $language='', $reverse=0) {
## THE TRANSLATION ENGINE IN BOLTWIRE FOR SWITCHING KEY PHRASES TO YOR
CHOICE OF LANGUAGE OR BACK
new: function BOLTtranslate($text, $language='', $reverse=0) {
## THE TRANSLATION ENGINE IN BOLTWIRE FOR SWITCHING KEY PHRASES TO
YOUR CHOICE OF LANGUAGE OR BACK
> > 3)b) I haven't fully understand what BOLTstripslashes does but if I
> > adds this line:
> > BOLTreplace("\n", '\n');
> > before the line:
> > BOLTreplace('~data~', '~da`ta~');
> > all input '\n' wound not be replaced by a line break;
>
> Why would we want this?
It was my fault now noticing "editlines" param in Xedit and Xcreate,
so just ignore it.
But I don't think the transforming \n to linebreak is necessary since
someone could simply type an "enter" to do equal thing. Even it's
configurable, I'd prefer the default is not doing it (maybe modify
action.edit, aciton.create, and action.copy?).
> > 4. The documentation of markup table in the help system is out of
> > date.
>
> Specifics?
I'm lasy so just point out. The most significant is that ^footnote is
no longer available.
Others I'll report if I have time....
> > 8. It would be better to combine BOLTCexists and BOLTexists. Also, the
> > former takes 'plugins/', 'files/' but the latter takes 'system'.
>
> The first is the conditional, and doesn't care whether or not the page
> is in the system or pages folder, or even a subfolder. It can be used
> to test for various other files as well. The latter is an internal
> system folder used to tell whether or not a page exists, and
> optionally if system or local. Since they have different purposes, I'm
> not sure I see the advantage of mixing them.
>
> Also, if someone wanted to create a custom set of conditionals for
> some reason, we would need the system function available.
You may be right.
But at least I think 'plugins/' and 'files/' and 'system' are not
unified pattern, it would make user confused.
> > 9. BOLTCstamp seems to take only current page instead of any page as
> > the comments say.
>
> It just tells whether or not a stamp page exists, regardless of
> whether there is one or twenty.
Comment says: '## TAKES A PAGE NAME AND TESTS TO SEE IF ONE OR MORE
STAMPS EXIST FOR THAT PAGE'
So I expected that there should be an argument like 'page'.
Maybe I just misunderstood..
--
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.