[pmwiki-users] Feature request: Action lists in skins
Joachim Durchholz
jo at durchholz.org
Thu Apr 7 03:48:43 CDT 2005
Patrick R. Michaud wrote:
> I'll also note that Scott's interpretation above is certainly *not*
> Joachim's interpretation -- the actions would have to go into a PHP
> array of some sort in order for it to be shared across skins.
Indeed. Thanks for pointing that out.
> On Wed, Apr 06, 2005 at 04:58:29PM -0500, Jonathan Scott Duff wrote:
>
>><!--function:ActionList
>> sep="~" wrapbegin="((" wrapend="))"
>> actions="edit,print,diff"
>> print_text="print this page"
>> diff_text="page history"
>>-->
>>
>>where the text for the action is just the action itself unless no
>>action_text is specified.
>>
>>So far, writing this email has made me lean more towards Pm's side of
>>the continuum. I've just added so many knobs to this feature that I
>>might as well have coded the HTML myself.
>
> ... and since you have to know a fair bit about HTML anyway to
> have gotten this far, basically what we've accomplished is add a
> lot of complexity for no benefit to an admin who is trying to create a
> simple skin. I.e., simple things are no longer simple.
> But
> it's still a fair amount of extra complexity, even for simple skins.
I simply don't get it. What the heck is complicated about
<!--ActionList-->
???
> And we still haven't handled extra attributes to the actions,
> such as opening in another window (printable view or uploads), or
> perhaps adding a template argument to an edit link.
Again, I don't get it. I specifically asked exception for *not*
addressing that issue for now. I don't know whether I have an answer to
that. I simply wanted to know whether <!--ActionList--> is OK or not.
>>And just to compare:
>>
>><a href='$PageUrl?action=print'>$[Printable View]</a>
>><a href='$PageUrl?action=diff'>$[Page History]</a>
>><a href='$PageUrl?action=edit'>$[Edit Page]</a>
>
> This is definitely more straightforward.
What? Three lines of HTML interspersed with PHP conventions, with two
different syntactic conventions that must be followed to a single
character, is "more straightforward" than a single
<!--function:ActionList-->???
It's just the opposite. Separation of concerns.
*Skin writers* live in the skin syntax. They already know about
<!--wiki:...--> and <!--function:...-->, dealing with
<!--function:ActionList...--> should be no news to them.
If they wish to be fancy about the action list, they insert
<!--function:ActionSeparator ...-->. If they want to be *really* fancy,
they may need ActionWrapper.
*Recipe writers* deal with the contents for the action list. They live
in the PHP world, so it's no great deal for them to provide an array like
'action' => 'print',
'name' => 'Printable View',
'attributes' => 'target='_blank'
so that the ActionList function can apply i18n to the 'name' attribute
and generate the proper action list HTML.
> More to the point, consider how we would generate the equivalent of:
>
> <a href='$ScriptUrl/$Group/RecentChanges'>$[Recent Changes]</a>
> <a target='_blank' href='$PageUrl?action=print'>$[Printable View]</a>
> <a target='_blank' href='$PageUrl?action=upload'>$[Attachments]</a>
> <a href='$PageUrl?action=diff'>$[Page History]</a>
> <a href='$PageUrl?action=edit'>$[Edit Page]</a>
*sigh* yeah, I know. Somehow it seems nobody read that I consciously
skipped the issue in my last post.
Anyway. Dealt with in the last paragraph.
------------------------------------------------------------------------
Well... now that I'm thinking about it...
It seems as if I'm quite unsuccessful at communicating here. I've been
trying to contribute that way, but I'm obviously a miserable failure in
this regard.
Seeing that I've been wasting considerable amounts of my and your time
with my proposals, I have decided to drop out of PmWiki development and
demote myself to "normal PmWiki admin" status.
Regards,
Jo
More information about the pmwiki-users
mailing list