[pmwiki-users] Hooking into Save and Preview?

Petko Yotov 5ko at 5ko.fr
Wed Aug 6 05:40:57 CDT 2008


On Tuesday 05 August 2008 12:20:57 juman wrote:
> I want to hook in to the Save and Preview function to catch the page
> that will be saved (the wikitext) calculate some stats that is to be
> shown with the Preview and Save (but not normal view). I don't want to
> modify the page but just give some extra information when the page is
> saved or previewed.
>
> Any examples or hints on how this could be implemented?
>

You can look at this recipe and use it and modify it for your needs:

  http://pmwiki.org/wiki/Cookbook/DeltaBytesRecentChanges

It displays the number of bytes (characters) added or deleted to a page.

Also, you can see the function "sms" at

  http://pmwiki.org/wiki/Cookbook/DebuggingForCookbookAuthors

You can place your statistics in the (:messages:) markup which appears in 
Preview mode.

Thanks,
Petko



More information about the pmwiki-users mailing list