Difference between revisions of "Sandbox9"
(→Copied Template from "Structural Wiki") |
|||
(18 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
'''This sandbox page is for practising creating and using Templates and Forms''' | '''This sandbox page is for practising creating and using Templates and Forms''' | ||
+ | ---- | ||
+ | __TOC__ | ||
+ | ---- | ||
+ | ==Copied Template from "Structural Wiki"== | ||
+ | |||
+ | <pre> | ||
+ | <br /> | ||
+ | <table align="center" width="100%" cellpadding="5" style="background-color:#CCFFFF;border:1px solid #ccc"> | ||
+ | |||
+ | <tr style="background-color:#99CCFF"> | ||
+ | <td style="text-align: center" colspan="2">[[Main_Page|Home]] > <b>Resources</b> <span class="plainlinks" style="font-size: 70%">[{{Url script}}Template:Resources&action=edit e]</span></td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>Overview</td> | ||
+ | <td align="left">[[Category:Semantic biography|Semantic biographies]] {{dot}} [[Category:Semantic parish|Semantic parishes]]</td> | ||
+ | </tr> | ||
+ | |||
+ | </table> | ||
+ | </pre> | ||
+ | |||
+ | <br /> | ||
+ | <table align="center" width="100%" cellpadding="5" style="background-color:#CCFFFF;border:1px solid #ccc"> | ||
+ | |||
+ | <tr style="background-color:#99CCFF"> | ||
+ | <td style="text-align: center" colspan="2">[[Main_Page|Home]] ></span></td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>Overview</td> | ||
+ | <td align="left">[[Category:Semantic biography]] {{dot}} [[Category:Semantic parish]]</td> | ||
+ | </tr> | ||
+ | |||
+ | </table> | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==Semantic drilldown== | ||
+ | |||
+ | See [https://www.mediawiki.org/wiki/Extension:Semantic_Drilldown Mediawiki:ExetensionSemantic Drilldown] page | ||
+ | |||
+ | - This Semantic Drilldown extension seems very powerful once we have semanticised our wiki | ||
+ | |||
+ | - [https://www.mediawiki.org/wiki/Extension:Semantic_Drilldown#/media/File:Semantic-drilldown-page.gif Screenshot of Semantic drilldown results page] | ||
+ | - Displayoptions include Tag-cloud-style display and also display of data on maps | ||
+ | -- Map display of results would be very powerful when searching biographies | ||
+ | -- See [https://www.mediawiki.org/wiki/Extension:Semantic_Drilldown#/media/File:Semantic-drilldown-with-map.gif screen shot of Browsing data:Cities] with icons on maps marking data | ||
+ | |||
+ | - See [http://www.epsa-projects.eu/index.php?title=Special:BrowseData/ProjectsExample: European Public Sector Award SMW site with Drilldown] | ||
+ | --The EPSA drill down analyses 825 projects with 7 filters (1) Award year (2) Award category (3) Award type (4) Sector (5)Type of activity (6) Level of Government(7) Country | ||
+ | --We could do something similar to drill down through 3000+ semantic biographies filtered by (1) Occupation (2) Geography (3) Age (4) Volume (e.g. HCA 13/71, HCA 13/72) (5) Year of deposition (6) Document type (Depositions, Personal Answers, Act Books, Miscellaneous) | ||
+ | ---- | ||
+ | |||
+ | ==Tagcloud== | ||
+ | |||
+ | See [http://edutechwiki.unige.ch/en/Semantic_Result_Formats#Examples_of_Semantic_Result_Formats Edutech wiki - Semantic Result Formats] | ||
+ | |||
+ | To work this reqyures "Semantic Results Formats" extension | ||
+ | |||
+ | <pre> | ||
+ | {{#ask: [[Category:Semantic biography]] | ||
+ | |?Occupation | ||
+ | |format=tagcloud | ||
+ | }} | ||
+ | </pre> | ||
+ | |||
+ | Another extension to Semantic Forms of interest is "Semantic Forms Inputs" | ||
+ | |||
+ | See Mediawiki page [https://www.mediawiki.org/wiki/Extension:Semantic_Forms_InputsExtension:Semantic Forms Inputs] | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==Welcome to the MarineLives project== | ||
+ | |||
+ | <div style="float: left; vertical-align: bottom; margin-right: 20px; margin-bottom: 20px; background:#dcdcdc; border: 1px solid #b0c4de; width: 330px;"> | ||
+ | <div style="background: #b0c4de; padding: 5px 10px 5px 10px; font-size: larger; font-weight: bold;">Four years of collaborative Public History</div> | ||
+ | <div style="padding: 10px;"> | ||
+ | <div style="font-famil:Garamond; font-size: normal;">'''The MarineLives collaborative public history project was established in 2012 to digitise, transcribe and annotate the manuscript records of the English High Court of Admiralty from the 1650s and 1660s. The original records are held at the National Archives in Kew.'''</div> | ||
+ | The project is led and advised by academics and members of the general public. | ||
+ | |||
+ | In the last four years [[Volunteers|project volunteers]] have transcribed over four million words, which are published on this wiki as full text transcriptions with accompanying metadata | ||
+ | |||
+ | The wiki has {{NUMBEROFPAGES}} wiki pages, {{NUMBEROFARTICLES}} content pages and {{NUMBEROFFILES}} manuscript images. The wiki has had {{NUMBEROFEDITS}} edits. | ||
+ | |||
+ | To learn more or to volunteer please [http://marinelives.org/contact-us.html contact us] | ||
+ | |||
+ | [[File:HCA 3 71 Credits 1.png|300px|left|thumb|The MarineLives project was launched in 2012 with the [[HCA 13/71|collaborative transcription of witness statements from 1656 and 1657]]]] | ||
+ | </div> | ||
+ | </div> | ||
+ | |||
+ | ---- | ||
+ | ==Useful tuition pages about Forms== | ||
+ | |||
+ | See [https://www.mediawiki.org/wiki/Extension:Semantic_Forms/Defining_forms Extension:Semantic Forms/Defining forms] | ||
+ | |||
+ | - This page explains 'for template' tag, 'end template' tag, 'field' tag, 'section' tag, and 'standard input' tag | ||
+ | - Particularly useful tips are: | ||
+ | -- Use of default= in 'field' tag | ||
+ | -- Use or rows=, columns= to determine size of text boxes, ditto 'autogrow' | ||
+ | |||
+ | ---- | ||
+ | ==Linking to Forms== | ||
+ | |||
+ | See [https://www.mediawiki.org/wiki/Extension:Semantic_Forms/Linking_to_forms Extension:Semantic Forms/Linking to forms] | ||
+ | |||
+ | This input box enables the user to create a new page or to edit an existing page using the "two-step process" by specifying the Form with which to create or edit the page: | ||
+ | |||
+ | The code is as follows: | ||
+ | |||
+ | <pre> | ||
+ | <nowiki>{{#forminput:form=|size=|default value=|button text=}}</nowiki> | ||
+ | </pre> | ||
+ | |||
+ | {{#forminput:form=|size=|default value=|button text=|popup}} | ||
+ | |||
+ | The advantage of the two-step process is that it checks that a page name does not already exist, and thus avoids overwriting an existing page in error. | ||
+ | |||
+ | The alternative "one-step process" uses <code>#formlink</code> instead of <code>#forminput</code> | ||
+ | |||
+ | Useful arguments for both the two-step and the one-step process are: | ||
+ | |||
+ | <code>form=</code> If left empty a drop down menu appears to select form; but if specified user goes to specified form | ||
+ | |||
+ | For example: | ||
+ | |||
+ | <pre> | ||
+ | <nowiki>{{#forminput:form=SemBioLongInfoBoxThreeWithBanner|size=|default value=|button text=}}</nowiki> | ||
+ | </pre> | ||
+ | |||
+ | This creates the following input box and button: | ||
+ | |||
+ | {{#forminput:form=SemBioLongInfoBoxThreeWithBanner|size=|default value=|button text=}} | ||
+ | |||
+ | <code>size=</code> Specifies the size of the text input (default is 25) | ||
+ | |||
+ | <code>button text=</code> The text on the "submit" button - the default is "Create or edit page" | ||
+ | |||
+ | <code>popup</code> Opens the form in a popup window | ||
+ | |||
+ | <code>placeholder=</code> Specifies "placeholder" text to appear in input box | ||
+ | |||
+ | Here is an example using these three parameters | ||
+ | |||
+ | <pre> | ||
+ | <nowiki>{{#forminput:form=SemBioLongInfoBoxThreeWithBanner|size=50|default value=|placeholder=Type name of an Admiralty Court deponent|button text=Create or edit a MarineLives biography|popup}}</nowiki> | ||
+ | </pre> | ||
+ | |||
+ | {{#forminput:form=SemBioLongInfoBoxThreeWithBanner|size=50|default value=|placeholder=Type name of an Admiralty Court deponent|button text=Create or edit a MarineLives biography|popup}} | ||
+ | |||
+ | The following ommits the popup instruction: | ||
+ | |||
+ | {{#forminput:form=SemBioLongInfoBoxThreeWithBanner|size=50|default value=|placeholder=Type name of an Admiralty Court deponent|button text=Create or edit a MarineLives biography}} | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ==Problem with Forms?== | ||
Rowan (and Thierry) - Is there a problem with how Semantic Forms has been implemented, or am I making a mistake? | Rowan (and Thierry) - Is there a problem with how Semantic Forms has been implemented, or am I making a mistake? | ||
Line 46: | Line 201: | ||
- My test page is for the grocer "James Jauncy of the parish of Saint Lawrence Jury London citizen and Grocer of London aged 34 yeares"<ref>[[HCA 13/72 f.463v Annotate|HCA 13/72 f.463v]]</ref> | - My test page is for the grocer "James Jauncy of the parish of Saint Lawrence Jury London citizen and Grocer of London aged 34 yeares"<ref>[[HCA 13/72 f.463v Annotate|HCA 13/72 f.463v]]</ref> | ||
- I name the page "James Jauncy" | - I name the page "James Jauncy" | ||
− | - As you can see from the image below, the blank form generated contains sixteen rows, but the label "Title" has been replaced by "Deposition start page". All the other labels are correct, but "Title" is replaced by "Deposition start page", despite " | + | - As you can see from the image below, the blank form generated contains sixteen rows, but the label "Title" has been replaced by "Deposition start page". All the other labels are correct, but "Title" is replaced by "Deposition start page", despite "Deposition start page" being in its correct position as the last row. |
− | + | ||
[[File:Create James Jauncy 26072016.PNG|500px|thumbnail|left|Create new page James Jauncy using SemBioLongIndoBoxTwo Form (and associated template)]] | [[File:Create James Jauncy 26072016.PNG|500px|thumbnail|left|Create new page James Jauncy using SemBioLongIndoBoxTwo Form (and associated template)]] | ||
- After filling out the form, I inspected the filled out form in Preview, and miraculously the label "First name" has reappeared in the correct place | - After filling out the form, I inspected the filled out form in Preview, and miraculously the label "First name" has reappeared in the correct place | ||
− | |||
- You can see the finished page at: http://www.marinelives.org/wiki/James_Jauncy | - You can see the finished page at: http://www.marinelives.org/wiki/James_Jauncy | ||
- I had to add the Category:Semantic biography, but I think that can be generated automatically | - I had to add the Category:Semantic biography, but I think that can be generated automatically | ||
− | - I also added in the __SHOWFACTBOX__ command, but as on a number of pages I have created this magic word doesn't work with the James Jauncy page - it is a | + | - I also added in the __SHOWFACTBOX__ command, but as on a number of pages I have created this magic word doesn't work with the James Jauncy page - it is a mystery to me why, since it is a simple page |
- If you browse the semantic properties you will see that they have been created correctly: http://www.marinelives.org/wiki/Special:Browse/James_Jauncy | - If you browse the semantic properties you will see that they have been created correctly: http://www.marinelives.org/wiki/Special:Browse/James_Jauncy | ||
[[File:Preview Create James Jauncy 26072016.PNG|500px|thumbnail|left|Preview the creastion of James Jauncy page once data is filled in]] | [[File:Preview Create James Jauncy 26072016.PNG|500px|thumbnail|left|Preview the creastion of James Jauncy page once data is filled in]] |
Latest revision as of 21:58, July 29, 2016
This sandbox page is for practising creating and using Templates and Forms
Contents
Copied Template from "Structural Wiki"
<br /> <table align="center" width="100%" cellpadding="5" style="background-color:#CCFFFF;border:1px solid #ccc"> <tr style="background-color:#99CCFF"> <td style="text-align: center" colspan="2">[[Main_Page|Home]] > <b>Resources</b> <span class="plainlinks" style="font-size: 70%">[{{Url script}}Template:Resources&action=edit e]</span></td> </tr> <tr> <td>Overview</td> <td align="left">[[Category:Semantic biography|Semantic biographies]] {{dot}} [[Category:Semantic parish|Semantic parishes]]</td> </tr> </table>
Home ></span> |