Web based family history software

Question more information about people connected to photo

  • mariannevanharten
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 weeks 2 days ago #1 by mariannevanharten
more information about people connected to photo was created by mariannevanharten
When I look to a photo in the slide show, I also see the name of the person who's connected to that object.
I prefer to see also the birth year (and if passed away the death year)
i.e.
John Doe (1843-1926)
or
Jane Doe (1950-)

Is that possible?

Best regards,
Marianne
 

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

More
3 weeks 1 day ago - 3 weeks 1 day ago #2 by kiwi

When I look to a photo in the slide show, I also see the name of the person who's connected to that object.
I prefer to see also the birth year (and if passed away the death year)
i.e.
John Doe (1843-1926)
or
Jane Doe (1950-)

Is that possible?

If you mean something like this, yes it's quite simple.



Just edit the file webtrees/resources/views/modules/random_media/slide-show.phtml, and add the following after line 67.
Code:
(<?= $individual->lifespan() ?>;)

The final code in that area of the file will look like this:

 

If your OK doing this mod after each webtrees upgrade, thats all you need. Otherwise, I'm sure you could do the same thing with a small add-on module.
  • Last edit: 3 weeks 1 day ago by kiwi.

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

    • mariannevanharten
    • Topic Author
    • Offline
    • Premium Member
    • Premium Member
    More
    3 weeks 1 day ago - 3 weeks 1 day ago #3 by mariannevanharten
    Replied by mariannevanharten on topic more information about people connected to photo
    Thank you very much!
    I am not familiar writing modules and add ons.

    In the code you wrote at the right a question mark, a 'larger than' and a semicolon.

    In the picture I do not see the semicolon. I guess the picture's code is right...
    Last edit: 3 weeks 1 day ago by mariannevanharten.

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

    More
    3 weeks 23 hours ago #4 by kiwi

    In the code you wrote at the right a question mark, a 'larger than' and a semicolon.

    In the picture I do not see the semicolon. I guess the picture's code is right...
    You guessed correctly. Sorry for the typing error. 

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

    More
    3 weeks 20 hours ago #5 by fisharebest
    Replied by fisharebest on topic more information about people connected to photo
    If someone wants to create an issue (or a PR) for this, I'll add it to the next release.

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

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

    More
    3 weeks 16 hours ago #6 by RickM

    If someone wants to create an issue (or a PR) for this, I'll add it to the next release.

     
    I think this is a great idea.. I wonder though IF it might be added as an option to have OR not?? Perhaps add a css class to (<?= $individual->lifespan() ?>)
    EG: <span class="slide_lifespan">(<?= $individual->lifespan() ?>)</span>

    Also perhaps having the Individual persons links as an option.. On one site I help look after there are numerous individuals attached to particular media files.. They are currently not showing by using CSS..

    Rick M
    Tauranga
    New Zealand - Nu Tirani

    alineofmalkins.com/wt-malkins
    Webtrees v2.1.20
    Hosted by HostAmarada on litespeed Server, PHP v8.2

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

    More
    1 week 6 days ago #7 by kiwi

    If someone wants to create an issue (or a PR) for this, I'll add it to the next release.
    PR raised -  github.com/fisharebest/webtrees/pull/5025

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

    Powered by Kunena Forum