Please do NOT post requests for help here. Use the Help forum for that.

TOPIC:

How to mark individuals on group photo ? 4 years 1 month ago #41

  • reinr
  • reinr's Avatar
  • Visitor
  • Visitor
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.

How to mark individuals on group photo ? 4 years 1 month ago #42

Reiner,

Please explain to this noob how you incorporated the image maps as regular media objects.
Doug
webtrees v2.0.x at Our Family Jiapu 家譜/家谱
PHP Version 7.3x | Home ISP w/ Raspberry Pi 4 Debian 10.x

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

How to mark individuals on group photo ? 4 years 1 month ago #43

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 1.7.17, PHP version 7.3.13, MySQL 5.7.21, testing webtrees 2.0.5-dev
local desktop:-- webtrees 2.0.5-dev, PHP version 7.2.24, MySQL 5.7.25, Apache2 2.4.29, Linux Ubuntu 18.04 64bit

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

How to mark individuals on group photo ? 4 years 1 month ago #44

  • reinr
  • reinr's Avatar
  • Visitor
  • Visitor
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.

How to mark individuals on group photo ? 4 years 1 month ago #45

  • reinr
  • reinr's Avatar
  • Visitor
  • Visitor
Question to Fish/Greg; why is .htm not allowed as file extension?

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

Last edit: by reinr.

How to mark individuals on group photo ? 4 years 1 month ago #46

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 13196

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 - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

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

How to mark individuals on group photo ? 4 years 1 month ago #47

Hi reinr,
I followed your tutorial and it works fine.
I had to use the step 7, too.
Thanks a lot.
Josef

webhosting:-- webtrees 1.7.17, PHP version 7.3.13, MySQL 5.7.21, testing webtrees 2.0.5-dev
local desktop:-- webtrees 2.0.5-dev, PHP version 7.2.24, MySQL 5.7.25, Apache2 2.4.29, Linux Ubuntu 18.04 64bit

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

How to mark individuals on group photo ? 4 years 1 month ago #48

  • reinr
  • reinr's Avatar
  • Visitor
  • Visitor
I appreciate that.

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

How to mark individuals on group photo ? 4 years 1 month ago #49

  • reinr
  • reinr's Avatar
  • Visitor
  • Visitor

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?

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

Last edit: by reinr. Reason: spelling

How to mark individuals on group photo ? 3 years 5 months ago #50

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.

How to mark individuals on group photo ? 3 years 5 months ago #51

  • jhf2442
  • jhf2442's Avatar Topic Author
  • Offline
  • New
  • New
  • Posts: 18
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.

How to mark individuals on group photo ? 3 years 5 months ago #52

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.

How to mark individuals on group photo ? 3 years 5 months ago #53

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 13196
> 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 - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

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

How to mark individuals on group photo ? 3 years 5 months ago #54

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

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

How to mark individuals on group photo ? 3 years 5 months ago #55

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.

How to mark individuals on group photo ? 3 years 5 months ago #56

  • jhf2442
  • jhf2442's Avatar Topic Author
  • Offline
  • New
  • New
  • Posts: 18
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.

How to mark individuals on group photo ? 3 years 5 months ago #57

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

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

How to mark individuals on group photo ? 3 years 5 months ago #58

  • jhf2442
  • jhf2442's Avatar Topic Author
  • Offline
  • New
  • New
  • Posts: 18
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

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

Last edit: by jhf2442.

How to mark individuals on group photo ? 3 years 5 months ago #59

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

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

Last edit: by Andreas.

How to mark individuals on group photo ? 3 years 5 months ago #60

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

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

Last edit: by mp.
Powered by Kunena Forum