Web based family history software

Question How to mark individuals on group photo ?

More
7 years 1 month ago - 7 years 1 month ago #61 by Andreas
Replied by Andreas on topic How to mark individuals on group photo ?
Hallo Martin,

Vielen Dank für die Hilfestellung. Soweit war ich auch gekommen, aber irgendwas klemmt noch.
Aber lass mich in english weitermachen. Die Leser kommen überall her.

Let me continue in english. The users are spread over the world.

This is what I tried, but I still have no result and the module is deactivated after each try.


My media entry is here : wt.rauhut.eu/mediaviewer.php?mid=M4933&ged=GAC.ged

Please give me the link to your media entry. So that I will be able to compare.

PS: ich habe Deine Seite gefunden, aber keine Bilder mit einer image map

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

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

  • fisharebest
  • Away
  • Administrator
  • Administrator
More
7 years 1 month ago #62 by fisharebest
Replied by fisharebest on topic How to mark individuals on group photo ?
> the module is deactivated after each try

This is the code that deactivates the module.

Either:

1) the file module.php does not return a valid module
2) the module has an error when we try to use it.

In app/Module.php, find this code.
Code:
foreach ($module_names as $module_name) { try { $module = include WT_ROOT . WT_MODULES_DIR . $module_name . '/module.php'; if ($module instanceof AbstractModule) { $modules[$module->getName()] = $module; } else { throw new \Exception; } } catch (\Exception $ex) { // The module has been deleted or is broken? Disable it. Log::addConfigurationLog("Module {$module_name} is missing or broken - disabling it"); Database::prepare( "UPDATE `##module` SET status = 'disabled' WHERE module_name = :module_name" )->execute([ 'module_name' => $module_name, ]); } }

You might be able to get more information by changing this line
Code:
Log::addConfigurationLog("Module {$module_name} is missing or broken - disabling it - " . $ex->getMessage());

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

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

  • fisharebest
  • Away
  • Administrator
  • Administrator
More
7 years 1 month ago - 7 years 1 month ago #63 by fisharebest
Replied by fisharebest on topic How to mark individuals on group photo ?
> the module is deactivated after each try

This is the code that deactivates the module.

Either:

1) the file module.php does not return a valid module
2) the module has an error when we try to use it.

In app/Module.php, find this code.
Code:
foreach ($module_names as $module_name) { try { $module = include WT_ROOT . WT_MODULES_DIR . $module_name . '/module.php'; if ($module instanceof AbstractModule) { $modules[$module->getName()] = $module; } else { throw new \Exception; } } catch (\Exception $ex) { // The module has been deleted or is broken? Disable it. Log::addConfigurationLog("Module {$module_name} is missing or broken - disabling it"); Database::prepare( "UPDATE `##module` SET status = 'disabled' WHERE module_name = :module_name" )->execute([ 'module_name' => $module_name, ]); } }

You might be able to get more information by changing this line
Code:
Log::addConfigurationLog("Module {$module_name} is missing or broken - disabling it - " . $ex->getMessage());

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Last edit: 7 years 1 month ago by fisharebest.

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

More
7 years 1 month ago - 7 years 1 month ago #64 by UksusoFF
Replied by UksusoFF on topic How to mark individuals on group photo ?

Andreas wrote: 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 ?

Yes that's right.

Andreas wrote: 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 ?

I tested this map and nothing error.
Please make changes described by fisharebest and provide more detailed error description.

jhf2442 wrote: 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

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

Href and wrong pids shoud not throw error.
In pid you can use person ids or any string. If webtrees found person with this pids and you can access to see them person name and years will be loaded from database. Otherwise just string will be show.
Last edit: 7 years 1 month ago by UksusoFF.

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

More
7 years 1 month ago #65 by Andreas
Replied by Andreas on topic How to mark individuals on group photo ?
hello UksusoFF,

UksusoFF wrote: I tested this map and nothing error.

In pid you can use person ids or any string. If webtrees found person with this pids and you can access to see them person name and years will be loaded from database. Otherwise just string will be show.


Did you have a look at wt.rauhut.eu/mediaviewer.php?mid=M4933&ged=GAC.ged ??

This map code used in the media provides the deactivation of your module.

I will try to understand the information given by Greg to manipulate the code.

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

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

More
7 years 1 month ago #66 by UksusoFF
Replied by UksusoFF on topic How to mark individuals on group photo ?

Andreas wrote: Did you have a look at wt.rauhut.eu/mediaviewer.php?mid=M4933&ged=GAC.ged ??

This map code used in the media provides the deactivation of your module.

I will try to understand the information given by Greg to manipulate the code.

Yes. Works fine: tree.iamdrunk.ru/mediaviewer.php?mid=M55&ged=test
Need more error details...

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

More
7 years 1 month ago #67 by mp
@Andreas, do you use the latest github version? There are several changes after the initial version.

The module works without errors on my site with webtrees 1.7.9.


@UksusoFF, could you make a change: If the user uses a name instead of ID than the link to the individuals page should be disabled? At the moment the visitor receive an error message if I use the persons name ...

Martin - ffp.bauschaffen.de

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

More
7 years 1 month ago #68 by Andreas
Replied by Andreas on topic How to mark individuals on group photo ?
I entered the code mentioned by Greg.

Here's the error message provided :

2017-02-01 10:03:59 config Module photo_note_with_image_map is missing or broken - disabling it - /home/rauhut/wt/app/Module.php:130 include(/home/rauhut/wt/modules_v3/photo_note_with_image_map/module.php): failed to open stream: No such file or directory 66.249.64.161 <none> GAC.ged

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

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

More
7 years 1 month ago #69 by Andreas
Replied by Andreas on topic How to mark individuals on group photo ?
@Martin,

yes I updated the module with the newest version from github as mentioned by UksusoFF.

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

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

More
7 years 1 month ago - 7 years 1 month ago #70 by mp
@Andreas, that is my used code inside a inline note. And it works ...

Code:
<map name="map"> <area shape="rect" coords="49,142,134,253" href="#" data-pid="I81" /> <area shape="rect" coords="160,155,247,274" href="#" data-pid="I54" /> <area shape="rect" coords="254,96,330,177" href="#" data-pid="I9" /> <area shape="rect" coords="262,178,339,288" href="#" data-pid="I201" /> <area shape="rect" coords="412,162,485,268" href="#" data-pid="I198" /> <area shape="rect" coords="488,199,560,314" href="#" data-pid="I46" /> <area shape="rect" coords="552,114,626,211" href="#" data-pid="I162" /> <area shape="rect" coords="654,156,728,267" href="#" data-pid="I163" /> <area shape="rect" coords="741,177,809,285" href="#" data-pid="I199" /> <area shape="rect" coords="800,128,867,214" href="#" data-pid="I203" /> <area shape="rect" coords="870,202,936,300" href="#" data-pid="I189" /> <area shape="rect" coords="951,186,1012,282" href="#" data-pid="I165" /> <area shape="rect" coords="1011,240,1082,342" href="#" data-pid="I174" /> <area shape="rect" coords="1124,196,1201,296" href="#" data-pid="I188" /> </map>

Martin - ffp.bauschaffen.de
Last edit: 7 years 1 month ago by mp.

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

More
7 years 1 month ago #71 by Andreas
Replied by Andreas on topic How to mark individuals on group photo ?
Thank you all for your help.

I found the bug. I copied the whole content of the zip archive to the server at modules_v3/

The name was photo_note_with_image_map-master


I changed it to photo_note_with_image_map and it worked as desired.

Have a look : wt.rauhut.eu/mediaviewer.php?mid=M4933&ged=GAC.ged

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

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

More
7 years 1 month ago - 7 years 1 month ago #72 by UksusoFF
Replied by UksusoFF on topic How to mark individuals on group photo ?

mp wrote: @UksusoFF, could you make a change: If the user uses a name instead of ID than the link to the individuals page should be disabled? At the moment the visitor receive an error message if I use the persons name ...

Can you provide link to example?

Andreas wrote: The name was photo_note_with_image_map-master

I changed it to photo_note_with_image_map and it worked as desired.

Thanks, updated readme with this issues.
Last edit: 7 years 1 month ago by UksusoFF.

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

More
7 years 1 month ago #73 by Andreas
Replied by Andreas on topic How to mark individuals on group photo ?

UksusoFF wrote:

mp wrote: @UksusoFF, could you make a change: If the user uses a name instead of ID than the link to the individuals page should be disabled? At the moment the visitor receive an error message if I use the persons name ...

Can you provide link to example?


That doesn't need an example. The name shouldn't be used.
In many cases in my database a full name isn't unique. My name for example existes 132x in my database.

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

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

More
7 years 1 month ago #74 by UksusoFF
Replied by UksusoFF on topic How to mark individuals on group photo ?

Andreas wrote: That doesn't need an example. The name shouldn't be used.
In many cases in my database a full name isn't unique. My name for example existes 132x in my database.

There should not link to any person if you use just name. Link will be generated only if found correct person id.

So if any errors in this case:

If the user uses a name instead of ID than the link to the individuals page should be disabled? At the moment the visitor receive an error message if I use the persons name ...

I need more info about error or link with example ;)

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

More
7 years 1 month ago - 7 years 1 month ago #75 by mp
Here is an example: disabled.

The woman on the left side has a name of a person who is surely death. Test it. The ID of the name is I12.

@Andreas
The xref_ID is unique in your database up to the moment when you reorder it or any outside used program do it. Therefore it is not sure that the link will work forever. There were several discussions about xref_ID's ...

Otherwise it is easier and faster to create an image map with names than with ID's. I know that I will lost the link feature ...

Martin - ffp.bauschaffen.de
Last edit: 7 years 1 month ago by mp.

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

More
7 years 1 month ago - 7 years 1 month ago #76 by UksusoFF
Replied by UksusoFF on topic How to mark individuals on group photo ?

mp wrote: Here is an example: ffp.bauschaffen.de/mediaviewer.php?mid=M17&ged=Pannier .

The woman on the left side has a name of a person who is surely death. Test it. The ID of the name is I12.

Otherwise it is easier and faster to create an image map with names than with ID's. I know that I will lost the link feature ...

There is no link to individuals page (only #). See attachement. Or i just little not understand what you mean.

mp wrote: The xref_ID is unique in your database up to the moment when you reorder it or any outside used program do it. Therefore it is not sure that the link will work forever. There were several discussions about xref_ID's ...

Ouch i don't thinking about it...
Attachments:
Last edit: 7 years 1 month ago by UksusoFF.

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

More
7 years 1 month ago #77 by mp

There is no link to individuals page (only #). See attachement. Or i just little not understand what you mean.


Well, if you click on the name in the footer there isn't a link to the individual page. That's right. But if you click on the persons head (image map) an error will open (see attachement) when you use a name only and not the xref_ID for 'data-pid'.


Martin - ffp.bauschaffen.de
Attachments:

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

More
7 years 1 month ago #78 by UksusoFF
Replied by UksusoFF on topic How to mark individuals on group photo ?

mp wrote: Well, if you click on the name in the footer there isn't a link to the individual page. That's right. But if you click on the persons head (image map) an error will open (see attachement) when you use a name only and not the xref_ID for 'data-pid'.

Fixed this behavior, please update module.

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

More
7 years 1 month ago #79 by mp
Looks perfect. Thanks a lot. :)

Martin - ffp.bauschaffen.de

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

  • jhf2442
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 1 month ago #80 by jhf2442
Replied by jhf2442 on topic How to mark individuals on group photo ?
@UksusoFF : at the end of the JS you replace the title with the (clickable) list of individuals
Maybe keep the title and add the list below it ?
Code:
jQuery('#cboxTitle').append('<br>'); jQuery('#cboxTitle').append(text.join('<span class="pnwim-title-separator">, </span>'));

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

Powered by Kunena Forum
}