Difference between revisions of "Maker Hub Wiki"

From maker-hub
Jump to navigation Jump to search
Line 25: Line 25:
 
  |?Allows value list=Allowed Values
 
  |?Allows value list=Allowed Values
 
}}
 
}}
 +
 +
 +
===Creating New Properties===
  
 
To create a new property, assign it on a page using standard Property Syntax. This can be done [https://www.semantic-mediawiki.org/wiki/Help:Properties_and_types inline], but most often in this wiki, you will see the [https://www.semantic-mediawiki.org/wiki/Help:Setting_values set] directive used.  
 
To create a new property, assign it on a page using standard Property Syntax. This can be done [https://www.semantic-mediawiki.org/wiki/Help:Properties_and_types inline], but most often in this wiki, you will see the [https://www.semantic-mediawiki.org/wiki/Help:Setting_values set] directive used.  
Line 35: Line 38:
 
When you have saved this property, reference the [https://www.semantic-mediawiki.org/wiki/Help:Factbox Factbox]] located at the bottom of the screen. If this is not visible, insert the line  
 
When you have saved this property, reference the [https://www.semantic-mediawiki.org/wiki/Help:Factbox Factbox]] located at the bottom of the screen. If this is not visible, insert the line  
 
  <nowiki> __SHOWFACTBOX__ </nowiki>
 
  <nowiki> __SHOWFACTBOX__ </nowiki>
at the bottom of the wiki page. Remember to remove this line when you have completed it. This will show you the properties created on this page and their values. You can click on the links to the new properties to open their wiki pages. Conversely, you could simply navigate to Property:Property_1_Name in the Wiki if that is easier (and skip the whole factbox thing - but - I like to see the values). On the property page, you will want to declare the property [https://www.semantic-mediawiki.org/wiki/Help:List_of_datatypes dataype]. The default type is Page, but it is still useful to set this. You can see the datatypes specified or our properties in the table above.
+
at the bottom of the wiki page. Remember to remove this line when you have completed it. This will show you the properties created on this page and their values. You can click on the links to the new properties to open their wiki pages. Conversely, you could simply navigate to Property:Property_1_Name in the Wiki if that is easier (and skip the whole factbox thing - but - I like to see the values). On the property page, you will want to declare the property [https://www.semantic-mediawiki.org/wiki/Help:List_of_datatypes dataype]. The default type is Page, but it is still useful to set this. You can see the datatypes specified or our properties in the table above. It is a good idea to look at the Wiki code on these pages and copy it from a similar property.
 +
 
 +
===Restricting Property Values===
 +
 
 +
It

Revision as of 21:27, 20 June 2018

This wiki is created on MediaWiki Version 1.35.7 (2912741).

The goal of this wiki is to provide information on the facilities, equipment, tools, supplies, and software available in the George Fox University Maker Hub. If you have never edited a Wiki before, you should reference the documentation on the MediaWiki site - specifically the page on Editing.

This site makes use of the standard extension, Semantic MediaWiki. This extension allows us to set one or more properties on unique wiki pages. These properties can then be queried within other pages and the results can be dynamically displayed in a variety of result formats. The main benefit is that a lot of entries can be auto-generated to allow easy navigation of the site as the site develops and evolves. The editors can add new pages, attach properties to those pages, and then have those pages automatically show up on other pages. This saves the editors from having to maintain a variety of lists on multiple pages.

For example, on the Main Page, there is a section for Facilities. This section looks like this:

==[[Facilities]]==
The Maker Hub is comprised of the following [[Facilities|facilities]]. These links describe each area and the resources within those areas.
{{#ask: [[Is facility::True]]
 |format=ul
}}

The ask directive is a Semantic MediaWiki inline query. This particular query searches the wiki pages for pages that have the property Is facility set to True. (There is an article on Property naming and in the best practices section, it is advised that you use a verb phrase to describe properties). Also, properties can have various datatypes - in this case, the property datatype is Boolean. The |format=ul line directs the results to be printed out as an unordered list.

The value in this particular setup is that, when a new facility is added to the space, it will automatically show up in this list. Now, one might argue that facilities are not going to show up at frequent intervals, and, this is true. However, we can extend this practice to create new lists, and Equipment is one of the major ones. The use of properties allows us to have properties that mark pages as equipment (Is equipment::True), and to say that the equipment is located in a particular facility (Is Located in facility::Machine Shop), and to indicated that the equipment is used in a particular domain (Is used in domain::Metal). The use of properties rather than page structure gives us tremendous flexibility in expanding to future groupings. Imagine that we might want to see all equipment that is used on Wood that is located in the Machine Shop or the Wood Shop. This can be easily generated with a query.

Properties

You can see all of the properties in use on the page Special:Properties. However, these are all of the properties in use in the entire Wiki. To identify the properties of interest to us, we will mark each of them with the Boolean property Property:Is property. Clicking on this link shows every property we have marked with this. However, we would also like to add the datatype property (Property:Has type) as well as a description for our own use (Property:Description). We can query these properties and display a table here like this (view the source to see how this is done):

 DescriptionDatatype"Has type" is a predefined property that describes the datatype of a property and is provided by Semantic MediaWiki.Allowed Values"Allows value list" is a predefined property that can specify a reference to a list that holds permissible values to restrict value assignments for a property and is provided by Semantic MediaWiki.
Has QR codePage
Has aceRecord
Has certificationURL
Has descriptionText
Has email addressEmail
Has functionText
Has iconPage
Has icondescText
Has iconwnamePage
Has imagePage
Has imagedescText
Has makeText
Has modelText
Has nameText
Has redirectText
Has second aceRecord
Has toolRecord
Has tool pageText
Has urlURL
Has versionText
Is domainBoolean
Is equipmentBoolean
Is equipment iconBoolean
Is facilityBoolean
Is fieldBoolean
Is laser cutter equipmentBoolean
Is located in facilityPageFacilities
Is network led serverBoolean
Is propertyBoolean
Is sheet metal equipmentBoolean
Is softwareBoolean
Is soldering iron equipmentBoolean
Is supplyBoolean
Is toolBoolean
Is used in domainPageDomains
Uses equipmentPageEquipment
Uses softwarePageSoftware


Creating New Properties

To create a new property, assign it on a page using standard Property Syntax. This can be done inline, but most often in this wiki, you will see the set directive used.

 {{#set:
  | Property_1_Name=Value
  | Property_2_Name=Value
 }} 

When you have saved this property, reference the Factbox] located at the bottom of the screen. If this is not visible, insert the line

 __SHOWFACTBOX__ 

at the bottom of the wiki page. Remember to remove this line when you have completed it. This will show you the properties created on this page and their values. You can click on the links to the new properties to open their wiki pages. Conversely, you could simply navigate to Property:Property_1_Name in the Wiki if that is easier (and skip the whole factbox thing - but - I like to see the values). On the property page, you will want to declare the property dataype. The default type is Page, but it is still useful to set this. You can see the datatypes specified or our properties in the table above. It is a good idea to look at the Wiki code on these pages and copy it from a similar property.

Restricting Property Values

It