Template:FSHI/doc: Difference between revisions

 
(19 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Purpose ==
== Purpose ==
This template will allow the creation of links to specific images in FamilySearch Historical Images ("Images").
This template will allow the creation of links to specific images in acquired via Infinity and published as FamilySearch Images/ Explore Historical Images/ Explore Images.
=== Parameters ===
=== Parameters ===
I think this template will need 4 parameters:
This template has 5 parameters:
{| class="wikitable"
{| class="wikitable"
|-
|-
! # !! URL value !! usage !! Parameter Name
! Parameter !! Value !! Display
|-
|-
| 1 || imageGroupNumbers= || DGS only || DGS
| DGS || DGS number || DGS number
|-
|-
| 2 || rmsId= || itemized in RMS ||item
| ID || rmsID || none
|-
|-
| 3 || null || display item number || nr
| Image || Image number || Image number
|-
|-
| 4 || imageIndex=  || specific image (starting with 1) || image
| Item || Item number || Item
|-
| alt || Alternative Text || Display for link
|}
|}
=== Results Display ===
 
How the results are displayed is dependent on what parameters are provided.
=== Operation ===
The '''ID''', '''Image''',  and '''Item''' parameters are representative only. You will need to check the folder and image to know what the correct parameter to use it.
{| class="wikitable"
{| class="wikitable"
|-
|-
! Condition !! DGS Parameter !! item Parameter !! nr Parameter !! image Parameter !! Display
! Condition !! DGS<br>Parameter !! ID<br>Parameter !! Image<br>Parameter !! Item<br>Parameter !! Sample Code !! Display !! Result
|-
| Only DGS number is given || 8417008 ||  ||  ||  ||  DGS 8417008
|-
|-
| DGS & item number given || 8417008 || M9DP-VQB || 2 || || DGS 8417008 item 2
| Only DGS number is given || 8417088 || || || || <nowiki>{{FSHI|DGS=8417008}}</nowiki> || {{FSHI|DGS=8417008}} || Link goes to list of folder content
|-
|-
| DGS, item number & image number || 8417008 || M9DP-VQB ||  || 6 || DGS 8417008 image #6
| DGS, ID, and Image given || 8417088 || M9DP-VQB || 6 ||  || <nowiki>{{FSHI|DGS=8417088|ID=M9DP-VQB|Image=6}}</nowiki> || {{FSHI|DGS=8417088|ID=M9DP-VQB|Image=6}} || Link goes to specific image in folder
|-
|-
| DGS, ID, and Item given || 8417008 || M9DP-VQB || || 2 || <nowiki>{{FSHI|DGS=8417088|ID=M9DP-VQB|Item=2}}</nowiki> || {{FSHI|DGS=8417088|ID=M9DP-VQB|Item=2}} || Link goes to specific item in folder
|}
|}


=== Operation ===
'''Note:''' The template will not work correctly if the ID parameter (rmsID) is not provided along with either the Image or Item parameter.
 
== Operation ==
The template should go through the parameters and check them against what is required to return the correct URL.
The template should go through the parameters and check them against what is required to return the correct URL.


Line 35: Line 39:
#If the item and nr parameters are also present it should return a string as in #2 below.
#If the item and nr parameters are also present it should return a string as in #2 below.
#If all four parameters are present it should return a string as in #3 below.
#If all four parameters are present it should return a string as in #3 below.
#If the alt parameter is present display only that.


Sample input and output:
<pre>
#1 {{FSHI|DGS=8417008}}
#2 {{FSHI|DGS=8417008 |item=M9DP-VQB |nr=2}}
#3 {{FSHI|DGS=8417008 |item=M9DP-VQY |image=6}}
</pre>
Expected output:
Expected output:
<pre>
{| class="wikitable"
#1 DGS 8417008 - https://www.familysearch.org/records/images/search-results?imageGroupNumbers=8417008&page=1
|-
#2 DGS 8417008 item 2 - https://www.familysearch.org/records/images/image-details?imageGroupNumbers=8417008&page=1&rmsId=M9DP-VQB&imageIndex=0
! Example !! Wikicode !! Display !! Concatenated URL !! Result
#3 8417008 image# 6 - https://www.familysearch.org/records/images/image-details?imageGroupNumbers=8417008&page=1&rmsId=M9DP-VQY&imageIndex=6&singleView=true
|-
</pre>
| #1 || <code><nowiki>{{FSHI|DGS=8417008}}</nowiki></code> || DGS 8417008 || https://www.familysearch.org/records/images/search-results?imageGroupNumbers=8417008&page=1 || {{FSHI2|DGS=8417008}}
 
|-
=== Testing Data ===
| #2 || <code><nowiki>{{FSHI|DGS=8417008 |ID=M9DP-VQB |Item=2}}</nowiki></code> || DGS 8417008 item 2 || https://www.familysearch.org/records/images/image-details?imageGroupNumbers=8417008&page=1&rmsId=M9DP-VQB&imageIndex=0 || {{FSHI2|DGS=8417008 |ID=M9DP-VQB |Item=2}}
1. This URL is for the first image in a folder
|-
<pre>
| #3 || <code><nowiki>{{FSHI|DGS=8417008 |ID=M9DP-VQY |Image=6}}</nowiki></code> || DGS 8417008 image# 6 || https://www.familysearch.org/records/images/image-details?imageGroupNumbers=8417008&page=1&rmsId=M9DP-VQY&imageIndex=6&singleView=true || {{FSHI2|DGS=8417008 |ID=M9DP-VQY |Image=6}}
https://www.familysearch.org/records/images/search-results?imageGroupNumbers=8417008&page=1
|-
</pre>
| #4 || <code><nowiki>{{FSHI|DGS=110264677 |alt=605-1-34}}</nowiki></code> || 605-1-34 || https://www.familysearch.org/records/images/search-results?imageGroupNumbers=110264677 || {{FSHI2|DGS=110264677 |alt=605-1-34}}
2. These results are for each item in a folder. In the the URL string '''search-results''' is replaced with '''image-details''' and the text '''rmsId=M9DP-VQY&imageIndex=0''' is appended, where ''M9DP-VQY'' represents a unique value for that item.
|}
<pre>
https://www.familysearch.org/records/images/image-details?imageGroupNumbers=8417008&page=1&rmsId=M9DP-VQY&imageIndex=0
https://www.familysearch.org/records/images/image-details?imageGroupNumbers=8417008&page=1&rmsId=M9DP-VQB&imageIndex=0
https://www.familysearch.org/records/images/image-details?imageGroupNumbers=8417008&page=1&rmsId=M9DP-V79&imageIndex=0
https://www.familysearch.org/records/images/image-details?imageGroupNumbers=8417008&page=1&rmsId=M9DP-V7M&imageIndex=0
https://www.familysearch.org/records/images/image-details?imageGroupNumbers=8417008&page=1&rmsId=M9DP-VQR&imageIndex=0
https://www.familysearch.org/records/images/image-details?imageGroupNumbers=8417008&page=1&rmsId=M9DP-VQT&imageIndex=0
https://www.familysearch.org/records/images/image-details?imageGroupNumbers=8417008&page=1&rmsId=M9DP-VQ1&imageIndex=0
</pre>
3. These are for specific images in a folder. This is the same URL string as that for an item, but the numeric value at the end of the string is replaced by the specific image number and the string '''&singleView=true'''.
<pre>
https://www.familysearch.org/records/images/search-results?imageGroupNumbers=8417007&page=1
https://www.familysearch.org/records/images/image-details?imageGroupNumbers=8417007&page=1&rmsId=TH-909-80444-120928-39&imageIndex=6&singleView=true
https://www.familysearch.org/records/images/image-details?imageGroupNumbers=8417007&page=1&rmsId=TH-909-80444-120928-39&imageIndex=21&singleView=true
</pre>
 
More samples using the same DGS showing 1) the URL for the DGS, 2) the first item on the DGS, and 3) a specific image on the DGS.
<pre>
1. https://www.familysearch.org/records/images/search-results?imageGroupNumbers=102152121
2. https://www.familysearch.org/records/images/image-details?imageGroupNumbers=102152121&rmsId=TH-909-60368-30634-8&imageIndex=0
3. https://www.familysearch.org/records/images/image-details?imageGroupNumbers=102152121&rmsId=TH-909-60368-30634-8&imageIndex=2&singleView=true
</pre>


See also [https://www.familysearch.org/en/wiki/FamilySearch_Wiki:Manual_of_Style-Formatting#FamilySearch_Explore_Images_-_Links_to_Digital_Images Explore Images - Links to Digital Images].
See also [https://www.familysearch.org/en/wiki/FamilySearch_Wiki:Manual_of_Style-Formatting#FamilySearch_Explore_Images_-_Links_to_Digital_Images Explore Images - Links to Digital Images].


<noinclude>[[Category:Template documentation]]</noinclude>
<noinclude>[[Category:Template documentation]]</noinclude>
Approver, Moderator, Protector, Reviewer, Bots, editor, pagecreator, pagedeleter, smwadministrator, Administrators
129,710

edits