Jump to content
TNG Community

Folios - Easy Multipage Documents in TNG


kazooter

Recommended Posts

I wanted an easy way to display multipage documents in TNG-- to gather separate page files and display them as if they were a single TNG document. I came up with a method I call folios. A folio folder contains page files (jpg, gif, png, htm, html and php) named so they will appear in alpha-sort order. Pages are are added to the folio simply by dropping them into the folder. When TNG opens a folio, it displays a cover page (optional) and page navigation links to the rest of the pages using the website's TNG styling. All it takes to use folios are two files (folio.php and folio.init.php) in the TNG root directory, and a small index.php file in each folio folder to set up a few parameters. There is an additional drop-in directory with some bells and whistles if you choose to use them: a magnifier lens to help decipher difficult handwriting in old documents, and a tool-tips helper. Folios can be 'internationalized' in all the languages you support on your site, and it does not modify any native TNG files or the database.

Possible uses for folios might include Civil War pension files, probate files, land records, diaries, letters, or a collection of personal records pertaining to a single individual or family. Only one folio needs to be linked to an individual or family, rather than creating each page as a TNG document and linking them all separately.

The latest version (v3.04) was posted 28 Oct 2011 and adds PDF download links.

Folio_v304.zip

Detailed instructions for installing and using folios can be found at the TNG Wiki.

You can see folios being used for Military Pension files if you visit my website at the link below.

www.bisbeefamily.com

Link to comment
Share on other sites

  • Replies 69
  • Created
  • Last Reply

Top Posters In This Topic

  • kazooter

    22

  • LordOfKent

    6

  • Grrr_Not

    6

  • Chuchon

    6

I notice a number of people looking for an easy way to display multipage documents in tng. I have attached a script that does that. It implements a media type I call Folios, and defines a folio as any collection of related documents. A folio consists of an abstract or summary page with a link button to "View Original Documents." Clicking on the link displays the first document image (page number 1) in the folio, and provides page navigation buttons for the rest. There is no practical limit on the number of pages a folio may contain. Each document page has the site title and normal site navigation. Closing the documents returns the user to the abstract page.

I hope someone will find it as useful as I have.

http://www.bisbeefamily.com

Kazooter,

This looks like a very nice approach. To make it easier to find this information in the future, I have created a Folios article on the TNG Wiki using your contents in the above post. I left the download here since the Forum shows download counts whereas the wiki does not.

Link to comment
Share on other sites

I notice a number of people looking for an easy way to display multipage documents in tng. I have attached a script that does that. It implements a media type I call Folios, and defines a folio as any collection of related documents. A folio consists of an abstract or summary page with a link button to "View Original Documents." Clicking on the link displays the first document image (page number 1) in the folio, and provides page navigation buttons for the rest. There is no practical limit on the number of pages a folio may contain. Each document page has the site title and normal site navigation. Closing the documents returns the user to the abstract page. ....

I hope someone will find it as useful as I have.

http://www.bisbeefamily.com

Sounds very useful. Particularly when you have a dozen documents for one person. I suppose the Abstract could be a listing of the other add-on documents with a brief description so you could skip the ones you aren't interested in and go right to the correct page? I think, this would definately unclutter the document folder and help consolidate all the documents relating to one individual without having to search for each one. It would be nice if the setup were a bit more simplified so you didn't have to edit two files for every subdirectory. Some of it gets difficult for newbies and there is always the risk of one typo messing up the works. I'm going to give it a whirl so don't go away. I have a tendency to break things a dozen times before succeeding. I'm looking forward to what the PHP / TNG whiz kids have to say but from my perspective this looks like a Good Job!

Link to comment
Share on other sites

Sounds very useful. Particularly when you have a dozen documents for one person. I suppose the Abstract could be a listing of the other add-on documents with a brief description so you could skip the ones you aren't interested in and go right to the correct page? I think, this would definately unclutter the document folder and help consolidate all the documents relating to one individual without having to search for each one. It would be nice if the setup were a bit more simplified so you didn't have to edit two files for every subdirectory. Some of it gets difficult for newbies and there is always the risk of one typo messing up the works. I'm going to give it a whirl so don't go away. I have a tendency to break things a dozen times before succeeding. I'm looking forward to what the PHP / TNG whiz kids have to say but from my perspective this looks like a Good Job!

Actually, only two lines in the index.php file need to be modified for each folio, but I agree about making it simpler. Perhaps if it works for enough people, Darrin will consider making it (or something like it) native to TNG. If you want to be able to select a specific document right from the abstract, you could display links on the abstract page pointing to the desired document. The links would look something like href="index.php?imageNumber=5". You would probably want to leave the "View Original Documents" buttons out of the html if all the documents are linked.

Link to comment
Share on other sites

Actually, only two lines in the index.php file need to be modified for each folio, but I agree about making it simpler. Perhaps if it works for enough people, Darrin will consider making it (or something like it) native to TNG. If you want to be able to select a specific document right from the abstract, you could display links on the abstract page pointing to the desired document. The links would look something like href="index.php?imageNumber=5". You would probably want to leave the "View Original Documents" buttons out of the html if all the documents are linked.

My mistake. I see that you don't get the page numbers until you get to the first Document. Can that index.php be named anything? I'm wondering if it would confuse people just starting out with the TNG index php. It would only take one upload to the wrong place to create a problem. I'm a beginner so don't take anything I say too seriously, it was just a thought.

Link to comment
Share on other sites

My mistake. I see that you don't get the page numbers until you get to the first Document. Can that index.php be named anything? I'm wondering if it would confuse people just starting out with the TNG index php. It would only take one upload to the wrong place to create a problem. I'm a beginner so don't take anything I say too seriously, it was just a thought.

Renaming index.php to something else will work fine as long as you keep the .php file extension and you make sure the links to the file from the abstract page reflect the correct file name.

Link to comment
Share on other sites

Folio .....

Disclaimer: There is no warranty. Use the script at your own risk. I have not tested it in all the default tng template styles, so it may need to be modified to suit your environment.

I hope someone will find it as useful as I have.

http://www.bisbeefamily.com

I made my first folio. When I made the test run here is what I got.

Warning: mysql_data_seek() [function.mysql-data-seek]: Offset 0 is invalid for MySQL result index 22 (or the query data is unbuffered) in /home/morison/public_html/functions.php on line 3

Warning: mysql_data_seek() [function.mysql-data-seek]: Offset 0 is invalid for MySQL result index 22 (or the query data is unbuffered) in /home/morison/public_html/functions.php on line 11

Warning: mysql_data_seek() [function.mysql-data-seek]: Offset 0 is invalid for MySQL result index 22 (or the query data is unbuffered) in /home/morison/public_html/functions.php on line 19

Any clues where I went wrong???

Link to comment
Share on other sites

Renaming index.php to something else will work fine as long as you keep the .php file extension and you make sure the links to the file from the abstract page reflect the correct file name.

You can ignore my message about the errors. I have it up and running. I'm not sure what the problem was but it seems I fooled with it enough to get it going. I'm going back to something I understand...fixing pictures.

Link to comment
Share on other sites

I made my first folio. When I made the test run here is what I got.

Warning: mysql_data_seek() [function.mysql-data-seek]: Offset 0 is invalid for MySQL result index 22 (or the query data is unbuffered) in /home/morison/public_html/functions.php on line 3

Warning: mysql_data_seek() [function.mysql-data-seek]: Offset 0 is invalid for MySQL result index 22 (or the query data is unbuffered) in /home/morison/public_html/functions.php on line 11

Warning: mysql_data_seek() [function.mysql-data-seek]: Offset 0 is invalid for MySQL result index 22 (or the query data is unbuffered) in /home/morison/public_html/functions.php on line 19

Any clues where I went wrong???

I was just researching this as your reply came in that you got it fixed. The functions which gave you the warnings are used by TNG to display the abstract (or any) media page. My guess is that there was a mistake somewhere in creating the Folio media type. If you have further problems, it will likely be in getting the small styling details in synch with your site. I would be interested knowing any problems you face in doing that.

Link to comment
Share on other sites

I was just researching this as your reply came in that you got it fixed. The functions which gave you the warnings are used by TNG to display the abstract (or any) media page. My guess is that there was a mistake somewhere in creating the Folio media type. If you have further problems, it will likely be in getting the small styling details in synch with your site. I would be interested knowing any problems you face in doing that.

I'm going to use the KISS method..if it ain't broke leave it alone. Thanks for this mod. I think I will put it to very good use. In case you are keeping track of Templates it works with. I'm using 6.

Link to comment
Share on other sites

I notice a number of people looking for an easy way to display multipage documents in tng. I have attached a script that does that. It implements a media type I call Folios, and defines a folio as any collection of related documents. A folio consists of an abstract or summary page with a link button to "View Original Documents." Clicking on the link displays the first document image (page number 1) in the folio, and provides page navigation buttons for the rest. There is no practical limit on the number of pages a folio may contain. Each document page has the site title and normal site navigation. Closing the documents returns the user to the abstract page.

....

I hope someone will find it as useful as I have.

http://www.bisbeefamily.com

I had to tell you how pleased I am with how folio design is working out. It not only cleaned out a lot of separate doc files but the person page is a lot neater as well as what was formerly about 18 or so documents is now 2 folio entries. It solved the problem of having to title all the document the same with sequential number as in 1/5 to maintain the set. I LOVE IT!!!!!!!!!!!!!!! This one should really become a part of the next TNG edition. I even made a little folio.jpg for the entries so I don't have to upload a picture for each one.

Link to comment
Share on other sites

I had to tell you how pleased I am with how folio design is working out. It not only cleaned out a lot of separate doc files but the person page is a lot neater as well as what was formerly about 18 or so documents is now 2 folio entries. It solved the problem of having to title all the document the same with sequential number as in 1/5 to maintain the set. I LOVE IT!!!!!!!!!!!!!!! This one should really become a part of the next TNG edition. I even made a little folio.jpg for the entries so I don't have to upload a picture for each one.

Thanks for the encouragement. I've been working with Ken Roy and think we have already improved the script and its implementation. Stay tuned.

Link to comment
Share on other sites

  • 3 months later...

I recently posted this item with a small upgrade to docview.php. Since then I have upgraded all the folio scripts and reposted them under my original article (above). To avoid any confusion, I've removed the file attached here. Please see my original posting for the latest version of folio scripts.

Link to comment
Share on other sites

  • 2 months later...

Is there a way to add the image viewer controls to the folio images? Just curious.

Nancy

NancyP,

We cannot use the image viewer directly to show Folio document images because image viewer works through showmedia.php, and in Folios, showmedia.php is only used to display the cover sheet--docview.php displays all the underlying documents. However, your question was about adding the image viewer controls. It should be possible to use the image viewer basic display code in docview.php to give the images the same functionality. While probably not difficult, it would need someone smarter than I am at the moment with JavaScript to do it. I will look into it some more, though.

Link to comment
Share on other sites

  • 3 weeks later...

That would be great. Now its necessary to resize the image so that it doesn't overwhelm the screen. If the image involves pages with script (ie a diary), sometimes its too difficult to read.

NancyP,

We cannot use the image viewer directly to show Folio document images because image viewer works through showmedia.php, and in Folios, showmedia.php is only used to display the cover sheet--docview.php displays all the underlying documents. However, your question was about adding the image viewer controls. It should be possible to use the image viewer basic display code in docview.php to give the images the same functionality. While probably not difficult, it would need someone smarter than I am at the moment with JavaScript to do it. I will look into it some more, though.

Link to comment
Share on other sites

  • 8 months later...

Hello,

I just installed the Folios mod and it looks great.

I would like to know how to be able to translate the "View Original Documents" in other languages.

I tried with a text variable (I look in other php files for examples because I don't know many things about php language), but it doesn't work. Could you help me please?

I would like to change the color of "Enter page #" in my folio because I use template 8 that is dark and I don't know how to do too.

Thanks,

Christian

Link to comment
Share on other sites

Hello,

I just installed the Folios mod and it looks great.

I would like to know how to be able to translate the "View Original Documents" in other languages.

I tried with a text variable (I look in other php files for examples because I don't know many things about php language), but it doesn't work. Could you help me please?

I would like to change the color of "Enter page #" in my folio because I use template 8 that is dark and I don't know how to do too.

Thanks,

Christian

Christian,

We have been testing a new version of folios that simplifies the interface and makes use of information from the TNG database. It incorporates a magnifier for those hard-to-read, handwritten documents (if you choose to use it). The controls have been simplified and the labels 'internationalized.' I will fix the Enter Page # color problem and will probably post the new files (version 2) by replacing those in my original message. Give me a few days to get my act together.

Link to comment
Share on other sites

Am adding your folio to my website for the first time and using the new version 2 (downloaded this morning). I am also pretty new user of TNG and I am not a programmer.

Trying to follow the directions (posted above and in the readme file) but am confused on a couple things.

You say "* Make a directory under the media type" - is this the same as adding a new media collection? So I will have a new media "collection" for each and every individual folio I need to create? Or would it be one collection to contain all the individual folios I need to create. If nothing to do with collections, then would you suggest an appropriate directory structure for handling a number of folios.

You say "After you have created the folio Media, you will edit init.ini to add the new mediaID number" - I am guessing you really meant to say the init.php (renamed "index.php") and not "init.ini" since I can not find any such file.

Where/how do I find the "new mediaID number"? I don't see any ID numbers on the administrator's media screen nor in the edit screen for a media item. Also don't see any ID number for collections if that is what was meant.

Please clarify ASAP.

One more question

You say "If a cover page is desired, it is created as either an HTML or PHP file"

Assuming I want a table of contents like cover page for each individual folio - Should this page be created from a History template or is it just a text file with some basic html markup and an .html extension.

Link to comment
Share on other sites

Am adding your folio to my website for the first time and using the new version 2 (downloaded this morning). I am also pretty new user of TNG and I am not a programmer.

Trying to follow the directions (posted above and in the readme file) but am confused on a couple things.

You say "* Make a directory under the media type" - is this the same as adding a new media collection? So I will have a new media "collection" for each and every individual folio I need to create? Or would it be one collection to contain all the individual folios I need to create. If nothing to do with collections, then would you suggest an appropriate directory structure for handling a number of folios.

You say "After you have created the folio Media, you will edit init.ini to add the new mediaID number" - I am guessing you really meant to say the init.php (renamed "index.php") and not "init.ini" since I can not find any such file.

Where/how do I find the "new mediaID number"? I don't see any ID numbers on the administrator's media screen nor in the edit screen for a media item. Also don't see any ID number for collections if that is what was meant.

Please clarify ASAP.

One more question

You say "If a cover page is desired, it is created as either an HTML or PHP file"

Assuming I want a table of contents like cover page for each individual folio - Should this page be created from a History template or is it just a text file with some basic html markup and an .html extension.

Nancy,

Please follow this Link to the TNG Wiki page on Folios. I think all of your questions will be answered there. If not, let me know and I will update the Wiki with more detail.

:-)

Link to comment
Share on other sites

Thanks, I think I got things worked out now.

I appreciate your quick and straight forward answers. Thank you for that. Now if only someone would answer my other questions in the same manner I would be in heaven ;)

Thank you for creating and sharing this mod - it is exactly what we needed. Using this new version seems so much easier then the prior version appeared to be - reading through the wiki kinda scared me away from that version.

A test site might be a great idea, but I can't run php on my machine and can't add any kind of server software. Reading script files may also be a great idea if you have lots of time, but as the director of a nonprofit organization, time is a luxury I seldom have!

Our site is at

www.nedoba.org/gene

Right now it is in TEST mode while I work things out - if someone comes to visit they just get to see my process of working the bugs out.

Link to comment
Share on other sites

Thanks, I think I got things worked out now.

I appreciate your quick and straight forward answers. Thank you for that. Now if only someone would answer my other questions in the same manner I would be in heaven ;)

Thank you for creating and sharing this mod - it is exactly what we needed. Using this new version seems so much easier then the prior version appeared to be - reading through the wiki kinda scared me away from that version.

A test site might be a great idea, but I can't run php on my machine and can't add any kind of server software. Reading script files may also be a great idea if you have lots of time, but as the director of a nonprofit organization, time is a luxury I seldom have!

Our site is at

www.nedoba.org/gene

Right now it is in TEST mode while I work things out - if someone comes to visit they just get to see my process of working the bugs out.

Very nice site, Nancy. Good luck with it.

Link to comment
Share on other sites

I have added folios to a site I am working on which uses Template 8. Everything went pretty smoothly except that much of the template styling is lost on the folio view. This site has very little customization.

What do I need to do to make the folio look right?

Example page: http://www.bergesonfamilyhistory.org/folio...p?imageNumber=1

Using template switching, I tested every template and template 8 is the only one that has this problem.

Thanks,

Bryan

Link to comment
Share on other sites

Christian,

We have been testing a new version of folios that simplifies the interface and makes use of information from the TNG database. It incorporates a magnifier for those hard-to-read, handwritten documents (if you choose to use it). The controls have been simplified and the labels 'internationalized.' I will fix the Enter Page # color problem and will probably post the new files (version 2) by replacing those in my original message. Give me a few days to get my act together.

Hello,

I installed your new version and it works perfectly fine.

Thanks a lot.

Is it possible to change the color of the subtitle of the folio?

The title is in black and difficult to read in template 8.

I found this line (358) in folio.php : <span style=\"color: $subtitleColor;\">$notes</span>

but I don't know how to do and even if it is the good line to change.

I guess that adding some lines in mytngstyle.css in template 8 would be a better idea.

Could you help me, please?

If I can make a suggestion, it would be nice to be able to comment the pictures (adding description, transcription, etc). Maybe next update...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...