Difference between revisions of "Help:Index"

From COMP15212 Wiki
pc>Yuron
gravatar W81054ch [userbureaucratinterface-adminsysopPHRhYmxlIGNsYXNzPSJ0d3BvcHVwIj48dHI+PHRkIGNsYXNzPSJ0d3BvcHVwLWVudHJ5dGl0bGUiPkdyb3Vwczo8L3RkPjx0ZD51c2VyPGJyIC8+YnVyZWF1Y3JhdDxiciAvPmludGVyZmFjZS1hZG1pbjxiciAvPnN5c29wPGJyIC8+PC90ZD48L3RyPjwvdGFibGU+] (talk | contribs)
m (1 revision imported)
(No difference)

Revision as of 07:22, 14 August 2019

This page covers the various page-editor oriented features of the site, and how to use them.

Dependencies

Dependencies mark the relation between two articles; dependencies are specified on the article that depends on another article as thus:

{{#invoke:Dependencies|add|(Page name),(dependency strength)|(Another page name),(dependency strength)}}

or actual example from System Calls:

{{#invoke:Dependencies|add|Exceptions,5|Libraries,4}}

A lua module is used so that each page may have an arbitrary number of dependencies; just add another (Page name),(dependency strength) parameter pair to the end of the #invoke call.

The lua module both registers the dependency, and renders a dependency box onto the page as well.

Dependencies show up on page graphs as arrows, and are used in the Contents page to determine page order for DFS and BFS.

"Dependency strength" is an integer from 1-5, and determines how thick the line will be on the page graph, as well as how "far" a node is from another on the page graph for the maximum distance setting. It is not a very useful property, so when in doubt, set it to 3, which is a sensible default value..

Paths

Paths are basically ordered categories with a small amount of pages. A page may be on multiple paths; for each path, simply add the template

{{Path|(Page name)|(Path order)}}

to set the path and display the path on the page. The path order is an integer that sets the ordering of an article in a path, and it is displayed next to the article in the Path widget.

For example,

{{Path|OS Topics|2}}

sets the page it is placed on to the second position in the path "OS Topics". This page will appear as "2: (Page name)" on the path widget, and will be located between the pages with path orders 1 and 3.

Unfortunately, there is no convenient way to re-order a path other than setting the order manually on all pages on a path; adding or removing pages from a path also requires manually propagating the page order changes to other pages in the path. This is a consequence of paths being defined separately in each of its pages, so ordering is tricky.


Category

Mediawiki-native categories are called with the template Category as thus:

{{Category|(Category name)}}

this template sets the category, and displays a list of all articles in the category.

Widgets

It is simple to add new Javascript demonstrations through widgets. Simply put all of the HTML and Javascript related to the widget into one file, and paste it into a page in the Widget namespace, i.e. Widget:NewDemo. The file should also function when opened directly in a browser - if the file uses no links, and functions independently when opened in a browser, it will most likely work as a widget.

Embed widgets in external (non-wiki) pages

The special page Special:ShowWidget is provided for this purpose. By default, a dark theme is applied to the widget, as the lecture slides, where they will most likely be embedded,use a dark theme.

The URL (Wiki domain)/index.php/Special:ShowWidget?widget=(Widget name) leads to an embeddable widget.

If a normal (light-themed) widget is desired, add &style= after the URL.

Some widgets (Scheduling) requires the parameter &library to obtain Bootstrap, so that they would look properly when embedded. Additionally, ReadFile and WriteFile depend on UsingFileDemos, so they must be called with UsingFileDemos.ReadFile and UsingFileDemos.WriteFile to include both widgets in the resulting page.

The correct link to embed a Widget can be found in their page on this wiki.

Other article properties

The statement

{{#set: Priority=(priority) | Summary=(page summary)}}

is used to set the summary and priority of a page as Semantic Mediawiki properties. The page priority determines how important a page is; a page with lower priority than UDImportantArticleLowerBound (default value is 3) is considered "unimportant", and will not show up in the suggestions in the Dashboard.

UDImportantArticleLowerBound is defined in extension.json from the userDash extension.

The summaries show up as tooltips in the page graph, and next to the page graph as suggestions for next pages to read. It is advised to always fill in these two properties on any page in the Main and Exercise namespaces, otherwise a default value would be used.

TODOs

A number of "TODO"s were inherited from MESH, where they were left as comments in the markdown/HTML. They have been copied to this wiki, with minor modifications; they can be found be seraching for TODO in the search bar, though they are not displayed on the page.