incubator-jspwiki-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Murray Altheim <murra...@altheim.com>
Subject Re: Anything similar to wikipedia templates?
Date Thu, 07 Feb 2008 10:27:26 GMT
lgilardoni61@gmail.com wrote:
> Murray Altheim wrote:
>> As an author/maintainer of the TranscludePlugin, I perked up my ears
>> when reading about this, but on looking at the WikiMedia templating
>> feature I frankly think it's got to be one of the ugliest things I've
>> seen in awhile.
>>
>> What I would be willing to do is incorporate an API-like method into
>> the TranscludePlugin, such that someone could extend it with their
>> own Substitution (transform) feature. That wouldn't be a lot of work
>> for me, and if someone was so masochistic as to want to duplicate the
>> WikiMedia features, hell, all power to 'em.
>>
>> If this would suit, let me know and we can discuss adding the hook
>> to TranscludePlugin to permit this.
>
> Well, I actually had a look at the InsertPage plugin (source) and the 
> TranscludePlugin (jspwiki.org description).
> In either case what's really needed is just a substitution mechanism to 
> be build on top/hookable to either.
> After that, your right, all power to 'em.

What I'm thinking of is pretty simple. Because the common content that
exists between the two plugins (and potentially others) is passed as a
String, I'd pass the results of the existing transclude() method through
a pass-through method

     public String transform( String content )
     {
         return content;
     }

and create a single method API called transform(), e.g.,

     public interface Transformable
     {
         public String transform( String content );
     }

> Not yet exactly planned to do either, but If I had enough time (unsure I 
> have ;-)  I would probably do right now,
> looks not that difficult (at least for the InsertPage where I had a 
> look). If only this could be useful to others,
> would probably be better to agree on syntax to specify parameters.

I'd leave all that up to the implementors/implementation, as people
may wish to handle this in different ways. We after all already have
a filter mechanism via com.ecyrd.jspwiki.filters.PageFilter, so I
suppose this could be a new thing or mixed in with that.

> Whether or not such a specific feature (I mean the Wikipedia templating 
> stuff - or something alike) may prove useful
> (or ugly - this also may depend on how things grow up ..) is a different 
> story. Personally I feel this could help a lot in
> avoiding duplication whenever (part of) a wiki  content should be 
> commonly structured (visually) over a number of
> standard things. But I'm eager to ear other opinions :-)

Back in 1993 and 1994 I wrote a complicated HTML editor using HyperCard
that did all sorts of header and footer type transclusions, permitted
users to declare and instantiate parameter entities, etc. and generally
created a very complicated system. It got good reviews but I don't know
how many people ever used the arcane features that I spent so much time
perfecting. But I'm all in favour of enabling those who want to do that
even if I happen to find it a bit off-putting, mostly because in my own
experience I know that there's probably people out there (who we never
hear from) using JSPWiki for all sorts of oddball applications (I know I
am).

Murray

  ...........................................................................
Murray Altheim <murray07 at altheim.com>                           ===  = =
http://www.altheim.com/murray/                                     = =  ===
SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk               = =  = =

       Boundless wind and moon - the eye within eyes,
       Inexhaustible heaven and earth - the light beyond light,
       The willow dark, the flower bright - ten thousand houses,
       Knock at any door - there's one who will respond.
                                       -- The Blue Cliff Record

Mime
View raw message