Before asking for help please read "Requesting Help and Suggestions" by clicking on that tab above here.
  • Page:
  • 1

TOPIC:

How to edit the privacy policy and the footer 4 months 1 week ago #1

  • efhache
  • efhache's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 10
Hi, I've the version 2.0.10 with the Carmen just light theme.

I'd like to change twoo things :
  • the footer
  • the content of the privacy policy

How can I do that? I don't find an edit options in the configuration pannel and/or a config file with this informations.

Can you explain me where can I update it ?

With some advance : Happy New Year all

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

How to edit the privacy policy and the footer 4 months 1 week ago #2

You can use the custom module example-footer from the modules_v4 folder to create your own imprint and privacy policy. The default imprint module should then be disabled in the administration.

I have solved this on my site like this.
Martin - ffp.bauschaffen.de

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

Last edit: by mp.

How to edit the privacy policy and the footer 4 months 1 week ago #3

  • efhache
  • efhache's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 10
Thanks, I'll check it and see how I can do what I want. :-)

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

How to edit the privacy policy and the footer 4 months 1 week ago #4

  • jprause
  • jprause's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 198
Inspired by @mp above I solved it like this , see my test site .
Josef

webhosting:-- webtrees 2.0.11, PHP version 7.4.14, MySQL 5.7.21, testing webtrees 2.0.11
local desktop:-- webtrees 2.0.12-dev, PHP version 7.4.3, MySQL 8.0.21, Apache2 2.4.29, Linux Ubuntu 20.04 64bit

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

How to edit the privacy policy and the footer 1 month 2 weeks ago #5

Thanks Josef - that's very helpful!

I wanted to edit the privacy policy on my site too. I don't like the way it publishes my e-mail address for the world to see, and wanted to replace the e-mail address with a link to the contact form. I've achieved that by modifying your custom module that you link to on GitHub.

These are the changes I made to the module.php file:
I added this line:
use Fisharebest\Webtrees\User;
I added this function:
/**
     * Create a contact link for a user.
     *
     * @param User $user
     *
     * @return string
     */
    public function contactLink(User $user): string
    {
        if ($user instanceof User) {
            $request = app(ServerRequestInterface::class);
            return $this->user_service->contactLink($user, $request);
          }
    }
In function getPageAction I added these lines:
$administrators = $this->user_service->administrators();
        $contactlinks = array();
        foreach ($administrators as $administrator) {
        	$user_id = $administrator->id();
        	$contactlinks[$user_id] = $this->contactLink($administrator);
        }
and under
return
I replaced
$administrators = $this->user_service->administrators();
with
'administrators' => $administrators,
and added this line:
'contactlinks' => $contactlinks,

This is the change I made to the page.phtml file:
I replaced these lines:
<?= e($administrator->realName()) ?> —
                    <a href="mailto:<?= e($administrator->email()) ?>"><?= e($administrator->email()) ?></a>
with this one:
<?php echo($contactlinks[$administrator->id()]) ?>

You can see the result of these changes on my site here.

Thanks for your inspiration!

Mike

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

Last edit: by MikeT.

How to edit the privacy policy and the footer 4 weeks 3 hours ago #6

  • jprause
  • jprause's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 198

...wanted to replace the e-mail address with a link to the contact form. I've achieved that by modifying your custom module that you link to on GitHub.

This is a very good idea. I will modify my custom module to your way. Thank you.
Josef

webhosting:-- webtrees 2.0.11, PHP version 7.4.14, MySQL 5.7.21, testing webtrees 2.0.11
local desktop:-- webtrees 2.0.12-dev, PHP version 7.4.3, MySQL 8.0.21, Apache2 2.4.29, Linux Ubuntu 20.04 64bit

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

  • Page:
  • 1
Powered by Kunena Forum