2009/9/1 Kathleen Borja <jane88borj(a)yahoo.com>om>:
I have a problem in fetching the actual raw data or
the original article text in
a wiki page.
I looked into the database table 'wbt_searchindex' in mediawiki. I fetch
'si_text' knowing that it's the right one in fetching the original text of
an
article page. But, it's used for search function. What i wanted to fetch is the
original text so i could use it in my Bikol Thesaurus.
-How can I fetch the original article text on a wiki page?
-In what database table is the original article text located?
searchindex contains, well, the search index, which means it's not the
complete content and some things like short words and non-ASCII
characters get encoded so they can be found more easily. For getting
the content, you should do something like:
$title = Title::newFromText("Main Page"); // Or use some other way of
obtaining a Title object
$article = new Article($title);
$content = $article->getContent();
Note that getContent() has the annoying side effect of returning a
"This page does not exist"-like message if the page doesn't exist, so
you'll wanna check for $title->exists() as well.
Roan Kattouw (Catrope)