Extension:LandingPage
|
|
This extension stores its code inside a wiki page. Please be aware that MediaWiki developers do not review or keep track of extensions that put their code on the wiki.
|
|
LandingPage Release status: experimental |
|
|---|---|
| Implementation | Parser function |
| Description | Follows redirections to landing page |
| Author(s) | John Erling Blad |
| Last version | 0.5 (2009-12-17) |
| License | GPL |
| Download | LandingPage.php, LandingPage.i18n.php |
|
Check usage (experimental) |
|
LandingPage is an extension to MediaWiki that includes in the rendered text of a page the title, user name or real name for the landing page of a redirect or a direct link.
Contents |
[edit] Installation
- Download LandingPage.php and LandingPage.i18n.php, and save them in extensions/LandingPage directory on your wiki.
- Insert this line in the LocalSettings.php file:
include_once('extensions/LandingPage/LandingPage.php');
[edit] Usage
- {{LANDINGPAGE
- [page|redirect]|[alt]}} : Reports the page name of the final landing page.
- {{LANDINGSUBPAGE
- [page|redirect]|[alt]}} : Reports the page name of the subpage name of the final landing page.
- {{LANDINGPREFIXED
- [page|redirect]|[alt]}} : Reports the page name of the prefixed name of the landing page.
- {{LANDINGUSER
- [page|redirect]|[alt]}} : Reports the page name of the user name of the final landing page, reports error if the final page is not a user page.
- {{LANDINGREALUSER
- [page|redirect]|[alt]}} : Reports the page name of the real user name of final landing page, reports error if the final page is not a user page.
If the name of the parser function is prepended with "LINK", then a link to the page is created instead of the name. The alternate text will not be transformed into a link.
One single level of redirects will be traversed, not more, and it is legal to point directly to the final page. This makes the parser functions somewhat fail proof in a scenario where pages moves around.
[edit] Examples
Assume there is a redirect [[worker]] pointing to the user page [[User:FBar]], with this user having a realname of "Foo Bar".
- LANDINGPAGE
{{LANDINGPAGE:worker}} → FBar
- LANDINGPAGE
{{LINKLANDINGPAGE:worker}} → [[worker|FBar]]
- LANDINGREALUSER
{{LANDINGREALUSER:worker}} → Foo Bar
- LANDINGREALUSER
{{LINKLANDINGREALUSER:worker}} → [[worker|Foo Bar]]
[edit] Alternatives
- Not known
[edit] See also
- Extension:Realnames
- Extension:PageHistoryRealnames
- Extension:SearchRealnames
- Extension:ShowRealUsernames
[edit] Feedback
Use the discussion page for feedback, questions, feature requests and bug reports.
