|
|
|
|
FamilyTrees.GenoPro.com Customers GenoPro version: 3.1.0.1
Last Login: Thursday, June 2, 2022
Posts: 108,
Visits: 1,280
|
My family tree is historical in nature, and the occupations my ancestors undertook sometimes need some extra explanation. I know I could use the Comments field to give a description of what a Colliery Banksman did, but the resulting report just looks a bit too clunky.
What I'd like to see is either a hyperlink to a page listing all the occupations with a description of what that entailed, or MORE PREFERABLY, I'd like to see a tooltip popup on mouseover. Here is a mockup showing what I mean :

Now I thought the easiest way to achieve this was to insert the html code into her Job Title in the .gno file like so :

Sadly that just gets interpreted literally :

So I've had a little delve into the code, hoping there'd be a simple change I could make in the WriteHtmlOccupations subroutine in the individual.htm. I didn't spot anything I could obviously alter, so I'm a bit lost to tell the truth.
Looking in lang.vbs I saw this comment
' This string contains HTML tags, so it must be used with Report.Write() or with the WritePhrase's argument "{0h}".
I'm hoping this is a pointer to my solution - can you explain how I alter the following bit of code to use the {0h} argument (and that's if I've not got the wrong end of the wrong stick)
Report.WritePhrase StrDicOrTag("PhOccupationWorksAs", CustomTag(o, "NarrativeStyle")), _ StrDateSpan(o.DateStart, Util.IfElse(o.Termination.ID = "", o.DateEnd, nothing)), _ o.Duration, _ strRelative, _ StrFormatText(o, StrParseText(o.Session("Title"))), _ o.WorkType, o.Industry, _ StrFormatText(o, StrParseText(o.Company)), _ StrHtmlHyperlink(o. Place), _ o.Termination.ID = "StillWorking", _ strName, _ Dic.Peek("PrefixTitle_" & CustomTag(o, "Title.Prefix")), _ Dic.Peek("PrefixCompany_" & CustomTag(o, "Company.Prefix"))
What follows is an aside, and a thankyou:
I recently posted up my family tree, with a custom skin, which has a few cute features I've been able to splice in, based on the excellent help I've had here in the forums over the last year or two.
http://familytrees.genopro.com/harrycaper/
Mainly these have been minor tweaks to the Table of Contents - removing the A-Z from the individual's toc, grouping the Pictures TOC by picture type (individual pictures, place pictures, etc) and other such cosmetic stuff.
The bit I'm most chuffed with is what I've been able to do with the Whereabouts section of the Individual's page, tweaking the code to show the photo link for places with pictures, and generating a map page displaying all the geocoded locations for that person :

So a big thankyou for your past assistance
|
|
|
|
|
FamilyTrees.GenoPro.com Customers GenoPro version: 3.1.0.1
Last Login: Thursday, June 2, 2022
Posts: 108,
Visits: 1,280
|
I'd just like to add that what I'm trying to achieve is EXACTLY what this forum does automatically - don't know what the technical term is, but there are automatically generated popups for the text I just posted.
|
|
|
|
|
Customers Important Contributors FamilyTrees.GenoPro.com Translator GenoPro version: 3.1.0.1
Last Login: Sunday, March 21, 2021
Posts: 716,
Visits: 12,927
|
You can use the html code in some fields(i.e.comments, occupations) by placing following code in front <?html?>
|
|
|
|
|
Administrators Customers Important Contributors FamilyTrees.GenoPro.com GenoPro version: 3.1.0.1
Last Login: 2 days ago @ 9:23 PM
Posts: 3,464,
Visits: 26,854
|
A good looking report with some great additions HarryCaper. I like the Google Map for occupations, perhaps I can borrow the idea and add it to the standard report, but perhaps add occupancies and education episodes as well using different markers. A kml path linking each point might be interesting as well showing the order of the events.
<?html?> will indeed give you what you want as maru-san has said. This and other customisation features are described in the attachment to Customising your Report.
'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
|
|
|
|
|
Customers Important Contributors FamilyTrees.GenoPro.com Translator GenoPro version: 3.1.0.1
Last Login: Sunday, March 21, 2021
Posts: 716,
Visits: 12,927
|
|
|
|
|
|
FamilyTrees.GenoPro.com Customers GenoPro version: 3.1.0.1
Last Login: Thursday, June 2, 2022
Posts: 108,
Visits: 1,280
|
The <?html?> tag was just what the doctor ordered! and works a treat : http://familytrees.genopro.com/HarryCaper/Butler-Caroline-ind00007.htm
I've attached the template that generates a person's google map, it just needs to be called from config.xml, and the following line added to the Sub WriteHtmlOccupancies(obj) in lang.vbs :
Report.Write3Ln "<a href='individual-map-", i.id, ".htm' onclick='showPopUpFrame("""");' target='popup' >Display a Google Map of these locations.</a></li></ul></li></ul></div>"
I believe one of the shortcomings of this map code was that it only maps places listed as occupancies. What would be more cool would be if it also mapped place of birth & death, but that's beyond my "cut & paste" coding skills
individual_map.htm
(108 views,
7.19 KB)
|