Jump to content
TNG Community
Sign in to follow this  
Michael T. Jones

hyperlink - colon

Recommended Posts

Michael T. Jones

My knowledge is about zero, so bear with me. It looks if a colon is in a hyperlink it breaks the hyperlink in certain places: birth or death notes, media Owner/Source or media Linked to. Is there a workaround for that?

Share this post


Link to post
Share on other sites
bhemph

Colons have to be encoded with uri safe encoding to be in a hyperlink.  Do you have an example page that we can see your examples that have the unencoded colon?

Brent

Share this post


Link to post
Share on other sites
Michael T. Jones

Thanks, Brent.

I can setup a user with login privileges if this doesn't work well, but I'll try this - inserting this text:

<a href="showsource.php?sourceID=S1&tree=Test">1940 U.S. census, Ohio County, West Virginia, population schedule, Wheeling, enumeration district (ED) 35-25, sheet 7-B, household 124, Wilbur Jones; digital image, <i>Ancestry </i> (http://www.ancestry.com accessed 6 Jul 2021); citing NARA microfilm publication T627, roll 4436.</a>

Renders this if inserted in a note for birth or death (built in facts):

Screen Shot 2022-02-09 at 6.57.38 PM (2).png

And renders this if inserted in a note for a custom event (which is "correct")

Screen Shot 2022-02-09 at 6.58.12 PM (2).png

 

Share this post


Link to post
Share on other sites
theKiwi
1 hour ago, Michael T. Jones said:

<a href="showsource.php?sourceID=S1&tree=Test">1940 U.S. census, Ohio County, West Virginia, population schedule, Wheeling, enumeration district (ED) 35-25, sheet 7-B, household 124, Wilbur Jones; digital image, <i>Ancestry </i> (http://www.ancestry.com accessed 6 Jul 2021); citing NARA microfilm publication T627, roll 4436.</a>

This code makes the entire string of text 

1940 U.S. census, Ohio County, West Virginia, population schedule, Wheeling, enumeration district (ED) 35-25, sheet 7-B, household 124, Wilbur Jones; digital image, <i>Ancestry </i> (http://www.ancestry.com accessed 6 Jul 2021); citing NARA microfilm publication T627, roll 4436

1940 U.S. census, Ohio County, West Virginia, population schedule, Wheeling, enumeration district (ED) 35-25, sheet 7-B, household 124, Wilbur Jones; digital image, <i>Ancestry </i> (http://www.ancestry.com accessed 6 Jul 2021); citing NARA microfilm publication T627, roll 4436

into the text for the link 

showsource.php?sourceID=S1&tree=Test

In some TNG fields, there is in effect a function insertLinks which parses the text for URLs and turns them in to clickable links - which is what happened to the http://www.ancestry.com in the string of text in the second example.

My guess is that the insertLinks function has interfered in the first example and so stopped making the link after http://www.ancestry.com when the HTML code says it all should have been the hyperlink.

Try it be removing the http:// from before www.ancestry.com - what happens then?

Roger

Roger

Share this post


Link to post
Share on other sites
Michael T. Jones

Thank, Roger.

You're right - taking out the http:// makes the entire link become clickable (and the italics are there) in the "built-in events" where the InsertLinks function must be working. However, in the Custom event note, everything is plain text (no italics, not clickable).

Interesting!

Share this post


Link to post
Share on other sites
theKiwi

I expect that the function insertLinks isn't called on the output of information in the Custom Events notes.

Not sure why the Italics are not working, as that should just be getting parsed by your browser - if you look at the source code of that part of the page does the italics code show up in the output?

Roger

Share this post


Link to post
Share on other sites
Michael T. Jones

So I now have the notes working for both custom and built in events. Now my question has to do with media.

This text:

1940 U.S. census, Ohio County, West Virginia, population schedule, Wheeling, enumeration district (ED) 35-25, sheet 7-B, household 124, Wilbur Jones; digital image, <i>Ancestry </i> (http://www.ancestry.com accessed 6 Jul 2021); citing NARA microfilm publication T627, roll 4436.

Displays nicely in showsource.php as Title. However, when that source is then referred to from linked media (on show media.php) the link has the similar issue:

2.png

 

As a second but related question, it doesn't seem to me that you can create a citation on getperson.php that shows at the bottom of that page for a media item. The best you can do is link a media item to an event and also link the media item to a source? Maybe I'm wrong? I do see that you could link several media items to one event and have the citations link to that event, but there would then be no way to know which citation applied to which media item (let me know if that doesn't make sense...)

 

 

Share this post


Link to post
Share on other sites
theKiwi

Michael - do you do your data entry in TNG, or by import of a GEDCOM file?

I import my stuff by GEDCOM from Reunion, so can't offer any help on how things are entered in TNG

Roger

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×