Adding to the Wiki

From Oxide Wiki
Jump to: navigation, search

This page will show you how to properly format entries into this wiki.

You have a number of main categories, generally try not to make any more categories. - hooks ( Oxide hooks into game engine ) - libraries ( Lua library or Oxide Lua library calls ) - class ( For data types or C# classes not part of Lua library )

You can also format code examples using Lua syntax highlighting.

Adding a New Page

If you want to add a new page you should first consider where in the structure it should go. There are many levels to the layouts; hooks, api, library

Once you decided where your new page will go you can add the new pages in 3 ways

  • search for it using the search up the top, on the results page you can see a red link: Create the page "Test" on this wiki!
  • add a link on another page by editing the page and add "[ [NewPageName] ]" then after save, click on the link
  • type a URL into your browser, it will create the new page: http://wiki.rustoxide.com/index.php?title=NewPageName

Adding New Categories

Create a new page and in the top of the edit box add the following tag

  • http://wiki.rustoxide.com/index.php?title=Category:NameForNewCategory

Adding Pages to Categories

Create your new page as above, and then paste something similar to the text below.

{{Class             <------------ Category this page will be files under, can be changed any time
|Namespace=global  
|Name=NetUser       <------------- Name of the class
|Assembly=Assembly-CSharp-firstpass.dll
|Description=One of the many classes Rust uses to represent a user, the main player class used in Oxide API functions
|Realm=Server
}}
== Fields and Properties ==   <------ This is a Section heading, type what you like here but this is the general format of other pages
* [[string]] displayName
* [[Class/PlayerClient|PlayerClient]] playerClient  <---- Link to "PlayerClient" data type in the "Class" data type in this Wiki

== Methods ==
* [[void]] Ban()
* [[boolean]] CanAdmin()
* [[boolean]] Kick([[Enum/NetError|NetError]] reason, [[boolean]] sendNotification)
* [[boolean]] Kick([[Enum/NetError|NetError]] reason, [[boolean]] sendNotification, [[boolean]] simulateImmediateDisconnect)
* [[void]] SetAdmin([[boolean] isAdmin)

== Example ==
<syntaxhighlight lang="lua">
-- This is where a small example for your function goes
function someExample( ) 
    print( "Example of using the function goes here" )
end
</syntaxhighlight>

Code Highlighting

You can format your Lua examples by adding the tags below into the edit box. Media Wiki will immediately colorize your code!

<syntaxhighlight lang="lua">
-- Here is your Lua code
function PLUGIN:test()
    local someval = 10
    return someval
end
</syntaxhighlight>

Which should look like this:

-- Here is your Lua code
function PLUGIN:test()
    local someval = 10
    return someval
end

You may also consult the following two sources:

Advanced Formatting

There is a lot you can do with MediaWiki, but rather than going over the same information do check out the MediaWiki help pages on this subject. You can find them at http://t-vox.org/index.php?title=MediaWiki_For_Beginners and also a complete list at http://www.mediawiki.org/wiki/Help:Formatting

Collapsing Sections

<div class="mw-collapsible mw-collapsed">
    This text is not collapsible; but the next is collapsible and hidden by default:
    <div class="mw-collapsible-content">
        This area has been hidden and is collapsed by default.
    </div>
</div>

Example:

   This text is not collapsible; but the next is collapsible and hidden by default:
       This area has been hidden and is collapsed by default.