Jump to content
TNG Community

Adding Pictures to Personal Information SOLVED


uhanke

Recommended Posts

Hello,

after long time working with personal data i want now to add pictures. So in media i added picures and that seem to work. In familyarea and parentsarea the pictures are displayes correctly. In personal information the thumb is displayed correct as Icon. But in personarea i dont get displayed pictures. How and where setup or define to get the pictures displayed?

Thanks

Uli (Hanke)

 

Link to comment
Share on other sites

Clipboard01.jpg

This is my setting

the first link is my mother. that is schown in parents

the second link is me and shows only the icon but not in person

 

Link to comment
Share on other sites

To make it a bit more clear:

UH.jpg

Link to comment
Share on other sites

If you click on the icon for you does it open the full image?

The original shows in the photo section (below the maps) of an individuals page on my site:

image.png

Link to comment
Share on other sites

Thanks a lot Chris. I didnt expect it there. The icon shows the the thumb and on bottom of page the full picture with text.

Uli

 

Link to comment
Share on other sites

Hello Chris,

just an additional question. Do you know which procedure is used for the personal information? i would like to move the photoblock from the bottom to below the personal data. then could change that with notepad. i know about programming and have that done with own template using template 12.

if you are interested call   tng.hanke1.de

if you cant answer i will open a new request.

Uli

 

Link to comment
Share on other sites

I suspect the file you would need to edit is the getperson.php - bear in mind that upgrades would overwrite any changes you make so you would need to keep accurate records of what you change to edit newer versions.

Link to comment
Share on other sites

Uli,

I also preferred the photos up close to the individual's data, rather than at the bottom. 

Line numbers may vary slightly, but in getperson.php (as Chris suggests);

Around line 686, is this block of code which handles personal media:

    if( empty($tng_extras) ) {
        $media = doMediaSection($personID,$indmedia,$indalbums);
        if( $media ) {
            $persontext .= beginSection("media");
            $persontext .= $media . "<br/>\n";
            $persontext .= endSection("media");
        }
    }

Move this code before  this block of code around 266 :

    if(!$tngconfig['hidedna'] && $rights['both']) {
        include("dna_test_results_lib.php");
    }

The media (documents, headstones, as well as photos) for the person will be with his/her other personal information.

Of course,  ....you say you know programming, so creating a mod is the best way to accomplish this.  It's the best way to avoid what Chris warns about down the road.

It also depends on how many other mods you have installed that modify getperson.php; you may run into conflicts. The location/line number for the code may vary if such other mods are already installed.

EDIT:  I should have noted this is for TNG13.x

Link to comment
Share on other sites

Ron and Rob,

i tried, as Rob proposed, to install the mod. Unfortunately this doesnt work.

Mod.jpg

I checked the sourcecode and at line 34 there is following code:

%location:%
include("tng_begin.php");
%end:%

If i understand right, the file tng_begin.php is not found. i checked this with Explorer and it is in rootdirectory of TNG. Also checked the rights and full rights are set. What else can be the reason for not finding the file?

Uli

 

Link to comment
Share on other sites

Rob Severijns

Uli,

I suppose you're still using TNG 12.2?

Are you using the Public Access Control mod?

image.png

Rob

Edited by Rob Severijns
DISREGARD please
Link to comment
Share on other sites

Hi,

Yes i am stlill with 12.2. Maybe i will change it to 12.3 and then to 13. I never installed and used it as you can see in my last post.

Meanwhile i tried the maual change as Ron suggested and that works. But this may cause trouble.

Uli

 

Link to comment
Share on other sites

Uli, if you attach each photo to an event of the person, they will be all in the personnal information section. Look here : https://genealogie.revestou.fr/getperson.php?personID=I1245&amp;tree=revesto

And you can have several photo for one event. They won't be in a line, but maybe that can be solved.

If you don't have a suitable available event for such or such photo, invent one !

Link to comment
Share on other sites

9 hours ago, uhanke said:

Ron and Rob,

i tried, as Rob proposed, to install the mod. Unfortunately this doesnt work.

Mod.jpg

I checked the sourcecode and at line 34 there is following code:

%location:%
include("tng_begin.php");
%end:%

If i understand right, the file tng_begin.php is not found. i checked this with Explorer and it is in rootdirectory of TNG. Also checked the rights and full rights are set. What else can be the reason for not finding the file?

Uli

 

Uli, don't panic just yet brother. I also use a similiar Mod, that Rob suggested. When I first added the Mod, I got the same result as you.!! The workaround, might be to uninstall all the Mods, you currently have, then install the Regroup Person - Move Media Mod first. After you get the green lights, you can then install the Mods you previously Uninstalled. I use TNG 12.3, so if my Mod works for me, you should be in with a big smile..

Drew

Screenshot from 2022-01-09 14:24:47.png

Edited by edglimited
Correction to Mod description
Link to comment
Share on other sites

6 hours ago, Katryne said:

Uli, if you attach each photo to an event of the person, they will be all in the personnal information section. Look here : https://genealogie.revestou.fr/getperson.php?personID=I1245&amp;tree=revesto

And you can have several photo for one event. They won't be in a line, but maybe that can be solved.

If you don't have a suitable available event for such or such photo, invent one !

Admin >> Setup >> Configuration >> General Settings >> Media
 

Screenshot from 2022-01-15 09:33:28.png

Link to comment
Share on other sites

10 hours ago, uhanke said:

i tried the maual change

What Drew suggests with the Regroup mod should work, sequence of installation becomes important.   Attaching all photos to events will work, but seems a long way around to get the desired result, and you miss out on having the multiple photos in a row.  If all else fails, I can create a private mod to use instead of manual changes so updates are not an issue later.

Link to comment
Share on other sites

Thanks Drew : my photos are now on one row. This guy was the only one in the village tree to have several photos, it was just a test, but on the family tree where I can show stacks of photos, I will use this trick, even considering the creation of a special event for it. That will be easily done, without forking TNG files or installing mods.

 

photos-attached-to-event-one row.png

Link to comment
Share on other sites

Rob Severijns
5 hours ago, tngrlkrz said:

If all else fails, I can create a private mod to use instead of manual changes so updates are not an issue later.

I'd be interested in that too.

Currently using Person Media Title to put the media on on line (except for events).

Will PM you about another private mod I use.

Rob

Link to comment
Share on other sites

Here is how the page would look with a new event type called "Ses photos" and a special event of this type for Suzanne with "Les photos de Suzanne" as entered for details. Afterwards, I associate each photo with this event. And this is made only with basic TNG. Isn't she pretty, my grandMa ?

page-Suzanne.png

Link to comment
Share on other sites

By hint of Drew i got the Regroup mod  installed  -- Thanks Drew

The result is as follows:

2022-01-15_142858.jpg

I would prefer that the pictures are placed as shown above. then the location is similar to parents and family.

Ron, if you have time and are in mood to programm a mod as stated in your post, i would be happy to get it. that is exactly as i want it.

Uli

 

Link to comment
Share on other sites

2 hours ago, uhanke said:

programm a mod

You noted you have TNG 12.2.   I have TNG 12.3 and TNG 13.1.1.  Will PM you.

Link to comment
Share on other sites

Thanks to all Members of this Topic. I have now my TNG as i wanted.

 

Link to comment
Share on other sites

  • uhanke changed the title to Adding Pictures to Personal Information SOLVED

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...