O'Reilly logo

MediaWiki by Daniel J. Barrett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 15. Creating Extensions

MediaWiki has hundreds of third-party extensions, but sometimes you need something new. Perhaps you’d like to integrate MediaWiki with custom applications or databases on your corporate intranet. Or maybe you want the first vowel in each article to be blue. Whatever it is, MediaWiki’s extension architecture makes it is easy to add features to MediaWiki in a maintainable manner that doesn’t change the supplied “core” MediaWiki code.

To write extensions, you’ll need to know, at minimum, the PHP programming language. (This chapter assumes you know it.) For anything complicated, you’ll also need to become familiar with MediaWiki’s PHP code—particularly its classes, constants, and global variables—and its database schema. Your primary references are:

A full exploration of MediaWiki’s PHP classes and database tables is beyond the scope of this book. This chapter will only skim the surface of the power of extensions, but it should give you a healthy background to build on.

All code in this chapter was confirmed to work properly in MediaWiki 1.13.0, the most recent version at press time.

Tip

All extension code in this chapter is downloadable from:

http://examples.oreilly.com/9780596519681/

Overview of Extension Types

There ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required