How to remove "shared by NAME"

Nextcloud version (13.0.2snap1)
Operating system and version (Ubuntu 16.04)
Apache or nginx version (Apache 2.4.18-2ubuntu3)
PHP version (7.0+35ubuntu6)

I share the link to the file
How to remove this sign “shared by NAME”, see attached picture

Idea: Modify template file by changing CSS code.

1 Like

Can I do it with app “Custom CSS
Can you give me a hint how to hide this “shared by …” ?

Make a copy of nextcloud theme.
You can use any browser to inspect html code and find target element.
Change respective css code.

For details see:

https://docs.nextcloud.com/server/13/developer_manual/core/theming.html

Theming + Custom CSS:

#header .header-shared-by {
	display: none;
}
2 Likes

This works great! Thanks a lot :slight_smile:

Be aware that both the username (data-owner) and the display name (data-owner-display-name) of the user who shares the file are in the source code of the page!

EDIT: And we have to say a big Thanks! to @juliushaertl for this great Custom CSS app! Hopefully we can use it with Nextcloud 14 too. :stuck_out_tongue_winking_eye:

2 Likes

@anon99252149, ok thank.

I need another advice from you.
How to remove this sigh

This is link for upload only folder.

Follofing this manual I made a copy of theme. But I can’t find a file where are situated this source code
https://i.imgur.com/ztCp4Fl.png

I nailed it with Theming + Custom CSS:! :grinning:

 h2 {
 display: none;
 }

Too easy change one file - apps\files_sharing\lib\Controller\ShareController.php line 455
From -
$response->setHeaderDetails($this->l10n->t(‘shared by %s’, [$shareTmpl[‘displayName’]]));
To -
$response->setHeaderDetails($this->l10n->t(‘shared by %s’, Anonymous));

1 Like

Theming + Custom CSS:

#header .header-shared-by {
	display: none;
}

Where can I find this code? In themes -> example -> css I don’t have a css file.

I know I can replace user name to anonymous but I don’t want it to display “shared by anonymous”.

Hello @Anonymoususer,

please read the thread carefully. Every information is here.

Use this app

I downloaded it but where should I place it?

I downloaded it in the from the apps store in the cloud, thx!

1 Like