I tried using Jim Hu's Pages on Demand extension to generate a page dynamically. So
far so good.
Now, I have a use case that is slightly different.
1) When a user clicks on a red link (non-existent article) or a blue link (to an existing
article), I want to generate the article anew in both cases.
2) I have no problem handling the red link. I am interested when the user clicks on the
blue link. I want to fetch the latest revision of that page (let's say the article
is named Gene:HPRT1). Then I want to do something with it BEFORE presenting it (in VIEW
mode, not EDIT mode) to the user, like adding text before or after the original text. See
below:
Gene:HPRT1 (View mode)
----------------------------------------------------] EDIT [------------
(Some dynamically generated text)
(Original text from latest revision of Gene:HPRT1)
(Another piece of dynamically generated text)
---------------------------------------------------------------------------
3) When the user leaves the article/page shown above, either by clicking EDIT then SAVE or
by clicking on another article hyperlink, I want the above to become the latest revision
of the article Gene:HPRT1.
I would like to know how I can modify Pages on Demand to do this.
If I try the call below, I get an error (because article with same name already exists):
$article = new Article();
I still don't have a mastery of the MediaWiki API. Can someone point me to URLs
and/or documentation that can help me understand what's going on under the MediaWiki
hood?
Thanks and happy holidays!
Filip
Send instant messages to your online friends
http://uk.messenger.yahoo.com