* Family Historian 7 and TNG 12.1

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
avatar
Sharon
Diamond
Posts: 50
Joined: 11 Mar 2004 20:15
Family Historian: V5
Location: Chester
Contact:

Family Historian 7 and TNG 12.1

Post by Sharon » 10 Apr 2023 12:58

I have been using FH as my main database for my family research for years and I am now trying trying to tidy up the notes and various media files, with a view to updating my TNG website mainly with updated histories of some of my ancestors.

I tend to create these 'histories' - mini life stories - in MS Word, export them as PDF files and then import them into FH, which works well enough. In the past I have just added these PDF files to TNG, but the last time I did updates, I decided to create PHP files so that the histories were displayed as web pages, to make the website more interesting to look at. The downside of this though is that I now have 2 copies of each history, doubling the work needed when they are updated.

Is there a way of converting MS Word or PDF documents into PHP, or vice versa, so that pictures and formatting come through in an intelligibe way? (The export as single file webpage (mht) does not work well). Or how have others worked around this problem if they have come across it? I'm just trying to save time and keep copoes in sync if at all possible.

Thank you. :)

User avatar
Valkrider
Megastar
Posts: 1534
Joined: 04 Jun 2012 19:03
Family Historian: V7
Location: Lincolnshire
Contact:

Re: Family Historian 7 and TNG 12.1

Post by Valkrider » 10 Apr 2023 13:31

Don't forget one of the save options in Word is 'Save as a web page' could you use that. From memory it creates an html file which you can embed in a php page.

avatar
Sharon
Diamond
Posts: 50
Joined: 11 Mar 2004 20:15
Family Historian: V5
Location: Chester
Contact:

Re: Family Historian 7 and TNG 12.1

Post by Sharon » 10 Apr 2023 14:37

The 'save as a webpage' option doesn't work very well for me. It messes about with the formatting, moves the pictures and seems to overwrite some lines twice. I've added a snapshot (I hope) of part of the page to explain what I mean.

I didn't know it could be embedded as html for inclusion in a php file though. It actually creates an mht file, would this work in the same way? And how do I access the html?

webpage export.JPG
webpage export.JPG (185.03 KiB) Viewed 511 times
Thank you: )

avatar
Sharon
Diamond
Posts: 50
Joined: 11 Mar 2004 20:15
Family Historian: V5
Location: Chester
Contact:

Re: Family Historian 7 and TNG 12.1

Post by Sharon » 10 Apr 2023 14:41

The 'save as a webpage' option doesn't work very well for me. It messes about with the formatting, moves the pictures and their captions and seems to overwrite some lines twice. I've added a snapshot (I hope) of part of the page to explain what I mean.

I didn't know it could be embedded as html for inclusion in a php file though. It actually creates an mht file, would this work in the same way? And how do I access the html?


Image

Thank you: )

User avatar
Valkrider
Megastar
Posts: 1534
Joined: 04 Jun 2012 19:03
Family Historian: V7
Location: Lincolnshire
Contact:

Re: Family Historian 7 and TNG 12.1

Post by Valkrider » 10 Apr 2023 14:43

It isn't something that I have done but I have just checked and I can save as an htm file see below instead of the save as web page.
html save.png
html save.png (105.62 KiB) Viewed 507 times

User avatar
ADC65
Superstar
Posts: 376
Joined: 09 Jul 2007 10:27
Family Historian: V7

Re: Family Historian 7 and TNG 12.1

Post by ADC65 » 10 Apr 2023 14:46

Hi Sharon, have you read the advice on creating Histories pages on TNG on the TNG Wiki? There are a number of different ways, including creating them from media files (including Word, PDF, etc.)

A brief description is given here, if you haven't already seen it: https://tng.lythgoes.net/wiki/index.php ... -_Creating

There are also a lot of people in the TNG Forum that create history pages, so you could try asking there. The level of help can vary. The link is https://tng.community/index.php?/forums/

I don't make extensive use of Histories myself in TNG, and I can't think of an efficient way of automatically copying them across from FH files, but there are people in the TNG Forum much more experienced that might be able to help.
Adrian Cook
Researching Cook, Summers, Phipps and Bradford, mainly in Wales and the South West of England

avatar
Sharon
Diamond
Posts: 50
Joined: 11 Mar 2004 20:15
Family Historian: V5
Location: Chester
Contact:

Re: Family Historian 7 and TNG 12.1

Post by Sharon » 10 Apr 2023 15:00

Thank uou both - I'll look into your suggestions. :) :)

avatar
Sharon
Diamond
Posts: 50
Joined: 11 Mar 2004 20:15
Family Historian: V5
Location: Chester
Contact:

Re: Family Historian 7 and TNG 12.1

Post by Sharon » 11 Apr 2023 07:04

I've looked into both your suggestions now and realised I tried both when I was first learning to create the php pages.

Converting Word to html creates a lot of its own html code which is useless for creating php pages and very confusing when it comes to editing them. I had to learn to use TNG's historytemplate.php using the Creating Histories pages of the TNG Wiki. What I am hoping to do now is to be able to update these pages without havng to re-create them from scratch.

I think you are right though, I need to ask the TNG forum if anyone has found a simple way to do this.

Thank you both for your help. :)

avatar
harold
Diamond
Posts: 50
Joined: 03 Jun 2015 18:13
Family Historian: V7
Location: Ottawa, Canada
Contact:

Re: Family Historian 7 and TNG 12.1

Post by harold » 11 Apr 2023 13:22

One option I have done in the past with some success was, copy and paste directly from a formatted (Word) document into the Body Text field of a media object in TNG. The Body Text field is a fairly powerful editing tool which will maintain most of the original formatting of the pasted document. It even allows you to switch between HTML mode and VIEWER mode for easy fine tuning. (It worked very well, at least from Word. I did not have great results copying from PDF documents.). Embedded photos or other objects get pasted. They are replaced in the pasted document with placeholders and need to be handled manually. It is not PHP but the displayed results are similar.

To do this I selected the Add New tab option in the Admin Media window of TNG. Then paste directly into the Body Text field.

After pasting and editing, give the new media object a Title/Description and Save. You can link and view this object in exactly the same ways you would with any media object containing a digitized image and the results are displayed in a standard TNG page. I found it surprisingly useful when I needed it.
Harold Craswell
Ottawa, Canada
https://www.craswell.ca/

Post Reply