* Facts with active URL

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
User avatar
tatewise
Megastar
Posts: 28333
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Facts with active URL

Post by tatewise »

In the FamilySearch Id (19875) thread, LeslieP said:
I would be over the moon happy with a special type of fact that lets the user define URL pre- and post- fixing so that we enter the unique part, and then the description field becomes the entire clickable URL.
That would let us go beyond JUST linking to FMP, MH, FS, Ancestry and be able to link to pages on our own websites, wikitree, findagrave, wikipedia, etc.
I'm not sure what is meant by "define URL pre- and post- fixing so that we enter the unique part, and then the description field becomes the entire clickable URL."

However, Fact local rich-text Note fields already let you enter clickable URL that link to pages anywhere on the Internet.
The link can hold the full URL and optional separate display text. So you should be over the moon happy with that.

I don't understand why you think it is restricted to JUST FMP, MH, FS, Ancestry.

Perhaps I have completely misunderstood what you are requesting.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
LeslieP
Diamond
Posts: 78
Joined: 03 Jan 2021 16:38
Family Historian: V7

Re: Facts with active URL

Post by LeslieP »

I just spent about 30 minutes writing a detailed reply, hit preview, got a 403 error and now it's all gone. So I'm mad at myself for not copying first. I realize what I put in that prior message was unclear, it wasn't the right place to provide detail. I'm going to go get "un mad" at myself, perhaps eat dinner, then I'll write up what I'm thinking about.

Some days...
Leslie P
Houston, TX
from TMG to RootsMagic to FH7
publish to web via TNG
User avatar
Mark1834
Megastar
Posts: 2458
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Facts with active URL

Post by Mark1834 »

Been there, done that! If I have a long or detailed post, I draft it in OneNote and copy across when it's done. By doing that, it's easy to revise on a different device (e.g., tablet on the sofa 😊). That's much more reliable than saving forum drafts, which have a habit of disappearing if you press the wrong key.
Mark Draper
User avatar
tatewise
Megastar
Posts: 28333
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Facts with active URL

Post by tatewise »

If you spend 30 minutes composing a posting here you will probably get timed out and logged off.
Also, some 'unusual' character sequences upset the server and prevent posting.
So, like Mark, I compose long postings elsewhere and copy & paste into the FHUG posting.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
Gowermick
Megastar
Posts: 1702
Joined: 13 Oct 2015 07:22
Family Historian: V7
Location: Swansea

Re: Facts with active URL

Post by Gowermick »

tatewise wrote: 14 Oct 2021 09:48 Also, some 'unusual' character sequences upset the server and prevent posting.
I’ve lost count of the number of times I’ve inserted an emoji via my iPad keyboard, only to have it rejected. The only ones allowed are those shown on the right->
:D
Mike Loney

Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com
avatar
LeslieP
Diamond
Posts: 78
Joined: 03 Jan 2021 16:38
Family Historian: V7

Re: Facts with active URL

Post by LeslieP »

OK, going to give it a go at explaining what I'm imagining, hope this makes sense.

Premise:
Good capabilities from other programs maybe could get added to FH and made even more useful because FH is clearly the best.

Legacy 9.0 Feature to emulate:
In Legacy, at the bottom of the individual screen are fields for Family Search ID and Find A Grave ID. All the user has to input is the number, then the field label becomes a clickable link. This is very handy.
Legacy 9 Individual Screen
Legacy 9 Individual Screen
screenshot_20211013_ 191222.png (91.63 KiB) Viewed 3096 times

Desired Capability

I'd like to be able to create a fact for a person and just input the part of the url that changes for each individual, and have the program automatically wrap that part with the necessary pre- and post- characters to create whatever string I want. Because yes, I'd like to be able to add the ID's for some of the better known sites (FMP, MH, Ancestry, FindaGrave, etc) but I also want to be able to create links to my own site, wikitree, some other site, something that gets invented in the future, etc.

So those two handy boxes at the bottom of the Legacy screen are nice, but if FH had a "Link Fact Type" in addition to the Event and Attribute fact types we currently have, that would really be useful.

"Link" Fact Type
Has all of the same fact type functions as events and attributes, with what is essentially an enhanced description field, with a pre-defined field prefix and postfix. Then in the individual facts tab, the bullet would be clickable and go to the fully qualified link, and in reports and GEDCOM the output is the fully qualified link.

Example Link Type Definitions:
Fact Type Name: Family Search
Prefix: <a href="https://www.familysearch.org/tree/person/details/
Postfix: " target="_blank">{individual's} Family Search page</a>

Attribute Name: Find A Grave
Prefix: <a href="https://www.findagrave.com/memorial/
Postfix: " target="_blank">{individual's} Find A Grave page</a>

Attribute Name: Family Photos
Prefix: <a href="<a href="http://lptex.com/gallery/page/search/tags/
Postfix:" target="_blank">Go to Photo Gallery for {individual}</a>

Individual
Ernest Barrett Chamberlain
Family Search Attribute: LHD3-64Y
Find A Grave Attribute: 47398833
Family Photos Attribute: Ernest+Barrett+Chamberlain
And those attributes can also have dates, locations, notes, custom sentences, all of the normal attribute things

GEDCOM and report output for these facts:
Family Search
<a href="https://www.familysearch.org/tree/perso ... s/LHD3-64Y" target="_blank">Ernest Barrett Chamberlain's Family Search page</a >
Find A Grave
<a href="https://www.findagrave.com/memorial/47398833" target="_blank">Ernest Barrett Chamberlain's Find A Grave page</a>
Family Photos
<a href="http://lptex.com/gallery/page/search/ta ... hamberlain" target="_blank">Go to Photo Gallery for Ernest Barrett Chamberlain</a>


And the geniuses at CP code these fact types to recognize that if there is an "href" in the definition, then the bullet in the facts tab becomes a link icon and the user can click it to go to that web page. Yes, I'm asking for the world!

For me, as I'm using the program, when I create that attribute for the person the only thing I have to copy and paste in is the unique part of the URL. The bullet in the fact tab becomes a clickable link which makes it easy for me to open a tab for that person. And on a report or a GEDCOM export, the prefix and postfix are appended to the description field so it becomes the full URL, which makes it work beautifully for me on my TNG website.

It's an ideal. But I think it could be exceedingly useful.

I don't think it's anything that could be done via plugin, is it? This would pretty much have to be a wishlist item?
Leslie P
Houston, TX
from TMG to RootsMagic to FH7
publish to web via TNG
User avatar
tatewise
Megastar
Posts: 28333
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Facts with active URL

Post by tatewise »

Thank you Leslie that is very clear.
I think there may be a workable solution to your idea using custom facts and an associated Plugin.

All facts, including custom facts, have a feature that allows the local Note field to be filled with auto-created text.
See the Tools > Fact Types... command, fact Edit button, Advanced... button, Auto-Create Note: box.
The Family Search Attribute definition might set that Auto-Create Note box to something like:

Code: Select all

"https://www.familysearch.org/tree/person/details/{value}/" {individual's} Family Search page
When the Attribute is added, that text would automatically get added to its local Note field.
The user would add the Attribute Value such as LHD3-64Y.

Then an enhancement to the existing Move Note URL to Rich Text Web Link plugin would convert that Note text to a rich text web link, with {value} replaced by the Attribute Value, and {individual's} replaced by the person's name, e.g.

Code: Select all

<web="https://www.familysearch.org/tree/person/details/LHD3-64Y/","Ernest Chamberlain's Family Search page">
i.e. The 1st string is the full URL and the 2nd string is the displayed text.
That will then be a clickable link in the local Note field and appear in all reports that include the local Note of facts.
One way to do that is to set the Sentence Template to {note}.

Bear in mind that currently, URL in reports are not active links. See Bug in hyperlinks in narrative reports (19874).

The only requirement for the Plugin to work will be that the Note text adheres to some prescribed format such as:
"https://<prefix>{value}/" {individual's} <suffix>
Then the Plugin adds the <web="...","..."> rich text formatting and substitutes the {value} and {individual's} text.
Therefore, it would work for any custom facts that employed that Note text format.

I have manually worked through that process and it seems to work as expected.

We need to discuss a bit further about how it appears in GEDCOM and would export to TNG, etc.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
LeslieP
Diamond
Posts: 78
Joined: 03 Jan 2021 16:38
Family Historian: V7

Re: Facts with active URL

Post by LeslieP »

Oooh, exciting! I had looked at the "Auto-Create Note" field on the advanced tab of fact definitions thinking that maybe there was some way to use that for this purpose, couldn't figure it out at first glance, then got distracted by all of the other things I need to learn.

At some point in my exploration I'd seen the "Add Media URL Shortcut" plugin and wondered if there was a way to combine things, but "Move Note URL to Rich Text" looks like the better fit.

Much to experiment with later this evening! Thank you! This amazing program combined with the brilliant and helpful community continue to confirm the wisdom of my decision to convert.

For now...local nurseries are in 1/2 off mode, the temp finally dropped below 80F, and I have a spot in the backyard that needs a small tree!
Leslie P
Houston, TX
from TMG to RootsMagic to FH7
publish to web via TNG
User avatar
tatewise
Megastar
Posts: 28333
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Facts with active URL

Post by tatewise »

Adjusting the Plugin was fairly simple so try attached Move Note URL to Rich Text Web Link Version 1.1.1 Date 14 Oct 2021.

It relies on the format discussed earlier but without any string quotes:
https://<prefix>{value}/ {individual's} <suffix>

The only essential requirements are:
  • The Note must have a valid URL starting with https:// or http:// and ending with a space character.
  • The URL must have the code {value} embedded somewhere within.
  • The URL must be followed by some display text with the code {individual's} embedded somewhere within.
Other text can precede the URL, occur between the URL and {individual's}, and follow {individual's}.
So the following is acceptable:

Code: Select all

See the https://www.familysearch.org/tree/person/details/{value}/ detailed {individual's} Family Search page
The Plugin will convert that to: See the detailed Ernest Chamberlain's Family Search page
Last edited by tatewise on 29 Oct 2021 15:42, edited 1 time in total.
Reason: Attachment deleted as Version 1.2 is in the Plugin Store.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
tatewise
Megastar
Posts: 28333
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Facts with active URL

Post by tatewise »

I've checked the Move Note URL to Rich Text Web Link plugin against various scenarios and made some changes.

The format discussed earlier now requires string quotes around the display text:
e.g.
https://<URL prefix>{value}/ "{individual's} <text suffix>"
That allows other text to be added before the URL and after the "display text" on the same line.

If there is no display text in quotes then the URL hyperlink will be shown in full.

Now the essential requirements are:
  • The Note needs valid URL that start with https:// or http:// or ftp://.
  • The URL may be followed by one space and some display text enclosed in "string quotes".
  • The Note may include the code {value} to be replaced by the fact attribute value.
  • The Note may include the codes {individual} and {individual's} to be replaced by the record Name.
  • There may be more than one of any of the above.
If there is a {value} code, but no fact attribute value, then the Note is not converted.
The Note may be in plain text format or already in rich text format that may include record links, converted URL, etc.

So a typical entry in the Tools > Fact Types... command, fact Edit button, Advanced... button, Auto-Create Note: box, or in any fact local Note field is:

Code: Select all

See https://www.familysearch.org/tree/person/details/{value}/ "{individual's} {value} FamilySearch" page.
The Plugin converts that to: See Ernest Chamberlain's LHD3-64Y Family Search page.

To get the URL to be active in Reports the Sentence Template could be such as:

Code: Select all

<br>See https://www.familysearch.org/tree/person/details/{value}/ which is {individual's} FamilySearch page.
That appears as:
See https://www.familysearch.org/tree/perso ... /LHD3-64Y/ which is Ernest Chamberlain's FamilySearch page.

The plugin checks it is running in FH v7.0 and recommends that outstanding changes are saved.

On completion, the plugin offers an optional Result Set to list all the converted Note URL.

The revised Move Note URL to Rich Text Web Link Version 1.1.2 Date 15 Oct 2021 is attached.
Last edited by tatewise on 29 Oct 2021 15:43, edited 1 time in total.
Reason: Attachment deleted as Version 1.2 is in the Plugin Store.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Post Reply