I appreciate the ideas here, but I am not sure I want to go this
direction. You have some good ideas here but
1) I'm afraid we'll lose track of things by not doing the writing
immediately, and trying to cache it temporarily. I foresee lot's of
bugs.
2) I don't think most people are going to be editing a single page
multiple times, often. And if there was a need to do that probably
some special plugin or system could be developed to handle it. For
example one function that pokes little changes into the file for each
change you want to make, and then another function executed later that
makes the saves. Logic something like:
function BOLTFsmartsave($args, $zone='') {
global $smartPage;
$p = $args['page'];
if ($smartPage[$p] == '') set to BOLTloadpage($p);
$smartPage[$p] = str_replace($args['in'], $args['out'], $smartPage[$p]);
if ($args['commit'] == 'true') BOLTsavepage($p, $smartPage[$p]);
}
Not tested or anything. Didn't even check parameter order. But you get
the idea. Use [(smartsave page= in= out=)] as many times as you like
on the page, and then <(smartsave page= commit=true)> at the end.
But you see the problem. If you some how get interrupted or the last
commit is called, all your changes along the way get lost. Anyway, a
simpler fix for the situation I think you are describing, no?
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
-~----------~----~----~----~------~----~------~--~---