Question How to mark individuals on group photo ?
- reinr
- Visitor
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.
- joeysun
- Offline
- Junior Member
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.
- jprause
- Offline
- Senior Member
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
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
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
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.
- jprause
- Offline
- Senior Member
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
Please Log in or Create an account to join the conversation.
- reinr
- 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.
- UksusoFF
- Offline
- Junior Member
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
- Posts: 19
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.
Many thanks
Please Log in or Create an account to join the conversation.
- UksusoFF
- Offline
- Junior Member
Where you open picture? From individual's media tab, media list or mediaviewer?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.
Many thanks
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.
- fisharebest
- Offline
- Administrator
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.
- Andreas
- Offline
- Premium Member
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
webtrees log:UksusoFF wrote: Any errors in admin_site_logs.php?
noUksusoFF wrote: Any errors in php logs?
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.
- UksusoFF
- Offline
- Junior Member
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
- Posts: 19
BTW, PHP 7.1.1
Please Log in or Create an account to join the conversation.
- Andreas
- Offline
- Premium Member
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
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
- Posts: 19
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.
- Andreas
- Offline
- Premium Member
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
Please Log in or Create an account to join the conversation.
- mp
- Offline
- Senior Member
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.