Template:GR Location of link: Difference between revisions

m
Text replacement - "FindMyPast" to "Findmypast"
(Created page with "<noinclude> <nowiki> <!-- Call {{GR Location of link}} to add the text at the end of a link which indicates the website that the link is found. --> {{GR Location of link| Web...")
 
m (Text replacement - "FindMyPast" to "Findmypast")
 
(20 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>
__NOEDITSECTION__
<nowiki>
{{#if: {{{Website|}}}|
<!-- Call {{GR Location of link}} to add the text at the end of a link which indicates the website that the link is found. -->
{{#switch: {{lc:{{{Website|}}}}}|
familysearch= at FamilySearch|
family search= at FamilySearch|
findmypast= at Findmypast ($)|
find my past= at Findmypast ($)|
ancestry= at Ancestry ($)|
americanancestors= at American Ancestors ($)|
american ancestors= at American Ancestors ($)|
myheritage= at MyHeritage ($)|
my heritage= at MyHeritage ($)|
<nowiki></nowiki>}}|
<nowiki></nowiki>}}<noinclude>
example:
  <nowiki>
{{GR Location of link|
{{GR Location of link|
Website=FamilySearch|  <!-- FamilySearch, Ancestry, FindMyPast currently available in template -->
  Website={{{Website 1}}}
LoginStatus=|    <!-- if login status needs to be checked first -->
|}}
}}
 
Sending the below website names to this template will results in the following:
FamilySearch => at FamilySearch
Findmypast => at Findmypast ($)
Ancestry => at Ancestry ($)
American Ancestors => at American Ancestors ($)
myherMyHeritage => at MyHeritage ($)
 
</nowiki>
</nowiki>
</noinclude>
This template will take the website information it receives then, based on that site, determine if the user needs to be logged in, and/or have the correct account to view the information in the link, and/or whether the site will cost money to view (adding a ($) sign).  If the user needs to be logged in, a message will be sent to the user.  Once logged in, if it is determined that the website will cost money, a ($) will be placed after the website location.
{{#if: {{{LoginStatus|}}}|
</noinclude><nowiki></nowiki><noinclude>[[Category:templates]]</noinclude>
check login status here|
}}
{{#switch: {{{Website|}}}|
"FamilySearch"=FamilySearch|
"FindMyPast"=FindMyPast ($)|
"Ancestry"=Ancestry ($)|
}} <!-- end switch -->
Approver, Batcheditor, Moderator, Patroller, Protector, Reviewer, Bots, Bureaucrats, editor, Interface administrators, pagecreator, pagedeleter, Page Ownership admin, Push subscription managers, smwadministrator, smwcurator, smweditor, Suppressors, Administrators, Upload Wizard campaign editors, Widget editors
795,753

edits