Footer in public shared links

Hello all. How to remove footer from public shared links at bottom at page? Find some info about public.css, server.css and styles.css but change it didnt take any effect. Thanks in advance.

Nextcloud version 27.0.1
Operating system and version Ubuntu 22.04
Apache or nginx version Apache 2.4.25
PHP version 8.2.8
Снимок экрана 2023-07-31 150745

Добрый день. Подскажите, как мне убрать баннер внизу страницы при открытии документов? Мешает работать с Excel т.к нет ползунка снизу, баннер его загородил.
Снимок экрана 2023-07-31 150745
Я нашел в интернете инфу про public.css, server.css & styles.css, но их изменение ничего не решило либо я что-то сделал не так. Помогите, пожалуйста.

Nextcloud version 27.0.1
Operating system and version Ubuntu 22.04
Apache or nginx version Apache 2.4.25
PHP version 8.2.8

hi @ares6 welcome to the forum :handshake:

you are missing the required support template. Please fill this form out and edit into your post. This will give us the technical info and logs needed to help you in case the machine in question in spitting out errors! Since you’ve provided zero technical details it is impossible to help you as-is. Thanks.

PS:

  • please don’t double-post → I moved you russian post to the english thread
    (English is more frequent - better chances for answers :wink: )
  • In my Docker:Apache 27.0.1 with separate CODE container I don’t see the banner as you show…

add:

  'simpleSignUpLink.shown' => false,

to your config.php

like described → here in the manual ←

hope that helps,
much luck!

2 Likes

did i need to restart NC? if no so this didnt work

‘simpleSignUpLink.shown’ => false,
done this

No, you need to empty your browser cache.

But it only removes this part of the footer with the signup-link:

image

If you’re annoyed by the name and slogan:

image

You can adjust those in the admin view for “theming” (Внешний вид):
Therefor ajust the “Name” (Название) and “Slogan” (Слоган) fields to suit your needs.

Hope that helps,
much luck!

1 Like

At start i meant to remove this black box fully, this footer. Because u cant move pages in excel.

OK. That is also possible, but you have to make a little change in the file

lib/public/AppFramework/Http/Template/PublicTemplateResponse.php

And this is the command that does make that magic happen:

# Adjust this to your environment:
NCdir="/var/www/nextcloud"
# Completely remove footer:
sudo sed -i 's/private \$footerVisible = true;$/private \$footerVisible = false;/1' $NCdir/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php

And this is the command to make this change undone:

# Adjust this to your environment:
NCdir="/var/www/nextcloud"
# Make footer visible (default):
sudo sed -i 's/private \$footerVisible = false;$/private \$footerVisible = true;/1' $NCdir/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php

But this change is not persistent. After each update, you have to make the change again.

Maybe somebody knows, if this is possible with custom CSS but that is not my strength. :thinking:

Hope this helps,
much luck!

now i got this

"
Technical information

The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

Results

  • core
    • INVALID_HASH
      • core/js/mimetypelist.js
      • lib/public/AppFramework/Http/Template/PublicTemplateResponse.php
    • EXTRA_FILE
      • mariadb_repo_setup

Raw output

Array
(
[core] => Array
(
[INVALID_HASH] => Array
(
[core/js/mimetypelist.js] => Array
(
[expected] => 4b0a99fbab7bc4824176101150bd0ab2b553e128a390e0f872580db4541462b31aad13099fd41533b6695d1b185dabca26a45e9a78227cfb9479eafa439c7bff
[current] => a8e818876a7eff2a2137601eafc6c7d96b99cbf27d94ff9bb59eb237bdab92076ecc2828242bb37551c9c8b6772c0718887bd49cee5b49b3be48d3b9ecaa558f
)

                [lib/public/AppFramework/Http/Template/PublicTemplateResponse.php] => Array
                    (
                        [expected] => 6e12ce0bafa0ff0d648585d4e03b431b08590fea9a2af46924e4512e8d96fe1e84db67a6b1eb753dc6f3fa07fd4a411b724e4246eac27763a8ef437eadbdf510
                        [current] => a0f1a197e6966cddb9b89656a017c7769f8322de15a658a9f3520ba0bb73ef06179c70804970f102a20be560736ca34d4fa6a6621851f56ca34209196c2b85da
                    )

            )

        [EXTRA_FILE] => Array
            (
                [mariadb_repo_setup] => Array
                    (
                        [expected] => 
                        [current] => 5da3356c48c8ea815a7d4af72c2c23aa9b3d3280ec908b920f78f4a182564dd2efb3514e8252a0e8250d79f80c098ca33d272c8ab1751b50570fac452b8f029a
"

I don’t know what you have done.
You misquoted my post: it was a fenced code block and you can’t get it out there, as you may have seen for yourself.

When you apply changes like I described, you should TOTALY KNOW AND UNDERSTAND what that code does.
I’m afraid you didn’t quite understand what to do with the code.

And of course you get invalid hashes when you change files. Therefore I gave you the code to reset it back to default.

That your core/js/mimetypelist.js is invalid is not because of the changes you made on PublicTemplateResponse.php and the extra file mariadb_repo_setup either.

To fix that, you should reset the files back to default. You find them on github. For Version 27.0.1, which is the version you run, the links are:
https://raw.githubusercontent.com/nextcloud/server/v27.0.1/core/js/mimetypelist.js
https://raw.githubusercontent.com/nextcloud/server/v27.0.1/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php

and remove the extra file core/mariadb_repo_setup and run this → occ command ←

occ integrity:check-core

If that returns no error, then you can proceed.

About removing the footer: it works, I’ve tried it in several instances, but you have to make the right change.

If you are not familiar with sed or commandline linux in general, then open the file lib/public/AppFramework/Http/Template/PublicTemplateResponse.php in an editor of your choice and change the line 39:

Footer visible (default):

	private $footerVisible = true;

Footer removed (manipulated):

	private $footerVisible = false;

Hope this helps,
much luck

1 Like

thx for that help!

To remove the footer, you can add the corresponding entry to the Custom CSS app for Nextcloud:

#body-public footer {
  display: none;
}

This CSS rule will hide the footer element on the public pages of Nextcloud.

2 Likes