[pmwiki-users] Feature request: Action lists in skins

Patrick R. Michaud pmichaud at pobox.com
Thu Apr 7 08:49:09 CDT 2005


On Thu, Apr 07, 2005 at 10:48:43AM +0200, Joachim Durchholz wrote:
> I simply don't get it. What the heck is complicated about
> 
>   <!--ActionList-->

To a skin designer who simply wants to display the actions (and assumes
that they're set properly), I agree this is not complicated.  But for a 
wiki admin who wants to change the set of actions that appear at this point,
it's not at all obvious where they're stored or how to do it.  And if
those actions are held in an array, the admin has to know a fair amount
about the internals of <!--ActionList--> to make it work.  Contrasted
with the version that has the HTML directly in the skin template,
this is definitely more complex for the wiki admin.

> >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.

Sorry, I missed the exception -- being able to ignore such issues
isn't a luxury I often have.  :-)  

> >>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-->???

Yes, because anyone designing a skin (or customizing the actions)
must already be aware of these syntactic conventions in order to be
able to work with other non-action portions of the skin.
<!--function:ActionList--> doesn't totally eliminate the need for 
$-substitutions from the skin (think of $Group, $Title, $SkinDirUrl, 
and $WikiTitle), so a skin designer still has to know how they work.
What <!--function:ActionList--> does do is add another place to have
to look for the link information; i.e., complexity has gone up.

Consider our two examples:

    <a href='$PageUrl?action=print'>$[Printable View]</a>
    <a href='$PageUrl?action=diff'>$[Page History]</a>
    <a href='$PageUrl?action=edit'>$[Edit Page]</a>

versus

    <!--function:ActionList-->

Remembering that a skin designer already must know about HTML and 
$-substitutions to work with other parts of skin, which of the 
above is more straightforward (obvious) for achieving:
   - change the sequence in which actions are displayed
   - remove the "Page History Link"
   - add an "Upload" link
   - change the separator between the links
   - add a link to a non-wiki page

Nearly anyone who knows HTML and CSS--a prerequisite for skin design--
can figure out how to do it in the first case (or at least make a very
good guess), but almost nobody can say how to do it in the second case
without a lot of additional study or details.  Now then, which is 
"more straightforward"?

> *Skin writers* live in the skin syntax. They already know about 
> <!--wiki:...--> and <!--function:...-->, dealing with 
> <!--function:ActionList...--> should be no news to them.

They also know about $-substitutions, that's not news to them either.
And <!--function:--> is indeed news to many skin designers, it's a FAQ.

> *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.

Unfortunately you've skipped/overlooked the biggest audience
and PmWiki's primary target: wiki admins.  Wiki admins are usually neither
skin designers (i.e., creating skins for others to use) nor recipe writers, 
but just want to get a wiki running and customized to appear how they
want it.  And as a group wiki admins are far less comfortable with PHP than 
with HTML/CSS.  By moving the action list out of the skin and 
into a structured PHP array, we're moving farther away from the world
that most wiki admins live in (HTML), and we're removing control of the
output from the audience that needs and demands it most.  And when wiki
admins feel out of control, or that the "learning curve" for customizing
the output is too steep, they'll start looking for other packages 
altogether.

> 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.

Not at all, I think that the discussion is very fruitful.  I'm sorry
that this is being so frustrating to you, I'm just trying to keep
the needs and capabilities of the various audiences in play.  

Pm



More information about the pmwiki-users mailing list