© 2015 X2Engine Inc.

Difference between revisions of "Wiki Usage:For contributors"

From X2Engine
Jump to: navigation, search
(The X2Engine class reference)
 
(27 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
[[Category:Wiki Usage]]
 
[[Category:Wiki Usage]]
  
 +
== Bare Essentials ==
 
;Edit/create a page
 
;Edit/create a page
 
: Search for it, and if it doesn’t exist you’ll see a link to create it.
 
: Search for it, and if it doesn’t exist you’ll see a link to create it.
;Link to a class's documentation in the X2Engine class reference
+
;Edit/create a category
: <pre>[[x2doc:{class name}]]</pre> Example: [[x2doc:Contacts]]
+
: Search for Category:{Category Name} and create it in much the same way as with creating a page.
;Link to a class's documentation in the Yii Framework class reference
+
;Categorize a page
: <pre>[[yii:{class name}]]</pre> Example: [[yii:CActiveRecord]]
+
: Place at the top of the page: <pre>[[Category:{Category name}]]</pre>
 +
* [[mw:Help:Images|Help:Images]]
 +
* [[mw:Help:Links|Help:Links]]
 +
* [[mw:Help:Formatting|Help:Formatting]]
 +
* [[mw:Help:List|Help:List]]
 +
* [[mw:Help:Tables|Help:Tables]]
 +
* [[mw:Help:Contents|All help topics]]
 +
 
 +
== Interwiki Links ==
 +
Relevant page: [[mw:Manual:Interwiki|The InterWiki manual.]] Interwiki links are a great way to quickly link to a page in another instance of MediaWiki without including the full URL. The syntax is:
 +
<pre>[[{prefix}:{page}|]]</pre>
 +
Where the pipe is added at the end of the link to hide the interwiki prefix in the resulting link, which makes links look nicer in general. You can optionally set the link text manually by inserting it after the pipe.
 +
 
 +
For the list of Interwiki prefixes that are available in MediaWiki by default, see [[mw:Manual:Interwiki#Default|Interwiki]] in the MediaWiki documentation.
 +
 
 +
== Extra InterWiki Prefixes ==
 +
Prefixes have been added for common locations throughout this wiki;
 +
 
 +
=== The X2CRM Requirements Check Script ===
 +
For the sake of making it easy to insert a link to the requirements checker, the interwiki prefix <tt>requirements:</tt> will insert a link to requirements.php. The following code will produce a link with the filename:
 +
<pre>[[requirements:|requirements.php]]</pre>
 +
[[requirements:|requirements.php]]
 +
 
 +
=== The X2CRM class reference ===
 +
<pre>[[x2doc:{class name}|]]</pre> Example: <pre>[[x2doc:Contacts|]]</pre> becomes [[x2doc:Contacts|Contacts]]. You can also set link text to override the default (the "article name", which follows the colon) by putting it after the pipe in the interwiki code. Note, however, that because of the .html extension that is automatically appended, one cannot use this for referencing class properties. To do that, use "x2propdoc" interwiki alias;
 +
<pre>[[x2propdoc{class name}.html#_{property name}|{link text}]]</pre> Example: <pre>[[x2propdoc:Contacts.html#_afterFind|Contacts::afterFind()]]</pre> becomes: [[x2propdoc:Contacts.html#_afterFind|Contacts::afterFind()]]
 +
 
 +
=== The Yii Framework class reference ===
 +
<pre>[[yii:{class name}|]]</pre> Example: <pre>[[yii:CActiveRecord|CActiveRecord]]</pre> becomes: [[yii:CActiveRecord|CActiveRecord]]
 +
Also, if you wish to link to an attribute or method of a class, use the following syntax (the typical format of permalinks):
 +
<pre>[[yii:{class name}#{property name}-detail|{class name}::{property name}]]</pre> Example: <pre>[[yii:CController#render-detail|CController::render()]]</pre> becomes: [[yii:CController#render-detail|CController::render()]]
 +
 
 +
=== Pages in The Definitive Guide to Yii ===
 +
<pre>[[yiiguide:{article ID}|{link text}]]</pre>
 +
Article IDs will typically be a section and a page name in lower case, separated by a period, i.e. "basics.controller". You can also suffix the article ID with a hash fragment to jump to a section permalink. For example:
 +
<pre>[[yiiguide:basics.convention#directory|Fundamentals: Conventions]]</pre> becomes: [[yiiguide:basics.convention#directory|Fundamentals: Conventions]]
 +
 
 +
=== Pages on x2engine.com ===
 +
<pre>[[x2:{page name}|]]</pre> Example: [[x2:partners|partners]]

Latest revision as of 20:49, 31 January 2013


Bare Essentials

Edit/create a page
Search for it, and if it doesn’t exist you’ll see a link to create it.
Edit/create a category
Search for Category:{Category Name} and create it in much the same way as with creating a page.
Categorize a page
Place at the top of the page:
[[Category:{Category name}]]

Interwiki Links

Relevant page: The InterWiki manual. Interwiki links are a great way to quickly link to a page in another instance of MediaWiki without including the full URL. The syntax is:

[[{prefix}:{page}|]]

Where the pipe is added at the end of the link to hide the interwiki prefix in the resulting link, which makes links look nicer in general. You can optionally set the link text manually by inserting it after the pipe.

For the list of Interwiki prefixes that are available in MediaWiki by default, see Interwiki in the MediaWiki documentation.

Extra InterWiki Prefixes

Prefixes have been added for common locations throughout this wiki;

The X2CRM Requirements Check Script

For the sake of making it easy to insert a link to the requirements checker, the interwiki prefix requirements: will insert a link to requirements.php. The following code will produce a link with the filename:

[[requirements:|requirements.php]]

requirements.php

The X2CRM class reference

[[x2doc:{class name}|]]
Example:
[[x2doc:Contacts|]]
becomes Contacts. You can also set link text to override the default (the "article name", which follows the colon) by putting it after the pipe in the interwiki code. Note, however, that because of the .html extension that is automatically appended, one cannot use this for referencing class properties. To do that, use "x2propdoc" interwiki alias;
[[x2propdoc{class name}.html#_{property name}|{link text}]]
Example:
[[x2propdoc:Contacts.html#_afterFind|Contacts::afterFind()]]
becomes: Contacts::afterFind()

The Yii Framework class reference

[[yii:{class name}|]]
Example:
[[yii:CActiveRecord|CActiveRecord]]
becomes: CActiveRecord

Also, if you wish to link to an attribute or method of a class, use the following syntax (the typical format of permalinks):

[[yii:{class name}#{property name}-detail|{class name}::{property name}]]
Example:
[[yii:CController#render-detail|CController::render()]]
becomes: CController::render()

Pages in The Definitive Guide to Yii

[[yiiguide:{article ID}|{link text}]]

Article IDs will typically be a section and a page name in lower case, separated by a period, i.e. "basics.controller". You can also suffix the article ID with a hash fragment to jump to a section permalink. For example:

[[yiiguide:basics.convention#directory|Fundamentals: Conventions]]
becomes: Fundamentals: Conventions

Pages on x2engine.com

[[x2:{page name}|]]
Example: partners