Web based family history software

Question How to mark individuals on group photo ?

  • reinr
  • Visitor
  • Visitor
8 years 6 months ago #41 by reinr
Replied by reinr on topic How to mark individuals on group photo ?
Hi alltogether,

what do you guys think about this:

www.meineverwandtschaft.net/individual.p...id=I370&ged=Familien (go to "Multimedia" and see the family Fotos)

I also used image maps, but added them as regular media objects.
If that is what the others did too, excuse me. If someone is interrested let me know.

Greets
Reiner

Please Log in or Create an account to join the conversation.

More
8 years 6 months ago #42 by joeysun
Replied by joeysun on topic How to mark individuals on group photo ?
Reiner,

Please explain to this noob how you incorporated the image maps as regular media objects.

Doug
webtrees v2.1.20 at Our Family Tree (Jiapu 家譜/家谱)
PHP Version v8.1.x, LiteSpeed V8.1, MariaDB 15.1 | protected/'hindered' by ModSecurity

Please Log in or Create an account to join the conversation.

More
8 years 6 months ago #43 by jprause
Replied by jprause on topic How to mark individuals on group photo ?
Hi reinr,
I like your solution much, but:
how do you manage to upload .html as a media object?
In Create a new media object I get "Filenames are not allowed to have the extension “.html”."
Thanks.

Josef

webhosting:-- webtrees 2.1.18, PHP version 8.1.16, MySQL 8.0.22, test site webtrees 2.1.18
local desktop:-- webtrees 2.1.18, PHP version 8.2.12, MySQL 8.0.28, Apache2 2.4.41, Linux Ubuntu 22.04 64bit

Please Log in or Create an account to join the conversation.

  • reinr
  • Visitor
  • Visitor
8 years 6 months ago #44 by reinr
Replied by reinr on topic How to mark individuals on group photo ?
Hi,

thank you for your interest. Yes, Josef, that is a tricky point. Here is a workaround. If someone tries it and has any problems, tell me, I will try to adopt the tutorial. Here we go:

1. a) Create a picture with a resolution that can properly be shown in your webbrowser. (maybe less important for people that know how to resize it automatically, what I do not)
b) Once doing this you can already create a thumbnail from the picture as webtrees will not be able to create one from the .htm file.

2. Create an image map based on your picture from 1.a) and save it as a .htm file.

3. Got to; Control panel -> Family trees -> Add unlinked records -> Media Object

4. Create a media oject with your picture from 1.a). Open it and save the URL

5. Open the .htm file from 2. and replace the filename after <img src= trough the URL from 4.

6. Go to a person that is on your picture and open the "create a new media object" dialogue.
Set;
a) Media file to upload - The .htm file from 2.
b) Thumbnail to upload - The thumbnail from 1.b)
c) Filename on server - any filename you like. NOTE: webtrees refuses to accept .htm as file extension, so type the filename without extension.

rest is optional.
Save it!

7. It may already work like this, but not every browser will open the object correctly. So click on the filename right under the Thumbnail to open the media object and choose "edit" at the filename entry.
Here you will be albe to rename the object to "filename".htm without webtrees refusing it. NOTE: You will have to change the filenames of the ".htm file" [that has been saved without file extension, according to 6.c)] and the thumbnail on the server too.

I hope this works for everyone and I have been able to explain it intelligibly.

Please Log in or Create an account to join the conversation.

  • reinr
  • Visitor
  • Visitor
8 years 6 months ago - 8 years 6 months ago #45 by reinr
Replied by reinr on topic How to mark individuals on group photo ?
Question to Fish/Greg; why is .htm not allowed as file extension?
Last edit: 8 years 6 months ago by reinr.

Please Log in or Create an account to join the conversation.

More
8 years 6 months ago #46 by fisharebest
Replied by fisharebest on topic How to mark individuals on group photo ?

reinr wrote: Question to Fish/Greg; why is .htm not allowed as file extension?


We do not allow users to upload scripts. HTML pages can contain javascript.

If a user uploaded a malicious HTML page containing javascript, and the administrator viewed the page, the script would execute using the identity of the administrator. They would be able to do anything on your server...

If we are only checking .html (and not .htm), then this is an error and we should fix it.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

More
8 years 6 months ago #47 by jprause
Replied by jprause on topic How to mark individuals on group photo ?
Hi reinr,
I followed your tutorial and it works fine.
I had to use the step 7, too.
Thanks a lot.

Josef

webhosting:-- webtrees 2.1.18, PHP version 8.1.16, MySQL 8.0.22, test site webtrees 2.1.18
local desktop:-- webtrees 2.1.18, PHP version 8.2.12, MySQL 8.0.28, Apache2 2.4.41, Linux Ubuntu 22.04 64bit

Please Log in or Create an account to join the conversation.

  • reinr
  • Visitor
  • Visitor
8 years 6 months ago #48 by reinr
Replied by reinr on topic How to mark individuals on group photo ?
I appreciate that.

Please Log in or Create an account to join the conversation.

  • reinr
  • Visitor
  • Visitor
8 years 6 months ago - 8 years 6 months ago #49 by reinr
Replied by reinr on topic How to mark individuals on group photo ?

fisharebest wrote: We do not allow users to upload scripts. HTML pages can contain javascript.

If a user uploaded a malicious HTML page containing javascript, and the administrator viewed the page, the script would execute using the identity of the administrator. They would be able to do anything on your server...

If we are only checking .html (and not .htm), then this is an error and we should fix it.


I do understand these safety issues.

But as I am the administrator - is there no safe AND legal way to use .htm files in such way as I do?

And, if I as admin decide to take the risk of malicious code being uploaded by a user, how can I achieve that my webtrees installation accept .htm files?
Last edit: 8 years 6 months ago by reinr. Reason: spelling

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #50 by UksusoFF
Replied by UksusoFF on topic How to mark individuals on group photo ?
Hi all!

I create simple module for show image map form media note on group photo. Please look at this: github.com/UksusoFF/photo_note_with_image_map

Please Log in or Create an account to join the conversation.

  • jhf2442
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 10 months ago #51 by jhf2442
Replied by jhf2442 on topic How to mark individuals on group photo ?
Hi UksusoFF

wanted to give your module a try
however, each time I activate it in the admin interface and browse to the one picture I have added the map to, the plugin is disabled

Tried to hack the DB to enable the plugin -> is reverted to "disabled" upon reload of the picture

any idea what's going on ? this drives me mad !
(using 1.7.8)

Many thanks

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #52 by UksusoFF
Replied by UksusoFF on topic How to mark individuals on group photo ?

jhf2442 wrote: Hi UksusoFF

wanted to give your module a try
however, each time I activate it in the admin interface and browse to the one picture I have added the map to, the plugin is disabled

Tried to hack the DB to enable the plugin -> is reverted to "disabled" upon reload of the picture

any idea what's going on ? this drives me mad !
(using 1.7.8)

Many thanks

Where you open picture? From individual's media tab, media list or mediaviewer?
Any errors in admin_site_logs.php? Any errors in php logs? Which php version use?

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #53 by fisharebest
Replied by fisharebest on topic How to mark individuals on group photo ?
> Tried to hack the DB to enable the plugin -> is reverted to "disabled" upon reload of the picture

If webtrees gets an error while trying to load a module, it will disable it.

It could be a bug in the code, an incompatibility with your version of PHP, or many other things.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #54 by Andreas
Replied by Andreas on topic How to mark individuals on group photo ?
Hi UksusoFF,

I was courious too, and tried your module. But when trying it, the module disables.

UksusoFF wrote: Where you open picture?
From individual's media tab, media list or mediaviewer?



From individual's media tab

UksusoFF wrote: Any errors in admin_site_logs.php?

webtrees log:
Code:
2017-01-31 08:13:04 config Module photo_note_with_image_map is missing or broken - disabling it 157.55.39.106 <none> GAC.ged 2017-01-31 08:11:48 config Module photo_note_with_image_map is missing or broken - disabling it 95.222.27.102 Andreas GAC.ged 2017-01-31 08:10:07 edit Update: OBJE M8407 95.222.27.102 Andreas GAC.ged 2017-01-31 08:10:07 edit Accepted change 237040 for M8407 / GAC.ged into database 95.222.27.102 Andreas GAC.ged 2017-01-31 08:05:56 edit Update: OBJE M8407 95.222.27.102 Andreas GAC.ged 2017-01-31 08:05:56 edit Accepted change 237039 for M8407 / GAC.ged into database 95.222.27.102 Andreas GAC.ged

UksusoFF wrote: Any errors in php logs?

no

UksusoFF wrote: Which php version use?


PHP Version 7.0.6

Hope that this helps.

Both MAUPILLÉ & RAUHUT families are using webtrees V2.1.18

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #55 by UksusoFF
Replied by UksusoFF on topic How to mark individuals on group photo ?
Please update module and try enable it again.
I today fix small bug and test on clean webtrees install with php 7.0.13.

Please Log in or Create an account to join the conversation.

  • jhf2442
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 10 months ago #56 by jhf2442
Replied by jhf2442 on topic How to mark individuals on group photo ?
just downloaded the latest code from github (including the changes made 1h ago) - works fine now (from medialist, mediafirewall and individual pages), many thanks for the quick fix !

BTW, PHP 7.1.1

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #57 by Andreas
Replied by Andreas on topic How to mark individuals on group photo ?

UksusoFF wrote: Please update module and try enable it again.
I today fix small bug and test on clean webtrees install with php 7.0.13.


I tried it but I fear that I didn't understand how to insert the map.

Is it correct to use media note to put the <map>-tag in ?


I made my own map and put it into the media note
Code:
<map id="1992 Familie Andreas Rauhut Finie Elze" name="map"> <area shape="rect" data-pid="1I" alt="Sandra Rauhut" coords="478,195,542,326" href="http://wt.rauhut.eu/individual.php?pid=1I&ged=GAC.ged" title="Sandra Rauhut" /> <area shape="rect" data-pid="26912I" alt="Chantal Rauhut" coords="367,343,449,566" href="http://wt.rauhut.eu/individual.php?pid=26912I&ged=GAC.ged" title="Chantal Rauhut" /> <area shape="rect" data-pid="5I" alt="Marie-Delphine Rauhut" coords="452,327,518,554" href="http://wt.rauhut.eu/individual.php?pid=5I&ged=GAC.ged" title="Marie-Delphine Rauhut" /> <area shape="rect" data-pid="31383I" alt="Andreas Rauhut" coords="553,365,684,602" href="http://wt.rauhut.eu/individual.php?pid=31383I&ged=GAC.ged" title="Andreas Rauhut" /> <area shape="default" nohref="nohref" alt="" /> </map>
But the module is always deactivated when clicking on the image.

Where's my error ?

Both MAUPILLÉ & RAUHUT families are using webtrees V2.1.18

Please Log in or Create an account to join the conversation.

  • jhf2442
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 10 months ago - 7 years 10 months ago #58 by jhf2442
Replied by jhf2442 on topic How to mark individuals on group photo ?
Hi Andreas,

I think one of the issues is that you have to write data-pid=I1234 and not 1234I
also try removing the href and title parts as they should be generated automatically
Last edit: 7 years 10 months ago by jhf2442.

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago - 7 years 10 months ago #59 by Andreas
Replied by Andreas on topic How to mark individuals on group photo ?
Hello UkusoFF,

UksusoFF wrote: Please update module and try enable it again.
I today fix small bug and test on clean webtrees install with php 7.0.13.


So I did. But I didn't understand yet the use of the module. Please give me the essential hint.


You write on Github how to use the module

<map name="map">
<area shape="rect" coords="450, 192, 516, 288" href="#" data-pid="I1"/>
<area shape="rect" coords="566, 162, 667, 286" href="#" data-pid="Person Name"/>
</map>


I think I start by analyzing the way to use the module. First it's alright to put it in the media note as simple text.
What do I have to replace in your example code ? map , I1 , Person Name ??

Of course the coordinates. And I suppose that the # will be replaced by your module with the correct link to the person.

But can I use either the personal ID or the name od the person to identify it?
This is worrying because a person can't be identified correctly only by its name.


I give you the link to my media

Both MAUPILLÉ & RAUHUT families are using webtrees V2.1.18
Last edit: 7 years 10 months ago by Andreas.

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago - 7 years 10 months ago #60 by mp
Hi Andreas, I will answer in german ...

Also, ich habe das Modul gestern auch ausprobiert und es funktioniert soweit. Damit dies so ist, muss eine Notiz zur Bilddatei hinzugefügt werden und folgenden Inhalt haben:

<map name="map">
<area shape="rect" coords="450, 192, 516, 288" href="#" data-pid="xref_ID der Person"/>
ODER
<area shape="rect" coords="566, 162, 667, 286" href="#" data-pid="exakter Name der Person , wie in der der DB angelegt"/>
</map>

Wichtig ist, dass der Image map-Kode am Anfang der Notiz oder als erste Notiz steht. Sonst wird der Kode nicht genutzt, so die gestrige Erfahrung. Wenn die xref_ID benutzt wird, funktioniert der Link zur Person, wenn der Name genutzt wird, sollte er wirklich richtig eingetragen werden, sonst geht der Link ins Leere (Fehlermeldung). Als Name (name) der map sollte 'map' verwendet werden.

Gut, aber mit etwas Nacharbeit verbunden, hat GIMP bei der Erstellung funktioniert.

edit/ Ich glaube, wenn an Stelle der ID ein Name eingegeben wird, funktioniert der Link nicht wirklich. :(

Martin - ffp.bauschaffen.de
Last edit: 7 years 10 months ago by mp.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum