Jump to content
TNG Community
uhanke

Adding Pictures to Personal Information SOLVED

Recommended Posts

uhanke

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)

 

Share this post


Link to post
Share on other sites
Chris Lloyd

Have you checked the box to display the media relative to the person?

image.png

Share this post


Link to post
Share on other sites
uhanke

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

 

Share this post


Link to post
Share on other sites
uhanke

To make it a bit more clear:

UH.jpg

Share this post


Link to post
Share on other sites
Chris Lloyd

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

Share this post


Link to post
Share on other sites
uhanke

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

 

Share this post


Link to post
Share on other sites
Chris Lloyd

No worries :)

Share this post


Link to post
Share on other sites
uhanke

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

 

Share this post


Link to post
Share on other sites
Chris Lloyd

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.

Share this post


Link to post
Share on other sites
tngrlkrz

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

Share this post


Link to post
Share on other sites
uhanke

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

 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
uhanke

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

 

Share this post


Link to post
Share on other sites
Katryne

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 !

Share this post


Link to post
Share on other sites
edglimited
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

Share this post


Link to post
Share on other sites
edglimited
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

Share this post


Link to post
Share on other sites
tngrlkrz
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.

Share this post


Link to post
Share on other sites
Katryne

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
Katryne

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

Share this post


Link to post
Share on other sites
uhanke

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

 

Share this post


Link to post
Share on other sites
tngrlkrz
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.

Share this post


Link to post
Share on other sites
uhanke

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

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×