[pmwiki-users] Permissions conundrum, section behaviour

Henrik Bechmann henrik.bechmann at sympatico.ca
Fri Oct 6 07:35:51 CDT 2006


> ...Only because you keep insisting that [[#comment]] is exactly the
> same as an "HTML anchor".   It is not.  Only the *first* such marker in
> a page generates an HTML anchor -- subsequent repeated instances
> of the same marker do not generate an HTML anchor, and thus do
> not break the "HTML rule to have unique anchor names."
Very interesting, certainly relevant, and news to me (and I fear, 
confusing for authors)
> And to return to the earlier comment:  
>     "Where does that ordinal index come from?  Surely not from the user...."
> Whatever is inserting the ordinal indexes in the [!textblock ...!]
> scheme above can just as easily be generating unique 
> [[#comment_nnn]] markers instead.  (Actually, it's slightly easier
> to use [[#comment_nnn]] instead.)
>> If further information was required by a recipe:
>> (:comments customcomment:)
>> [!textblock customcomment 1 time=10/5/06-12:46a author="Henrik Bechmann" 
>> pwd="132kljqdfpoasf21324;lkaf"!]
>> first comment text
>> [!textblockend!]
> [[#customcomment_1 time=20061005T0046 author="Henrik Bechman" ...]]
> first comment text
> [[#end]]
> but I did want to get some quick observations 
> about how I see [!textblock comment!] and [[#comment]] as really
> being equivalent.
> In fact, I think I can _prove_ that they're equivalent by noting
> that a simple pattern replacement is completely sufficient to turn 
> one scheme into the other (and vice-versa):
>     ## [!textblock comment args!] --> [[#comment args]]
>     $y = preg_replace('/\\[!textblock (.*?)!\\]/', '[[#$1]]', $x);
>     ## [[#comment args]] --> [!textblock comment args!]
>     $x = preg_replace('/\\[\\[#(.*?)\\]\\]/', '[!textblock $1!]', $y);
> In other words, I'm saying that '[[#' is simply another 
> (much shorter) way of writing what you have for '[!textblock', 
> and that also has the mnemonic advantage of associating 
> sections of text with url fragments.
Regarding the form of the delimiters, although I believe that textblock 
url fragments could be available with a different markup, and that users 
would find the lack of distinction between anchors and textblock 
delimiters confusing, I think the application of the ADT concept in the 
form of a structured extensible interface for generated textblocks (ie 
the functionality) is far more important.

IAC let's see what bubbles up out of this in time.

Thanks for the rolicking discussion!

- Henrik


Henrik Bechmann
Webmaster, www.dufferinpark.ca

More information about the pmwiki-users mailing list