[Pmwiki-users] 2.0 - Authorsignature

Patrick R. Michaud pmichaud
Thu Jun 17 09:18:39 CDT 2004


On Thu, Jun 17, 2004 at 11:32:34AM +0200, Thomas -Balu- Walter wrote:
> Nice to see that in 2.0 the authorsignature was added as ~~~~ (even
> though I am used to ~~~ ;).

I chose ~~~~ because I thought I had seen it this way in another wiki
markup.  If you can point to a ~~~, or if we feel that ~~~ is a better
choice, then we can change the default.  (In reality this is controlled
by $AuthorSignatureMarkup.  :-)

> Is there a chance to have a different replacement for ~~~~ at the end of
> the line or the beginning and middle?

The present code doesn't support it but I can certainly make it that way.

> I'd also like the ~~~~ to be replaced on save and not on preview
> already. I'm using a colleagues box quite often and on first preview I
> keep forgetting to change his author box.

Okay, done.

> PS: The format of the replacement is stored in variables I guess, so I
> can add "bold" e.g.? :)

Yup, the format is of the replacement is in $AuthorSignatureFmt.  However,
given the above request I may change the whole thing to be an 
$AuthorSignature array, so that one can do:

  $AuthorSignatureFmt = array(
    '/^~~~~(.*\\S)/' => '[[~$Author]]: $1',
    '/~~~~$/' => '--[[~$Author]]');

which says that "~~~~ my text" at the beginning of a line becomes 
"[[~Author]]: text", whereas ~~~~ anywhere else becomes just "[[~Author]]".

Of course, I may decide to make the replacement-on-save patterns more 
generic than just plain AuthorSignatures.

Pm



More information about the pmwiki-users mailing list