Help:Editing: Difference between revisions

Help page
m (Britta moved page Help:Contents to Help:Editing)
(→‎How templates work: +link list of pages in Template namespace)
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Formatting tips ==
If you have questions about how to edit this wiki, feel free to ask in the #iphonedev IRC channel - see [[How to use IRC]] for help, or use [https://kiwiirc.com/client/irc.saurik.com/#iphonedev this convenient web client for #iphonedev].


=== Syntax highlighting ===
iPhoneDevWiki runs on the MediaWiki software, the same as Wikipedia and many other large wikis, so most help for editing Wikipedia/MediaWiki will apply here too.
 
== Documenting style guide ==
 
Some basic guides to make the wiki consistent.
 
=== General ===
 
If existent, add these sections in the following order, respecting the line breaks:
 
<source lang="text">
= See also =
 
* [[Topic]]
* [[Another topic]]
 
= References =
<references />
 
= External links =
 
* [URL Title]
* [AnotherURL Another title]
 
</source>
 
=== Libraries ===
 
Should contain an <code>Infobox</code> at the top, see [http://iphonedevwiki.net/index.php/Help:Editing#How_to_add_an_infobox_to_the_top_of_an_article below] for more information on how to add one.
 
It should also contain the following at the bottom:
 
<source lang="text">
[[Category:Cydia packages]]
</source>
 
=== Classes ===
 
Add the following to the end of the page:
 
<source lang="text">
[[Category:Classes in X]]
[[Category:Documented Classes]]
</source>
 
Replacing <code>X</code> with the library or framework the class is from.
 
== Help with basic markup (page editing syntax) ==
 
To figure out how to make links, italics, bold, images, and so on:
 
'''[https://en.wikipedia.org/wiki/Help:Cheatsheet See Wikipedia's formatting cheatsheet]'''.
 
== Advanced markup/syntax ==
 
For help making tables, see [https://www.mediawiki.org/wiki/Help:Tables MediaWiki's table formatting page].
 
For adding new tables, here's a quick template for copypasting:
 
<source lang="text">{| class="wikitable"
! Key !! Description
|-
| a || b.
|}</source>
 
Will produce:
 
{| class="wikitable"
! Key !! Description
|-
| a || b.
|}
 
== How to make new articles (new pages) ==
 
An easy way to make a new article: type your desired article title into the search box, and click the "Create the page" link on the search results page. Then type in the content that you want, and save it.
 
== Fancy syntax highlighting ==


You can make code snippets nicely syntax-highlighted using these tags:
You can make code snippets nicely syntax-highlighted using these tags:
Line 15: Line 92:
  </source>
  </source>


This wiki uses [http://qbnz.com/highlighter/ GeSHi] as the syntax highlighter. It supports [https://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi#Supported_languages many] languages such as <code>bash, c, cpp, text</code>.


This wiki uses [http://qbnz.com/highlighter/ GeSHi] as the syntax highlighter. It supports [https://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi#Supported_languages many] languages such as <code>bash, c, cpp, text</code>.
== Templates ==
 
=== How templates work ===
 
Generally when you see double curly brackets like <nowiki>{{CoreFoundation Version Table}}</nowiki> while editing a page, that means the page is embedding a "template". To edit that template, you can modify the URL in your browser to go to that template's page, like this one: http://iphonedevwiki.net/index.php/Template:CoreFoundation_Version_Table
 
Templates can be simple text or include variables; if you're curious, see [https://www.mediawiki.org/wiki/Help:Templates the MediaWiki documentation about templates].
 
[https://iphonedev.wiki/index.php/Special:AllPages?from=&to=&namespace=10 Here] is a list of all templates available on iPhoneDevWiki.
 
=== How to add an infobox to the top of an article ===
 
You can add an "infobox" to the top right of an article to provide quick reference information about a package or framework.
 
Here's an example of a package infobox, as seen on [[SBSettings]]:
 
<nowiki>{{Infobox Package
|icon = Sbsettingsicon.png
|screenshot = Sbsfreemem2.png
|developer = BigBoss
|version = 5.2.1
|package =  sbsettings
}}</nowiki>
 
You can leave out some of those attributes (such as "icon" and "screenshot") or leave them blank if you want. The "developer" attribute can be a link to a person's profile page on the wiki, such as <code><nowiki>[[User:Dustin Howett|Dustin Howett]]</nowiki></code>. If you want to upload a screenshot, you can do that by going to [[Special:Upload]].
 
Here's an example of a framework infobox, as seen on [[Preferences.framework]]:
 
<nowiki>{{infobox Framework
| vis = Private
| since = 2.0
| classID = PS
| bundle = com.apple.preferences
}}</nowiki>
 
The attribute "vis" can be "Private" or "Public". Again, you can choose to leave out some of those attributes (such as "classID" and "bundle").


=== Navigation boxes ===
=== How to add a navigation box to the bottom of an article ===


To add a helpful navigation box to the bottom of an article documenting a class, you can use tags like these:
To add a helpful navigation box to the bottom of an article documenting a class, you can use tags like these:
Line 25: Line 138:


  <nowiki>{{occlass|library=CoreFoundation.framework|navbox=1}}</nowiki>
  <nowiki>{{occlass|library=CoreFoundation.framework|navbox=1}}</nowiki>
If you add this navigation box to an article, the article link will automatically show up within that navigation box.
(If you're curious how this template works, go to [[:Template:Occlass]] and click "edit" to view its source. Another template you might be curious about: [[:Template:IPFHeader]].)
=== How to add categories to an article ===
To put an article in a category, add one or more lines like this to the bottom of the article:
<nowiki>[[Category:Category name]]</nowiki>
<nowiki>[[Category:Another category name]]</nowiki>
If a category doesn't exist yet, it'll be automatically created when you add the category to an article.
A list of existing categories that you may want to choose from: [[Special:Categories]].

Latest revision as of 08:29, 14 April 2021

If you have questions about how to edit this wiki, feel free to ask in the #iphonedev IRC channel - see How to use IRC for help, or use this convenient web client for #iphonedev.

iPhoneDevWiki runs on the MediaWiki software, the same as Wikipedia and many other large wikis, so most help for editing Wikipedia/MediaWiki will apply here too.

Documenting style guide

Some basic guides to make the wiki consistent.

General

If existent, add these sections in the following order, respecting the line breaks:

= See also =

* [[Topic]]
* [[Another topic]]

= References =
<references />

= External links =

* [URL Title]
* [AnotherURL Another title]

Libraries

Should contain an Infobox at the top, see below for more information on how to add one.

It should also contain the following at the bottom:

[[Category:Cydia packages]]

Classes

Add the following to the end of the page:

[[Category:Classes in X]]
[[Category:Documented Classes]]

Replacing X with the library or framework the class is from.

Help with basic markup (page editing syntax)

To figure out how to make links, italics, bold, images, and so on:

See Wikipedia's formatting cheatsheet.

Advanced markup/syntax

For help making tables, see MediaWiki's table formatting page.

For adding new tables, here's a quick template for copypasting:

{| class="wikitable"
! Key !! Description
|-
| a || b.
|}

Will produce:

Key Description
a b.

How to make new articles (new pages)

An easy way to make a new article: type your desired article title into the search box, and click the "Create the page" link on the search results page. Then type in the content that you want, and save it.

Fancy syntax highlighting

You can make code snippets nicely syntax-highlighted using these tags:

<source lang=objc>
NSObject *anObject = [[NSObject alloc] init];
</source>

Which will produce an output that looks like the following:

 NSObject *anObject = [[NSObject alloc] init];

This wiki uses GeSHi as the syntax highlighter. It supports many languages such as bash, c, cpp, text.

Templates

How templates work

Generally when you see double curly brackets like {{CoreFoundation Version Table}} while editing a page, that means the page is embedding a "template". To edit that template, you can modify the URL in your browser to go to that template's page, like this one: http://iphonedevwiki.net/index.php/Template:CoreFoundation_Version_Table

Templates can be simple text or include variables; if you're curious, see the MediaWiki documentation about templates.

Here is a list of all templates available on iPhoneDevWiki.

How to add an infobox to the top of an article

You can add an "infobox" to the top right of an article to provide quick reference information about a package or framework.

Here's an example of a package infobox, as seen on SBSettings:

{{Infobox Package
 |icon = Sbsettingsicon.png
 |screenshot = Sbsfreemem2.png
 |developer = BigBoss
 |version = 5.2.1
 |package =  sbsettings
 }}

You can leave out some of those attributes (such as "icon" and "screenshot") or leave them blank if you want. The "developer" attribute can be a link to a person's profile page on the wiki, such as [[User:Dustin Howett|Dustin Howett]]. If you want to upload a screenshot, you can do that by going to Special:Upload.

Here's an example of a framework infobox, as seen on Preferences.framework:

{{infobox Framework
 | vis = Private
 | since = 2.0
 | classID = PS
 | bundle = com.apple.preferences
 }}

The attribute "vis" can be "Private" or "Public". Again, you can choose to leave out some of those attributes (such as "classID" and "bundle").

How to add a navigation box to the bottom of an article

To add a helpful navigation box to the bottom of an article documenting a class, you can use tags like these:

{{occlass|library=SpringBoard.app|navbox=1}}
{{occlass|library=CoreFoundation.framework|navbox=1}}

If you add this navigation box to an article, the article link will automatically show up within that navigation box.

(If you're curious how this template works, go to Template:Occlass and click "edit" to view its source. Another template you might be curious about: Template:IPFHeader.)

How to add categories to an article

To put an article in a category, add one or more lines like this to the bottom of the article:

[[Category:Category name]]
[[Category:Another category name]]

If a category doesn't exist yet, it'll be automatically created when you add the category to an article.

A list of existing categories that you may want to choose from: Special:Categories.