如何屏蔽NextCloud不受支持提示?

Cloud storage

1 前言

一个问题,一篇文章,一出故事。
笔者升级NextCloud到25.0.4版本后,发现官方推送如下消息,

This community release of Nextcloud is unsupported and push notifications are limited.
这个 Nextcloud 的社区版本不受支持,推送通知功能受限。
This community release of Nextcloud is unsupported and instant notifications are unavailable.
Nextcloud 的这个社区版本不受支持,即时通知不可用。

笔者非常不喜欢以上消息,于是想着屏蔽。
另外,如果你没有NextCloud环境部署,可以参阅以下链接,

如何部署CentOS 8.x nextCloud?

2 最佳实践

2.1 修改登录页面的提示

2.1.1 修改配置文件

vim /var/www/nextcloud/core/Controller/LoginController.php

可见如下配置,

                $loginMessages = $this->session->get('loginMessages');
                if (!$this->manager->isFairUseOfFreePushService()) {
                        if (!is_array($loginMessages)) {
                                $loginMessages = [[], []];
                        }
                        $loginMessages[1][] = $this->l10n->t('This community release of Nextcloud is unsupported and push notifications are limited.');
                }

然后注解以下行,

//$loginMessages[1][] = $this->l10n->t('This community release of Nextcloud is unsupported and push notifications are limited.');

2.1.2 确认配置

https://nextcloud.cmdschool.org

2.2 修改个人页面的提示

2.2.1 修改配置文件

vim /var/www/nextcloud/apps/settings/templates/settings/personal/personal.info.php

注解掉如下代码段,

<!--
<?php if (!$_['isFairUseOfFreePushService']) : ?>
        <div class="section">
                <div class="warning">
                        <?php p($l->t('This community release of Nextcloud is unsupported and instant notifications are unavailable.')); ?>
                </div>
        </div>
<?php endif; ?>
-->

2.2.2 确认配置

https://nextcloud.cmdschool.org/index.php/settings/user

参阅文档
==================
https://help.nextcloud.com/t/hide-disable-community-warning/135199/5

没有评论

发表回复

Cloud storage
如何快速导入nextCloud的LDAP设置?

1 前言 一个问题,一篇文章,一出故事。 笔者今天尝试从一个NextCloud迁移配置到一个新的Ne …

Cloud storage
如何让NextCloud集成Collabora Online?

1 前言 一个问题,一篇文章,一出故事。 笔者今天尝试将Collabora Online集成到Nex …

Cloud storage
如何解决NextCloud的PCNTL扩展提示?

1 前言 一个问题,一篇文章,一出故事。 笔者今天尝试NextCloud的以下指令, occ con …