Re: Formatter.pm subclassing troubles
[email protected] (FLoh Leeber) Wed, 19 Apr 2006 22:14:31 +0200
| Newsgroups | perl.kwiki |
|---|---|
| Message-ID | <[email protected]> |
Hi! OMG... I didn´t try this at all though I thought about it... what a shame :-) it works now of course... But now I realize that I am totally wrong.. What I am looking for is to substitute some terms permanently in the page, because an ever changing timestamp or userid has no use at all... back to the start. So where would be the best point to introduce changes of the raw page which is written to the disk? kind regards, FL Kang-min Liu schrieb: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > On Apr 19, 2006, at 2:55 PM, FLoh Leeber wrote: > >> Hi! >> >> Thanks fot the answer. I partially disagree, since the >> "Spoon::Formatter:..."-Classes in the beginning would work then >> either. I think the prefix permits kind of shortcuts for the >> classnames, but when a full classname is given, then it isn´t prefixed. >> I´ve gone through the code with the debugger, and in my opinion the >> resulting "table"-array looks correct, that is, every >> "formatter_id"-entry has the correct classname associated, even my >> extension. >> >> However, I tried to modify the Kwiki::Formatter-class, and just >> copied an entry (what should be the lightest modification possible) >> and modified the regex. Still no luck. http://www.kwiki.org/? >> KwikiFormatterModule refers only to overriding an existing format >> rule, which I do not want to do. >> > > Hi, > > You're right, I didn't digg into how the prefix works. > > However, I just recalled that, to add a customized phrase to > Kwiki::Formatter, > you have to change 'all_phrases' too. > > const all_phrases => [qw( > asis wafl_phrase forced > titlehyper titlewiki titlemailto > hyper wiki mailto > ndash mdash strong em u tt del > )]; > > Inserting a 'userid' to here is necessary. Kwiki::Emoticon does this > too. > > Cheers, > Kang-min Liu > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.1 (Darwin) > > iD8DBQFERfiVCSIfi0PaMDQRAh0JAJ4l626J3LARcrTeB/2FC165KAXCVgCcCAv9 > abEOQJmVKMQ+2tzHMPCaYk8= > =q7vz > -----END PGP SIGNATURE----- -- FLoh "Wer sich nicht mit Politik befasst, hat die politische Parteinahme, die er sich sparen möchte, bereitsvollzogen: Er dient der herrschenden Partei. (Max Frisch)"