Topic on Extension talk:Echo

Configuration: $wgEchoNotifications

5
Silkwood (talkcontribs)
Product Version
MediaWiki 1.32.5
PHP 7.2.17-0ubuntu0.18.04.1 (apache2handler)
MariaDB 10.1.38-MariaDB-0ubuntu0.18.04.1

Hello,

my skin

Skin Version License Description Authors
Metrolook 7.0 alpha 2 (578ddcf) 19:13, October 11, 2018 GPL-2.0-or-later Metrolook is a Metro-inspired fork of the Vector skin immewnity, Paladox, Craig Davison and lagleki

does not show the tray icon next to the bell icon in the top-bar of my wiki, so I managed to show all the notifications in one place (the bell).

Despite every attempt, I haven't been able to redirect notifications to "alerts" (instead of "messages").

I tried (as suggested below by @Roan Kattouw (WMF)) with:

$wgExtensionFunctions[] = function () {

    global $wgEchoNotifications;

    // To change individual notification types:

    $wgEchoNotifications['welcome']['section'] = 'alert';

    // To change all notification types at once:

    foreach ( $wgEchoNotificationTypes as &$data ) {

        $data['section'] = 'alert';

    }

};

in LocalSettings.php, and also to modify the file .../extensions/Echo/extension.json (as explained in Echo Extension Configuration section) like this:

"thank-you-edit": {

                                        "user-locators": [

                                                "EchoUserLocator::locateEventAgent"

                                        ],

                                        "category": "system",

                                        "notify-type-availability": {

                                                "email": false

                                        },

                                        "group": "positive",

                                        "presentation-model": "EchoEditThresholdPresentationModel",

                                        "section": "alert"

},

but without success.

What should I do?

Varlin (talkcontribs)

Hi, I don't know if you're still looking for an answer, but I managed to display all notifications under the bell icon (so I can hide the tray icon, I don't see the point of having two icons), with this code :

$wgExtensionFunctions[] = function () {
    global $wgEchoNotifications;
    foreach ( $wgEchoNotifications as &$data ) {
        $data['section'] = 'alert';
    }
};

Thanks, your messages helped.

Silkwood (talkcontribs)

Thank you so much.

89.87.78.186 (talkcontribs)

Exactly what I needed, thanks a lot. Any clarification on why it is implemented with two icons instead of one ?

92.63.169.50 (talkcontribs)

There's "alerts" and "notifications". "alerts" are important and "notifications" are not. That way, important messages don't get spammed away by other messages.


e.g. if someone does something scary (like edit your userpage) and then everybody thanks you for every edit you've ever done, it's nice if the thank you messages don't hide the important message

Reply to "Configuration: $wgEchoNotifications"