Developers:HowToTameMediaWiki
From WikiPathways
(Difference between revisions)
Current revision (15:19, 17 May 2008) (view source) |
|||
(One intermediate revision not shown.) | |||
Line 12: | Line 12: | ||
** Use: | ** Use: | ||
*** Get local time/date | *** Get local time/date | ||
+ | |||
+ | == Useful queries == | ||
+ | * Show all deleted pathways: | ||
+ | <pre>select distinct(ar_title) from archive where ar_namespace = 102;</pre> | ||
== Creating a link to a wiki page == | == Creating a link to a wiki page == | ||
Line 25: | Line 29: | ||
* http://www.wikipathways.org/index.php/MediaWiki:Common.css | * http://www.wikipathways.org/index.php/MediaWiki:Common.css | ||
* http://www.wikipathways.org/index.php/MediaWiki:Sidebar | * http://www.wikipathways.org/index.php/MediaWiki:Sidebar | ||
+ | |||
+ | == How to Restrict Special Pages == | ||
+ | * Alter /var/www/wikipathways/includes/SpecialPages.php | ||
+ | * Add 'block' as a third term to the array of each special page you want to restrict. This, in effect, requires 'block' permissions for users to be able to view the Special Page, or even see it lists under Special pages. |
Current revision
Because MediaWiki's documentation is very sparse and scattered it may be hard to handle sometimes. This page is intended for additional function documentation and short howto's on problems that took you a while to find a solution for. Please put them here, so we don't run into them twice.
Contents |
Resources
Some useful global variables
- $wgSkin: the currently used skin
- Use:
- Get link objects
- Use:
- $wgUser: the current user
- Use:
- Get local time/date
- Use:
Useful queries
- Show all deleted pathways:
select distinct(ar_title) from archive where ar_namespace = 102;
Creating a link to a wiki page
Use the function Skin::makeKnownLinkObj(Title $title, String $text):
- $title: the Title object of the wiki page
- $text: the text that the link should display (text between the <a> tags)
How to control the browse page
Using DynamicPageList2 (DPL):
Commonly editted admin pages
- http://www.wikipathways.org/index.php/MediaWiki:Common.css
- http://www.wikipathways.org/index.php/MediaWiki:Sidebar
How to Restrict Special Pages
- Alter /var/www/wikipathways/includes/SpecialPages.php
- Add 'block' as a third term to the array of each special page you want to restrict. This, in effect, requires 'block' permissions for users to be able to view the Special Page, or even see it lists under Special pages.