Difference between revisions of "MediaWiki/archive/customizing"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
m (links to index.php and Article.php)
(some sections didn't get imported, for unknown reasons; gave them their own pages)
Line 1: Line 1:
[[Techniques]]:
+
{{web software|MediaWiki}}: [[MediaWiki Customization|Customization]]
Software: [[MediaWiki]]: [[MediaWiki:Customization|Customization]]
+
==Articles==
==Modifications==
+
* [[Modifying MediaWiki Menus]]
===Modifying the Menus===
+
* [[Shortening MediaWiki URLs]]
The text which shows up in the menu bar (at left in monobook) may be
+
* [[Modifying the MediaWiki Searchbox]]
edited through the wiki itself. What you need to know is the name for
 
each link. To edit the contents, you navigate to the page named
 
'''MediaWiki:''linkname'''''. You will need to be a sysop in order to
 
edit the text. To get a list of links and other text which can be
 
customized, go to [[Special:Allpages]] (on the wiki in question),
 
select "MediaWiki" from the "namespaces" drop-down, and press "Go".
 
====Questions====
 
*Where does the text for the corresponding pop-up hint come from, and
 
can it be modified?
 
*Can more links be added to the existing navigation box?
 
*How do you add another box? (e.g. to have links back to the site of
 
which the wiki is a companion)
 
 
==Code Notes==
 
==Code Notes==
''(From [[User:Woozle|Woozle]] 20:59, 15 Jun 2005 (CDT). Eventually to
+
''(From [[User:Woozle|Woozle]] 20:59, 15 Jun 2005 (CDT). Eventually to be given their own section, I expect.)''
be given their own section, I expect.)''
 
 
*Everything obviously starts with [[MediaWikiDoc:index.php|index.php]]
 
*Everything obviously starts with [[MediaWikiDoc:index.php|index.php]]
*For the purpose of displaying a page (not saving changes or doing
+
*For the purpose of displaying a page (not saving changes or doing anything else), this calls $wgArticle->view(), in
anything else), this calls $wgArticle->view(), in
 
 
[[MediaWikiDoc:Article.php|Article.php]] (line 699)
 
[[MediaWikiDoc:Article.php|Article.php]] (line 699)
*$wgArticle->view() appears to be able to provide a few other
+
*$wgArticle->view() appears to be able to provide a few other formats besides the regular view (including difference engine and displaying redirections as subtitles), but I'm ignoring that for now
formats besides the regular view (including difference engine and
+
*$wgOut seems to be the object which accumulates text to be output, via various methods:
displaying redirections as subtitles), but I'm ignoring that for now
 
*$wgOut seems to be the object which accumulates text to be output, via
 
various methods:
 
 
**$wgOut->addWikiText(...)
 
**$wgOut->addWikiText(...)
 
**$wgOut->addHTML(...)
 
**$wgOut->addHTML(...)
**$wgOut->addPrimaryWikiText() # Display content and save to parser
+
**$wgOut->addPrimaryWikiText() # Display content and save to parser cache
cache
+
**$wgOut->addWikiText() # Display content, don't attempt to save to parser cache
**$wgOut->addWikiText() # Display content, don't attempt to save to
 
parser cache
 
 
**$wgOut->setPageTitle()
 
**$wgOut->setPageTitle()
 
**$wgOut->transformBuffer(); # Put link titles into the link cache
 
**$wgOut->transformBuffer(); # Put link titles into the link cache
Line 40: Line 21:
 
**$this->viewUpdates(); ''(found at line 1926 -- doesn't do much)''
 
**$this->viewUpdates(); ''(found at line 1926 -- doesn't do much)''
 
**wfProfileOut( $fname );
 
**wfProfileOut( $fname );
*It's not clear whether the navbar has already been pulled in by the
+
*It's not clear whether the navbar has already been pulled in by the time we hit viewUpdates -- possibly transformBuffer does it? The comment makes it sound like that, but the name "transformBuffer" in that case is not very descriptive. The code in there should probably be examined.
time we hit viewUpdates -- possibly transformBuffer does it? The
 
comment makes it sound like that, but the name "transformBuffer" in
 
that case is not very descriptive. The code in there should probably be
 
examined.
 

Revision as of 10:46, 14 October 2005

computing: software: web: MediaWiki: Customization

Articles

Code Notes

(From Woozle 20:59, 15 Jun 2005 (CDT). Eventually to be given their own section, I expect.)

  • Everything obviously starts with index.php
  • For the purpose of displaying a page (not saving changes or doing anything else), this calls $wgArticle->view(), in

Article.php (line 699)

  • $wgArticle->view() appears to be able to provide a few other formats besides the regular view (including difference engine and displaying redirections as subtitles), but I'm ignoring that for now
  • $wgOut seems to be the object which accumulates text to be output, via various methods:
    • $wgOut->addWikiText(...)
    • $wgOut->addHTML(...)
    • $wgOut->addPrimaryWikiText() # Display content and save to parser cache
    • $wgOut->addWikiText() # Display content, don't attempt to save to parser cache
    • $wgOut->setPageTitle()
    • $wgOut->transformBuffer(); # Put link titles into the link cache
    • $wgOut->addMetaTags(); # Add link titles as META keywords
  • ...and then it does these two lines:
    • $this->viewUpdates(); (found at line 1926 -- doesn't do much)
    • wfProfileOut( $fname );
  • It's not clear whether the navbar has already been pulled in by the time we hit viewUpdates -- possibly transformBuffer does it? The comment makes it sound like that, but the name "transformBuffer" in that case is not very descriptive. The code in there should probably be examined.