I am writing an extension for Mediawiki. If I know the page_id and page_title of an article, how do I get the first 50 odd words of the article? Is there a function defined to get the article text give the page_id?
+2
A:
Something like:
$article = new Article( Title::newFromText( 'Main_Page' ) ) ;
echo $article->getContent();
Grabbing just the first 50 words is left as an exercise for the reader.
Joshua C. Lerner
2010-03-04 23:37:02
Hey thanks Joshua :) Can you please point me to a link which documents these classes and methods because I have been unable to find any source of information on such crucial functionality anywhere!
Crimson
2010-03-05 07:36:56