Web based family history software

Question Shortcode/linking to individuals in notes

  • clivejo
  • Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 18 hours ago #1 by clivejo
I know I can use the short code @I0001@ to link to a record, but how do I display a name, instead of a number whilst writing the note.

For example , I have a photo with a number of people in it, some of which are in my file. The note reads "John and Jane Doe at John's brothers wedding" and John Doe is I1 with Jane Doe I2, how do I hyper-link the names to take the user to their records?

Please Log in or Create an account to join the conversation.

More
4 years 16 hours ago #2 by fisharebest
Replied by fisharebest on topic Shortcode/linking to individuals in notes
> I know I can use the short code @I0001@ to link to a record, but how do I display a name, instead of a number whilst writing the note.

This, of course, is not standard GEDCOM. XREFs are not permanent identifiers.
In theory, they exist only while transferring data from one application to another.
So, using them like this creates the risk that if/when you transfer your data to another
application (which does not preserve XREFs), then these links become invalid.

There is no simple/automatic way to use the name of the linked record as the text
for the link. It would require a code change. Create an issue on the github tracker,
and I'll look at it.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • clivejo
  • Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 16 hours ago - 4 years 16 hours ago #3 by clivejo
Replied by clivejo on topic Shortcode/linking to individuals in notes
Maybe allow custom text via a separate variable?

github.com/fisharebest/webtrees/issues/3144
Last edit: 4 years 16 hours ago by clivejo.

Please Log in or Create an account to join the conversation.

  • clivejo
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago - 3 years 11 months ago #4 by clivejo
Replied by clivejo on topic Shortcode/linking to individuals in notes
Thanks for the fix.

How hard would it be to pass a custom string to be displayed for the hyperlink text? My use case for this feature is an obituary for example. "John Doe is survived by his wife Jane, son John Jr and daughter Mary"

But when using the current fix this becomes "John Doe is survived by his wife Jane Mary Doe Janey, son John Peter Doe Junior and daughter Mary Joanne Doe Mae" With their nick name appearing at the end.

The goal is to make browsing the tree online easier by hyperlinking names in Wills, Family Photos, Obituarys etc to people who might exist in my tree.

For example:
Code:
@I0005@Uncle Peter@
Last edit: 3 years 11 months ago by clivejo.

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago #5 by fisharebest
Replied by fisharebest on topic Shortcode/linking to individuals in notes
> How hard would it be to pass a custom string to be displayed for the hyperlink text?

Lots of complexity here, potential for false matches, etc.
Code:
@I0005@Uncle Peter@ @I0005@ (according to Peter@example.com)

A more "portable" option might be to use ASSO records to create links to references indivdiuals.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago #6 by Erik Bachmann
Replied by Erik Bachmann on topic Shortcode/linking to individuals in notes
You may be able to make a redirection from Markdown for:
Code:
@I0005@Uncle Peter@

Using Markdown - and some PHP:
Code:
[Uncle Peter](redir.php?pid=I0005)

And let redir.php redirect to the exact individual. Clumsy, but possible.

Is the path or GED name available as a variable?

{ö} Erik Bachmann

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago #7 by fisharebest
Replied by fisharebest on topic Shortcode/linking to individuals in notes
I have already updated this

Currently, @I0005@ will be converted into

[@I0005@](URL of I0005)

In the next release, @I0005@ will be converted into

[name of I0005](URL of I0005)

I just created an example at dev.webtrees.net/demo-dev/tree/demo/note/X242

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago - 3 years 10 months ago #8 by Erik Bachmann
Replied by Erik Bachmann on topic Shortcode/linking to individuals in notes
Running v. 2.0.3 and @I0005@ simply shows up in notes as - @I0005@

{ö} Erik Bachmann
Last edit: 3 years 10 months ago by Erik Bachmann.

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago #9 by fisharebest
Replied by fisharebest on topic Shortcode/linking to individuals in notes

Erik Bachmann wrote: Running v. 2.0.3 and @I0005@ simply shows up in notes as - @I0005@


Wait for 2.0.4

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago - 3 years 10 months ago #10 by Andreas
Replied by Andreas on topic Shortcode/linking to individuals in notes

clivejo wrote: For example , I have a photo with a number of people in it, some of which are in my file. The note reads "John and Jane Doe at John's brothers wedding" and John Doe is I1 with Jane Doe I2, how do I hyper-link the names to take the user to their records?


Did you have a look on the modul Faces by Kirill Uksusov

I think it's exactly what you're looking for.

A simple example of it's use in my tree with a photo of three persons wt.rauhut.eu/tree/GAC.ged/media/M1014/Ro...the-Bernard-MAUPILER
Open the photo and hover with your mouse over the persons......

Both MAUPILLÉ & RAUHUT families are using webtrees V2.1.18
Last edit: 3 years 10 months ago by Andreas.

Please Log in or Create an account to join the conversation.

  • clivejo
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 10 months ago - 3 years 10 months ago #11 by clivejo
Replied by clivejo on topic Shortcode/linking to individuals in notes

Andreas wrote: Did you have a look on the modul Faces by Kirill Uksusov


Yes I have it installed, but what I would really like is the ability to link to people mentioned in obituaries, wills etc using custom hyper-link text. Currently the hyper-link text is the persons full name, which messes up the original text. For example, "x is survived by his wife Sue" becomes ""x is survived by his wife Susan Jane Doe 'Sue'"
Last edit: 3 years 10 months ago by clivejo.

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago - 3 years 10 months ago #12 by fisharebest
Replied by fisharebest on topic Shortcode/linking to individuals in notes
Why not

"x is survived by his wife Sue (@X1234@)"

This way you are showing both the original text, and an annotated link...

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Last edit: 3 years 10 months ago by fisharebest.

Please Log in or Create an account to join the conversation.

  • bertkoor
  • Away
  • Platinum Member
  • Platinum Member
  • Greetings from Utrecht, Holland
More
3 years 10 months ago #13 by bertkoor
Replied by bertkoor on topic Shortcode/linking to individuals in notes

clivejo wrote: what I would really like is the ability to link to people mentioned in obituaries, wills etc using custom hyper-link text. Currently the hyper-link text is the persons full name, which messes up the original text. For example, "x is survived by his wife Sue" becomes ""x is survived by his wife Susan Jane Doe 'Sue'"


Imho you should keep the original text in the source (citation)
Links and other comments should (imho) be recorded separately, in the notes for instance.

stamboom.BertKoor.nl runs on webtrees v1.7.13

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum
}