Nicolay A. Vasiliev wrote:
I meant the page content, mainly - articles
content. I got how can I
change the content of static parts like header and footer (by editing
skin scripts). But now the actual problem is how to change the content
of dynamic parts of content (best of all articles of Wikipedia).
I mean including some phrases from my own table into article content.
Aha. So, as I thought, the very last stage of output probably isn't
the most sensible place to edit anyway. So...
* do you want these extra "phrases" to be inserted "on demand", when
you edit the page to include special syntax? If so, look at the
extensions mechanism -
http://meta.wikimedia.org/wiki/Write_your_own_MediaWiki_extension
* do you want these extra phrases to be inserted in reaction to
certain words or phrases, or existing markup elements, appearing in
the content (without having to actually add anything to the page)? [Or
indeed, to appear as though they were part of the content, but on
every single page - though this would seem a case for modifying the
skin to me] If so, add a function in Parser.php and have it called
from the internalParse() function.
* do you want these extra phrases to be inserted into the actual
source text, not just the output? If so, either write a bot or a
script talking to the database to add them en masse, or call a
function from Parser::preSaveTransform() or pstPass2() so that they
will be added to the article as it is saved (and beware of adding them
twice :p)
* are none of these really what you're trying to do? In which case,
perhaps you could explain in more detail what you're trying to do, and
I'll endeavour to find the logical place for it to be done.
Oh, and finally, see docs/hooks.doc (or .txt) in the source
distribution, which describes a system for creating extensions which
insert code at various points without actually modifying the code. In
fact, I hope you read this far, because that may be more helpful than
my suggestions [although the version I just looked at doesn't list a
hook for ArticleShow - a mistake, surely?]
--
Rowan Collins BSc
[IMSoP]