Help:Adding parser functions: Difference between revisions

From Feminist SF Wiki
Jump to navigation Jump to search
(basic info)
 
(ai)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
Adding parserfunctions - documentation at [http://meta.wikimedia.org/wiki/ParserFunctions meta.wikimedia.org]
Adding parserfunctions - documentation at [http://meta.wikimedia.org/wiki/ParserFunctions meta.wikimedia.org]


Much more detailed info at meta.wikimedia.org, but basic info here:  
Much more detailed info at meta.wikimedia.org, but basic info copied from wikimedia.org to here:  


<includeonly>{{
== Installation ==
  #ifeq: {{lc:{{SUBPAGENAME}}}} | {{{override|doc}}}
  | <!-- doc page -->
</includeonly>{{
    #ifeq: {{{doc-notice|show}}} | show
    | <div class="messagebox" id="template_doc_page_viewed_directly" style="padding-left:1ex;">'''This is a [[Wikipedia:Template documentation|documentation]] [[Wikipedia:Subpages|subpage]] for {{{1|[[{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}''' <small>(see that page for the {{ #if: {{SUBJECTSPACE}} | {{lc:{{SUBJECTSPACE}}}} | article }} itself)</small>.<br />It contains usage information, [[Wikipedia:Categories|categories]] and other content that is not part of the original {{ #if: {{SUBJECTSPACE}} |{{lc:{{SUBJECTSPACE}}}} page|article}}. </div>
  }}{{DEFAULTSORT:{{PAGENAME}}}}{{
    #if: {{{inhibit|}}}
    | <!-- skip -->
    | [[Category:{{
      #if: {{SUBJECTSPACE}}
      | {{SUBJECTSPACE}}
      | Article
    }} documentation<noinclude>| </noinclude>]]
  }}<includeonly>
|<!-- if not on a /doc subpage, do nothing -->
}}</includeonly><noinclude>


{{pp-semi-template|small=yes}}
Download all 4 of these files and put them in a new directory called ''ParserFunctions'' in your [[mw:Manual:Extensions|extensions]] directory.
----
 
{{documentation}}<!--
* [http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/ParserFunctions/Expr.php Expr.php]
Add categories and interwikis to the /doc subpage, not here!
* [http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/ParserFunctions/ParserFunctions.php ParserFunctions.php]
--></noinclude>
* [http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/ParserFunctions/ParserFunctions.i18n.php ParserFunctions.i18n.php]
* [http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/ParserFunctions/ParserFunctions.i18n.magic.php ParserFunctions.i18n.magic.php]
 
If you don't have php5 use these files instead (older revision):
* [http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/ParserFunctions/Expr.php?revision=16633 Expr.php]
* [http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/ParserFunctions/ParserFunctions.php?revision=16633 ParserFunctions.php]
 
Then put the following at the end of your [[mw:Manual:LocalSettings.php|LocalSettings.php]]:
 
require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" );
 
If you get errors such as "Warning: require_once(/extensions/ParserFunctions/ParserFunctions.php) [function.require-once]: failed to open stream:", you should substitute the line for:
 
require_once( 'extensions/ParserFunctions/ParserFunctions.php' );
 
[[Category:FSFwiki administration|{{PAGENAME}}]]
[[category:FSFwiki admin index|{{PAGENAME}}]]

Latest revision as of 06:54, 9 March 2009

Adding parserfunctions - documentation at meta.wikimedia.org

Much more detailed info at meta.wikimedia.org, but basic info copied from wikimedia.org to here:

Installation

Download all 4 of these files and put them in a new directory called ParserFunctions in your extensions directory.

If you don't have php5 use these files instead (older revision):

Then put the following at the end of your LocalSettings.php:

require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" );

If you get errors such as "Warning: require_once(/extensions/ParserFunctions/ParserFunctions.php) [function.require-once]: failed to open stream:", you should substitute the line for:

require_once( 'extensions/ParserFunctions/ParserFunctions.php' );