Encyclopedia > Wikipedia:PHP script FAQ

  Article Content

Wikipedia:PHP script FAQ

This page aims to discuss the new script and the changes in behaviour it causes compared to the old software. See also PHP script -- New features

Table of contents

What happened to sub-pages and why?

Subpage functionality has been removed. The "/" is now a normal character and can still be used in page titles, although this is discouraged in favor of a "Name (Category)" style. The reasons for this change are outlined in Wikipedia:Do not use subpages.

The namespaces now have the closest subpage-like functionality.

What is a namespace?

A namespace is a set of pages which have a similar function within Wikipedia. This is useful to avoid mixups of user names and wikipedia articles, and for other organizational purposes. The namespace is part of the article title, divided from the actual name by a ":".

For instance, we can have an article Vulture and another article user:Vulture[?]. The first lives in the "blank" namespace and is an encyclopedia article, the second in the user namespace and describes a Wikipedian.

The namespace of an article is indicated by prepending it to the title, separated with a colon. An exception is the main, "blank" namespace for regular encyclopedia articles: it is used by default if no other namespace is explicitly given.

New namespaces cannot be created by Wikipedians. If you would like a new namespace, please post on wikipedia:Suggested features[?], Wikipedia-L, or Wikitech-L, or do some hacking and propose a patch.

Currently, these namespaces exist:

  • The "blank" or invisible namespace, like in Main Page. Used for normal encyclopedia articles.
  • The user: namespace. For user pages: Wikipedians describing themselves and their contributions etc.
  • The wikipedia: namespace. For pages that concern Wikipedia internals, like this very page.
  • The image: namespace. For pages that describe images loaded into Wikipedia.
  • The talk: namespace. This replaces the "/Talk" subpages. There are actually several different namespaces: "talk:" for discussion about articles in the blank namespace, "user_talk:" for discussion of user pages, "wikipedia_talk:" for discussion of pages in the wikipedia: namespace, and image_talk for discussion of image pages.
  • The special: namespace. These pages don't really exist, they are generated on-the-fly by the software each time they are viewed.

Pages in all these namespaces can be created and edited by all users, except for the special: and log: ones. You can link to all namespaces, like [[special:Recentchanges]] will link to special:Recentchanges.

What changes have been made to the use of certain punctuation marks in titles?

Many punctuations and special chars can now be part of the title. Details are still subject to change.

For the moment, it should be safe to use the following characters: - , . ( ) ' / ! & : ;. It is also possible to use the underscore (_); however, those are converted to spaces.

You cannot currently use the following: " # $ * + < > = ? @ [ ] \ ^ ` { } | ~

The colon (:) is a special case; it is used to indicate namespaces for special pages (see above) and should only ever be used in the name of a regular title where strictly necessary for correctness (as in 2001: A Space Odyssey). Ordinary articles can never start with any of the reserved namespace prefixes followed by a colon: please note that using colons unnecessarily in article titles will complicate the management of namespaces later on.

Where subpages once existed, how did the conversion affect them?

The titles didn't change. On subpages that didn't link back to their "parent" topic, such a link was added. Any "/Subpage" links were converted into "[[Parent/Subpage]]", with the exception of "/Talk" subpages, which have been converted to the corresponding "talk:" namespace and every link to /Talk has been converted to a link to the corresponding page in the talk: (or user_talk: etc.) namespace.

These automatically generated links to the talk page are redundant now and can be deleted since the talk links are always shown in the lower right.

How do I redirect? (If it's the same as before, it doesn't seem to work with articles entitled with people's names)

No change here, unexpected behaviour is due to bugs and will be fixed.

What motivated the switch?

The old software (UseModWiki) was never planned to handle the amount of pages that we currently have. Also, there was no focused effort to implement new functions in that software, or it was just next to impossible to do.

Why are we using PHP instead of perl?

It's largely a religious question, though there's no denying that Perl has many more features than PHP and it's probably faster too, when properly configured. I'm personally sad to see Perl wikipedia being replaced by PHP code: perl is wider known, more stable between versions, its development community is much larger, and I know it ;) Having said that, there's still need for better wiki to be written for wikipedia which would support namespaces together with many other features, and it's probably time to move to MySQL rather than flat-files underlying storage system, too. Magnus has volunteered his time and code and no Perl enthusiast did the same - that, I suspect, is the reason. --AV

It seems that from all the volunteers for writing article, none of them did volunteer to write a single line of code for the PHP wiki. So far, Clifford Adams was most helpful by giving me a short Perl script for the conversion, which I was able to translate into PHP. Anyway, I am sure Perl has more features, but I doubt that for an application like wikipedia, it has real advantages; on the contrary, as PHP was designed especially for WWW interfaces, it is probably more suited for this purpose. And, the PHP program doesn't read like a segmentation fault ;) --Magnus Manske

Why are we using MySQL as a database, not PostgreSQL?

I'll stick to the MySQL version for now, since I have barely the time to maintain that one alone right now. Once it is up, and has no real bugs anymore, I could try PostgreSQL at a test site and convert it if it is really faster. --Magnus Manske

If the app. relies much on any complex joins, than PostgreSQL will probably be able to outperform MySQL. If it's mostly simple selects from a single table, than probably not. But as the number of users increases, PostgreSQL handles locking issues much better through its Multi-Version Concurrency Control, which is essentially better than row-level locking. So if you get the chance and time permits, I think it would be worthwhile to give PostgreSQL a try. --Wesley

How do I create a special page (New system features?) that will show up on the sidebar?

Not at all ;)
Pages in the special: namespace, as well as the sidebar, are generated by the program that runs wikipedia. To add new special pages or expand the sidebar, one will have to change the program. If you would like a new special page, please post on wikipedia:Feature requests, Wikipedia-L, or Wikitech-L, or do some hacking and propose a patch.

What other functionality has changed?

  • CamelCase linking has been turned off
  • The diff functionality on revision history pages is different

See also Wikipedia:PHP script new features.

Return to the Wikipedia FAQ, Wikipedia software.

How do I upgrade from previous version of PHPwiki to new codebase? Just using the old database does not work because of lots of new fields in tables.

How do I install the code under Windows? I simply could not install Wikipedia under Windows.. I wish the process was better explained.. 2 of my friends tried so far and it did not work...

What is the process? We d'load PHP W.. We have a script.... Then what?



All Wikipedia text is available under the terms of the GNU Free Documentation License

 
  Search Encyclopedia

Search over one million articles, find something about almost anything!
 
 
  
  Featured Article
Museums in England

... of Moving Image[?] (MOMI) National Gallery National Portrait Gallery Natural History Museum[?] Science Museum Tate Gallery: Tate Britain and Ta ...

 
 
 
This page was created in 44.9 ms