* Plugin: Add Source From Template

Writing and using plugins for Version 5 and above.
Post Reply
avatar
libertygenealogist
Newbie
Posts: 4
Joined: 29 Sep 2016 00:36
Family Historian: V6

Plugin: Add Source From Template

Post by libertygenealogist » 13 Oct 2016 18:48

I apologize in advance if this has already been answered, but I searched the forum and could not find it.

I have begun using the Add Source From Template plugin, but I have created a new project and my templates I created in the first project file are not showing. How do I import the templates I made to use them in more than one project?

Thank you!

avatar
libertygenealogist
Newbie
Posts: 4
Joined: 29 Sep 2016 00:36
Family Historian: V6

Re: Plugin: Add Source From Template

Post by libertygenealogist » 13 Oct 2016 19:28

One more question... Is there a way to put titles in italics using the source template plugin?

User avatar
tatewise
Megastar
Posts: 18180
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: Plugin: Add Source From Template

Post by tatewise » 13 Oct 2016 19:47

I suspect you are talking about Source Titles in italics in Reports which has nothing to do with Plugins.

Anyway, there are no Report Options that affect just Source Titles so you would have to Save Report As > Word-Processor Document and edit the fonts of selected text with a word-processor.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
Shelley
Platinum
Posts: 44
Joined: 07 Aug 2011 06:33
Family Historian: V6.2
Location: Australia

Re: Plugin: Add Source From Template

Post by Shelley » 13 Oct 2016 23:20

Hi libertygenealogist,

I'm the author of that plugin. You will be able to use one set of template with all you projects if you redirect where the plugin saves the template information, and copy your existing templates across.

Redirect the template save location
To redirect the template save location - open the plugin for editing, scroll all the way to the bottom, and change the line:

Code: Select all

pluginDir = fhGetPluginDataFileName("CURRENT_PROJECT",true)
to:

Code: Select all

pluginDir = fhGetPluginDataFileName("LOCAL_MACHINE",true)
Copy existing templates
Your existing templates are in a folder called "Add Source from Template.dat". It's in the plugin folder connected to the project you have been using.

The new save location will be <path to Family Historian plugins folder>\Plugin Data\<pluginname> (according to Family Historian help).
On my Windows 8.1 64 bit Machine that path is actually C:\ProgramData\Calico Pie\Family Historian\Plugin Data\Add Source from Template.dat .

If you can't find the right place try running the plugin once with the new code and save a test template. You should then be able to find the new "Add Source from Template" folder.

Copy across the existing templates, and they should work with any project you open.

Italics
As for italics - source records in Family Historian don't support formatting except to some limited extent in the report output options. So I'm afraid it's beyond the scope of any plugin to do that.

I'm so pleased if you are finding the plugin useful. I made it for my own use and there's a lot of work getting from something that works well enough for yourself, to something that other people can use! I will keep in mind adding an option to the plugin about where the save location should be.

Regards
Shelley

User avatar
tatewise
Megastar
Posts: 18180
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: Plugin: Add Source From Template

Post by tatewise » 13 Oct 2016 23:41

Thank you Shelley for putting us on the right track. :oops:
[ I should have looked at the Plugin rather than assume it created Source records as Templates. So libertygenealogist, ignore everything I suggested earlier, and follow Shelley's advice. I have deleted those misleading replies.]
I have attached an updated Add Source From Global Template Plugin here with the change built in.
Attachments
Add Source From Global Template.fh_lua
Add Source From Global Template
(34.97 KiB) Downloaded 131 times
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
wagojo
Newbie
Posts: 4
Joined: 01 Jun 2014 03:30
Family Historian: V6.2

Re: Plugin: Add Source From Template

Post by wagojo » 22 May 2020 03:09

Hi libertygenealogist!

I just stumbled upon your 2016 post asking about the use of italics and the 'add source from template' plugin for FH.

There is a way! It's a little convoluted but works a treat!

To some extent messes with a bibliography produced by FH that is not 'parsed' through MS Word but only to the extent that the plain text bibliography 'wraps' appropriate text with <i>, or <u> in the plain text version - which is not so bad, as most people understand what that indicates.

When you parse the plain text through Word using the huge power of the 'find and replace' feature of Word you end up with all of the <i>'s and <u>'s stripped out and the text wrapped by those markers formatted as you would like.

Here's an example of my University of Strathclyde compliant source for a newspaper article:

{Author or <i>title of the newspaper<i>}. ({Year of publication}) {Title of the article}. <i>{Title of the newspaper}<i>. {Day and month}. p. {Page and column number}. Collection: {collection} <u>http://{url (www. etc)}<u> : accessed {Date 23 July 2010}

Let me know if you'd like a copy of the process you need to follow to reformat the plain text output above into formatted text in word.

Cheers
Wayne

Post Reply