Topic on Extension talk:Echo

Is there a way to merge the "alert" badge and the "notifications"?

9
Oleolsenkjhølkølk (talkcontribs)

Right now, whenever someone is doing an action that creates a notification (giving thanks, making edits etc) the alert icon doesnt change or show a red symbol or anything. So a user doesnt know he has notifications until he looks in his profile menu and se a separate bar called "notifications".

So is it possible to have notifications show where "alerts" are? It seems a bit weird to keep these two as separate, and to even hide one of them.

Quiddity (WMF) (talkcontribs)

In the default setup and skin, notifications like "Thanks" are shown under the "Notices" icon. You can see a screenshot at Help:Notifications#Detailed notification layout. I would guess that perhaps you are talking about a different skin, and possibly a non-Wikimedia site? We would need more context in order to possibly help.

88.90.0.192 (talkcontribs)

@Quiddity (WMF)

Oh, wow, i mean no offense but i actually wasnt expecting a reply until sometime next year, so thank you for noticing this. I really appreciate it.

And yes, it is a mediawiki site, with a skin that is called metrolook, which is built upon the vector skin. So, what happens is that there is a bell icon on the "toolbar" on the top, the same bar as most standard mediawiki skins have. But there is also a drop down menu for your profile related links, login/log out etc. Now, on the drop down menu there is a link called "notifications", where notifications from the echo extension shows up, while the "bell" icon remains basically unused. So, what i was wondering is whether it was possible to merge the two, as i have gotten the impression that in the echo extension "alerts" and "notifications" are two different things?

Currently, in order for a user to see notifications is to click on the alert icon (the bell) which gives a menu, and then the user clicks on a menu link saying notifications, in which they will se whether or not there are new notifications.

I have taken some screenshots, but not sure how to post them here,

Quiddity (WMF) (talkcontribs)

I'm not sure. @Roan Kattouw (WMF) do you know if there's an easy way for a 3rd party wiki to merge the two groups?

Oleolsenkjhølkølk (talkcontribs)

Or, any alternative solutions would be greatly appreciated too. Changing which events gives a notification where or something similar?

Roan Kattouw (WMF) (talkcontribs)

Ideally, the skin that you're using would display both alerts and notifications in a useful way :/

However, changing which notification types are in which group is pretty easy to do in LocalSettings.php:

// To change individual notification types:
$wgEchoNotifications['welcome']['section'] = 'alert';

// To change all notification types at once:
foreach ( $wgEchoNotificationTypes as &$data ) {
    $data['section'] = 'alert';
}
Oleolsenkjhølkølk (talkcontribs)

@Roan Kattouw (WMF)

Hmm, i added the line for changing all notification types at once into my localsettings, and it only produces a 500 error. But thanks for replying at least, but it seems like the easiest thing to do would just be switch around the section tags inside the echo extension files folder. Not quite sure which specific file to edit though, been looking through all the obvious ones without finding a list of which "event" goes where.


Roan Kattouw (WMF) (talkcontribs)

Oh that's right, I forgot that with extension registration, things work differently now. You might have more luck with the following code:

$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';
    }
};
This post was hidden by Quiddity (WMF) (history)
Reply to "Is there a way to merge the "alert" badge and the "notifications"?"