Remove 'social-button' and 'clientsbox'

Nextcloud version (eg, 10.0.2):
11.0.2
Operating system and version (eg, Ubuntu 16.04):
Debian 9 Stretch
Apache or nginx version (eg, Apache 2.4.25):
Nginx 1.11 Mainline
PHP version (eg, 5.6):
PHP 7.0.16

The issue you are facing:

I am trying to remove the social media buttons (social-button) and also the sync client options (clientsbox) from the personal pages of all users. I am running a custom theme and can’t locate/remove these buttons. I would like them to persist through upgrades, so making part of the custom theme is where my thoughts are. Could anyone assist please

It will be very helpful to get full customization of personal page.

You could adjust the php template of the personal page to adjust/remove these entries. But this would lead to integrity check errors and would not survive an upgrade. But as far as I know it is not possible with themes for now.

…The visible html grid is given in the <path to nextcloud>/settings/template folder. There you can find the right personal.php you need to edit.

In the second half of the code you will find the <form id="language"... and directly beneath <div id="clientsbox"...
You have to fully comment out these sections by framing them with <!-- and -->.

My file part then looks like beneath. But please do not just copy it, because my Nextcloud is version 11 and yours according to your last topic version 10. Do a copy of your personal.php first:

sudo cp <path to nextcloud>/settings/template/personal.php <path to nextcloud>/settings/template/personal.php.bak

Then add the <!-- and --> by yourself as shown beneath:

<!--<form id="language" class="section">
        <h2>
                <label for="languageinput"><?php p($l->t('Language'));?></label>
        </h2>
        <select id="languageinput" name="lang" data-placeholder="<?php p($l->t('Language'));?>">
                <option value="<?php p($_['activelanguage']['code']);?>">
                        <?php p($_['activelanguage']['name']);?>
                </option>
                <?php foreach($_['commonlanguages'] as $language):?>
                        <option value="<?php p($language['code']);?>">
                                <?php p($language['name']);?>
                        </option>
                <?php endforeach;?>
                <optgroup label=" ^ ^  ^ ^  ^ ^  ^ ^  ^ ^  ^ ^  ^ ^  ^ ^  ^ ^  ^ ^ "></optgroup>
                <?php foreach($_['languages'] as $language):?>
                        <option value="<?php p($language['code']);?>">
                                <?php p($language['name']);?>
                        </option>
                <?php endforeach;?>
        </select>
        <a href="https://www.transifex.com/nextcloud/nextcloud/"
                target="_blank" rel="noreferrer">
                <em><?php p($l->t('Help translate'));?></em>
        </a>
</form>-->
<!--<div id="clientsbox" class="section clientsbox">
        <h2><?php p($l->t('Get the apps to sync your files'));?></h2>
        <a href="<?php p($_['clients']['desktop']); ?>" rel="noreferrer" target="_blank">
                <img src="<?php print_unescaped(image_path('core', 'desktopapp.svg')); ?>"
                         alt="<?php p($l->t('Desktop client'));?>" />
        </a>
        <a href="<?php p($_['clients']['android']); ?>" rel="noreferrer" target="_blank">
                <img src="<?php print_unescaped(image_path('core', 'googleplay.png')); ?>"
                         alt="<?php p($l->t('Android app'));?>" />
        </a>
        <a href="<?php p($_['clients']['ios']); ?>" rel="noreferrer" target="_blank">
                <img src="<?php print_unescaped(image_path('core', 'appstore.svg')); ?>"
                         alt="<?php p($l->t('iOS app'));?>" />
        </a>
                <p>
                        <?php print_unescaped(str_replace(
                                [
                                        '{contributeopen}',
                                        '{linkclose}',
                                ],
                                [
                                        '<a href="https://nextcloud.com/contribute" target="_blank" rel="noreferrer">',
                                        '</a>',
                                ],
                                $l->t('If you want to support the project {contributeopen}join development{linkclose} or {contributeopen}spread the word{linkclose}!'))); ?>
                </p>
        <?php if(OC_APP::isEnabled('firstrunwizard')) {?>
                <p><a class="button" href="#" id="showWizard"><?php p($l->t('Show First Run Wizard again'));?></a></p>
        <?php }?>
</div>-->

Afterwards the integrity check of nextcloud (but as I think of, it’s not yet integrated into version 10?) shows an error about the related file. But it’s hidden in admin panel. Also you need to redo these steps every time you upgrade your nextcloud. Maybe the upgrade will also show some error while checking the current nextcloud, so therefore it’s also important to keep the backup of personal.php, just in case.

1 Like

Thank you. I can confirm this worked, and is also the place to remove items such as “Twitter handle” and “Address”

The Social Media icons at the bottom are in “settings.development.notice.php” which is referenced at the bottom of “personal.php”

I agree, it would be good to have a GUI interface or simply a file that’s not volatile where the personal page can be changed

Thanks again.

I commented them out and restarted my server but personal page still has the social media buttons. Is there anything else you did?

Ah yeah, the example above was about to remove language selection and client links. To remove the social buttons you have to comment out the “<p class="social-button">” section (last section) in “/path/to/nextcloud/settings/templates/settings.development.notice.php”.

This is not possible in the mentioned personal.php, as it is included in the versions box and includes the social buttons from there. If you also don’t need the “Developed by the Nextcloud community, the source code is licensed under the AGPL.” text beneath the version information you could also comment out “<p><?php include('settings.development.notice.php'); ?></p>” at the bottom of the personal.php which includes developer info/links as well es social buttons. But if you ask me, it is fair and maybe also part of user license to give every cloud user the hint to the nextcloud developers there ;).

1 Like

this wont work on nc 18 as the theme is not named templates but theme and there is no personal.php file in theme folder or where is it

this works thanks guys

Hello,
You can install the “Custom CSS” application, and you have to set these 3 lines in the customized CSS:
.social-button {
display: none;
}

hi everyone
I want do the same thing in Nextcloud 20.

but i can not find “nextcloud>/settings/template/personal.php”

Hey,
Solution Nextcloud 20:

In Nextcloud 20 you have to go in /var/www/html/apps/settings/templates/settings/personal there you have to comment out the whole text.

You can do this with <!-- in the first line and --> at the end.

@babak I think this is the solution you need :smiley:

1 Like

Thanks @Rico1
It works