Jefferson49/RepositoryHierarchy

Show media objects of sources, which are referenced within a source citations

Jefferson49 opened this issue · 10 comments

In the webtrees forum, there was a discussion to show media objects of sources, which are itself referenced within a source citations: https://www.webtrees.net/index.php/en/forum/help-for-release-2-1/38268-sources-tab

The enclosed file includes a simple patch to test this feature. The enclosed file needs to replace the corresponding file in release v1.3.4

source-facts-within-citation.zip

Thank you for your efforts, I replaced the file, unfortunately I didn't get the desired result. Everything looks unchanged.

It only seems to work for citations within facts/events and not for citations directly linked to the individual. Can you confirm this with your data?

Unfortunatelly, the code for citations linked to individuals is beyond the scope I can modify with my custom module. Therefore, this would need to be changed by webtrees.

Screenshot of citations within facts (here: occupation) => this seems to work:

screenshot_media_objects_of_sources

Screenshot of citations directly linked to individual => no media objects shown:

screenshot_sources_with_media_object 2

Yes I can confirm that
image

Thanks for checking. However, the screenshot does not show any sources at all (?)

Here is one with a source.
image

o.k., this shows that the code in the patch would work for source citations in facts/events (like in occupation).

In order to get an overview about your 8000 source citations (or sources), you could do a quick search in your latest Gedcom export. Search for "@ SOUR", "1 SOUR" and "2 SOUR" (e.g. with notepad++) and count the number of hits. "@ SOUR" would count the number of sources. "1 SOUR" would deliver an estimate, how many source citations are assigned directly to an individual or a family. "2 SOUR" could be properly handled with the code in the patch.

If you have some programming skills and have the confidence to patch your Gedcom, it would be possible to write a skript (e.g. with Python, using regular expressions) to convert the "1 SOUR" citations. You could create a list of all sources and the related media objects in your Gedcom file. Afterwards, you could search all "1 SOUR" citations and add the related media objects from the sources/media list.

If you are interested, I can provide some code snippets as a starting base.

Thank you for your offer, I'll try the Gedcom service program from Hesmer, I've had good experiences with it.

Very good idea! I am also using the Gedcom Service Programs a lot.