Jump to content


Photo

Where to store an URL in RM?


  • Please log in to reply
12 replies to this topic

#1 cap624

cap624

    Member

  • Members
  • PipPip
  • 10 posts

Posted 22 May 2011 - 07:35 AM

I would like to store an URL to the FindAGrave website for each person that's in my RM database. I want to be able to report on whether or not an URL exists for each person in my db. I'm thinking that I need a new Fact Type, which would allow me to query who has a memorial page in FindAGrave, and who doesn't. I could then craft a sentence that includes the URL. I actually only need the ID in FindAGrave and could store the rest of the URL in one place, namely, the sentence. My goal would then be to have a link to FindAGrave in the narrative when I use RM's Create a Website.

Is this a reasonable approach, or have I overlooked an obvious solution? If a new Fact Type is the way to go, is there a forum discussion about how to do that? Thanks in advance.

#2 TomH

TomH

    Advanced Member

  • Members
  • PipPipPip
  • 6283 posts

Posted 22 May 2011 - 07:53 PM

Even though you may enter a URL into the Description or Note of a fact, it will not come out as a hyperlink in a narrative report or on a website - it will appear as plain text.

Entering a URL or the phrase FindAGrave in the Burial fact description or Note, you can use RM's Find tools to search on the Burial fact for those Descriptions or Notes that contain "FindAGrave" or "http:\\".

Tom user of RM7550 FTM2017 Ancestry.ca FamilySearch.org FindMyPast.com
SQLite_Tools_For_Roots_Magic_in_PR_Celti wiki, exploiting the database in special ways >>> RMtrix-tiny.png app, a bundle of RootsMagic utilities.


#3 Ludlow Bay

Ludlow Bay

    Advanced Member

  • Members
  • PipPipPip
  • 868 posts

Posted 22 May 2011 - 11:32 PM

I would like to store an URL to the FindAGrave website for each person that's in my RM database. I want to be able to report on whether or not an URL exists for each person in my db. I'm thinking that I need a new Fact Type, which would allow me to query who has a memorial page in FindAGrave, and who doesn't. I could then craft a sentence that includes the URL. I actually only need the ID in FindAGrave and could store the rest of the URL in one place, namely, the sentence. My goal would then be to have a link to FindAGrave in the narrative when I use RM's Create a Website.

Is this a reasonable approach, or have I overlooked an obvious solution? If a new Fact Type is the way to go, is there a forum discussion about how to do that? Thanks in advance.


To create a new fact type, start at the main menu:
Lists > Fact Type List > Design new fact type >
Create a new fact type (Individual)
Name =Findagrave, Abbreviaton = FAG, (checkmark) Use description field

Edit Role
Role Name = Principal , Sentence template =[Person] has a memorial page at Findagrave.com: h ttp://www.findagrave.com/cgi-bin/fg.cgi?page=gr&GRid=[DESC]
which would result in an output of John David Doe has a memorial page at Findagrave.com: h ttp://www.findagrave.com/cgi-bin/fg.cgi?page=gr&GRid=123456789

** Remove the space in "h ttp" (necessary here to prevent a live link)

Now, you can use your new fact type (Findagrave), enter the memorial number (ID) in the description field, and you're set. As mentioned earlier, the downside is that this will not create a clickable URL anywhere. As a simplistic alternative, you could craft the Sentence Template to read = Findagrave ID#[DESC]
which would result in an output of just FindagraveID#123456789 without any formal sentence.

You can search or report on Findagrave VALUE = is blank (or) is not blank

#4 cap624

cap624

    Member

  • Members
  • PipPip
  • 10 posts

Posted 23 May 2011 - 07:03 AM

Edit Role
Role Name = Principal , Sentence template =[Person] has a memorial page at Findagrave.com: h ttp://www.findagrave.com/cgi-bin/fg.cgi?page=gr&GRid=[DESC]
which would result in an output of John David Doe has a memorial page at Findagrave.com: h ttp://www.findagrave.com/cgi-bin/fg.cgi?page=gr&GRid=123456789

** Remove the space in "h ttp" (necessary here to prevent a live link)

Now, you can use your new fact type (Findagrave), enter the memorial number (ID) in the description field, and you're set. As mentioned earlier, the downside is that this will not create a clickable URL anywhere.


Thank you very much for the info!

Would a link be created if I embed the HTML code into the sentence, like this:

Sentence template =Click: <a href="h ttp://www.findagrave.com/cgi-bin/fg.cgi?page=gr&GRid=[DESC]">[Person]</a>

The downside is that displaying this sentence with non-HTML viewers is that the HTML code will be visible, making it a non-English sentence (unreadable).

So, what I could do is display the ID in a short sentence, as you suggest, e.g. "FindAGrave ID [DESC]" and then edit all of the .htm files before uploading them to my website to do a search & replace on "FindAGrave ID " to the appropriate HTML code.

I would use Textpad to edit multiple files at once.

Does this approach sound viable?

#5 Ludlow Bay

Ludlow Bay

    Advanced Member

  • Members
  • PipPipPip
  • 868 posts

Posted 23 May 2011 - 08:26 AM

Thank you very much for the info!

Would a link be created if I embed the HTML code into the sentence, like this:

Sentence template =Click: <a href="h ttp://www.findagrave.com/cgi-bin/fg.cgi?page=gr&GRid=[DESC]">[Person]</a>

The downside is that displaying this sentence with non-HTML viewers is that the HTML code will be visible, making it a non-English sentence (unreadable).

So, what I could do is display the ID in a short sentence, as you suggest, e.g. "FindAGrave ID [DESC]" and then edit all of the .htm files before uploading them to my website to do a search & replace on "FindAGrave ID " to the appropriate HTML code.

I would use Textpad to edit multiple files at once.

Does this approach sound viable?


If you set it up that way then use the fact type on an individual and look at the sentence output in the Edit Person screen, you'll see that it gets scrambled: Click: a href="http://www.findagrav...=123456789"John David Doe/a

In other words, the crucial < and > are stripped out. I suppose you could search & replace to fix it, but it would be very tricky.
Replace Click: a with Click: <a
Replace " with "> ** very problematic
Replace /a with </a>


Maybe once the internet has been around awhile longer, RootsMagic will jump on the bandwagon and support hotlinks.

#6 Renee Zamora

Renee Zamora

    Advanced Member

  • Admin
  • PipPipPip
  • 8519 posts

Posted 23 May 2011 - 11:51 AM

Confirming enhancement request for hyperlink support in notes is in our tracking system.
Renee
RootsMagic

#7 cap624

cap624

    Member

  • Members
  • PipPip
  • 10 posts

Posted 23 May 2011 - 12:29 PM

If you set it up that way then use the fact type on an individual and look at the sentence output in the Edit Person screen, you'll see that it gets scrambled: Click: a href="http://www.findagrav...=123456789"John David Doe/a

In other words, the crucial < and > are stripped out. I suppose you could search & replace to fix it, but it would be very tricky.


RM strips out the < and > from a sentence? Is that because RM is trying to determine if it's a switch? Or is it normal behavior to always remove non-punctuation characters? The Help states that a "/" escape character should be used to display special characters - would that work as expected in this situation?

The search and replace won't be tricky using Regular Expressions, as the URL has a fixed pattern.

It sounds like the most straight-forward, and easiest, implementation is to create a new fact type with a simple sentence of "FindAGrave ID: [DESC]". Then that solves two issues: it's readable and its value can be queried (meaning that I can query to see which records have, or don't have, an ID). After that, if I want to create a website with links to FindAGrave, I would edit the .htm files to replace the "FindAGrave ID: " pattern with the correct HTML code.

Thanks, all.

#8 kbens0n

kbens0n

    Advanced Member

  • Members
  • PipPipPip
  • 3464 posts

Posted 23 May 2011 - 01:05 PM

The Help states that a "/" escape character should be used to display special characters - would that work as expected in this situation?

Yes it would. It seems to work as you desire if you edit your fact sentence to read:

Click: /<a href=http://www.findagrave.com/cgi-bin/fg.cgi?page=gr&GRid=[DESC]/>[Person]/</a/>
Note that there is no need for the quotation marks (seems to work fine in current browsers and is optional in new HTML5 standard, I believe).

The more universal (for other fact types too) alternative is pasting the entire URL into the Description: block and then making the fact sentence template read something like:

Find This Grave: /<a href=[DESC]/>[Person]/</a/>
Find This Census Image: /<a href=[DESC]/>[Person]/</a/>

---
--- "GENEALOGY, n. An account of one's descent from an ancestor who did not particularly care to trace his own." - Ambrose Bierce
--- "The trouble ain't what people don't know, it's what they know that ain't so." - Josh Billings
---Ô¿Ô---
K e V i N


#9 Ludlow Bay

Ludlow Bay

    Advanced Member

  • Members
  • PipPipPip
  • 868 posts

Posted 23 May 2011 - 03:17 PM

RM strips out the < and > from a sentence? Is that because RM is trying to determine if it's a switch? Or is it normal behavior to always remove non-punctuation characters? The Help states that a "/" escape character should be used to display special characters - would that work as expected in this situation?

Good catch, cap624 !

One caveat: You wrote:

The search and replace won't be tricky using Regular Expressions, as the URL has a fixed pattern.

.
Keep in mind that Findagrave ID's are anywhere from 1 to 8 digits in length, and fast approaching the use of 9 digits.

#10 kbens0n

kbens0n

    Advanced Member

  • Members
  • PipPipPip
  • 3464 posts

Posted 23 May 2011 - 04:07 PM

The search and replace won't be tricky using Regular Expressions, as the URL has a fixed pattern.

If you go the search & replace route, you don't even need a regex... just substitute unique characters in the "HTML-related" parts, then search & replace'em:
MAYBE
left double angle bracket key combo (ALT key + 2222 on numpad) = «
right double angle bracket key combo (ALT key + 2223 on numpad) = »

---
--- "GENEALOGY, n. An account of one's descent from an ancestor who did not particularly care to trace his own." - Ambrose Bierce
--- "The trouble ain't what people don't know, it's what they know that ain't so." - Josh Billings
---Ô¿Ô---
K e V i N


#11 cap624

cap624

    Member

  • Members
  • PipPip
  • 10 posts

Posted 23 May 2011 - 04:46 PM

The more universal (for other fact types too) alternative is pasting the entire URL into the Description: block and then making the fact sentence template read something like:

Find This Grave: /<a href=[DESC]/>[Person]/</a/>
Find This Census Image: /<a href=[DESC]/>[Person]/</a/>


If I paste the URL into the description, then the sentence is not exactly readable in a narrative report, so having the URL will only look nice when viewed with an internet browser, that is, it looks nice in one medium, but not all. Having just the ID in the description will look nice in all mediums (reports, website).

I'm leaning towards using just the ID for the above reason, as well as conserving space within the db - no need to keep duplicating 90% of the URL every time the fact is used. I know it's not a big deal in the long run, but not duplicating the same text appeals to me esthetically. (Now, if there was a way to create a universal constant that would only be defined once, then that would be great.)

And, I think I'll be generating more reports than websites, so I should gear it towards the medium that's most often used. I will just have to do some extra fussing when creating the website by editing the .htm files to convert the "FindAGrave ID: 123456789" string into HTML code.

In short, it appears that there's no good/easy way to display URLs in both reports and on the created website. Unless there's a switch that indicates what medium is being used (report vs. website)? Thank you all for helping me design this extra feature in my RM db.

#12 cap624

cap624

    Member

  • Members
  • PipPip
  • 10 posts

Posted 23 May 2011 - 06:00 PM

I will just have to do some extra fussing when creating the website by editing the .htm files to convert the "FindAGrave ID: 123456789" string into HTML code.


Like so:

search: \(FindAGrave ID: \)\([0-9]*\)
replace: <a href="http://www.findagrave.com/cgi-bin/fg.cgi?page=gr\&GRid=\2">Memorial</a>

Note that since my sentence template did not include the name of the person, I used a generic word of "Memorial" as the link text.

#13 Kim W

Kim W

    Advanced Member

  • Members
  • PipPipPip
  • 186 posts

Posted 28 May 2011 - 08:16 AM

To create a new fact type, start at the main menu:
Lists > Fact Type List > Design new fact type >
Create a new fact type (Individual)
Name =Findagrave, Abbreviaton = FAG, (checkmark) Use description field

Edit Role
Role Name = Principal , Sentence template =[Person] has a memorial page at Findagrave.com: h ttp://www.findagrave.com/cgi-bin/fg.cgi?page=gr&GRid=[DESC]
which would result in an output of John David Doe has a memorial page at Findagrave.com: h ttp://www.findagrave.com/cgi-bin/fg.cgi?page=gr&GRid=123456789

** Remove the space in "h ttp" (necessary here to prevent a live link)

Now, you can use your new fact type (Findagrave), enter the memorial number (ID) in the description field, and you're set. As mentioned earlier, the downside is that this will not create a clickable URL anywhere. As a simplistic alternative, you could craft the Sentence Template to read = Findagrave ID#[DESC]
which would result in an output of just FindagraveID#123456789 without any formal sentence.

You can search or report on Findagrave VALUE = is blank (or) is not blank


Thank you for this detail. I created it in no time at all. I thought it was a great idea to put the Find A Grave # here as well.
Kim