Small feature requests
-
Hi guys,
First of no issues but some small feature suggestions. (Which i have been doing manually now with NotificationX since the first release).
1] Make the way the username is displayed an option to choose from.
Now it is First Name + First letter of last name.
I think this should be an option where we can choose from;
– First Name + First letter of last name
– First Name only
– Display name (nick/name)
(For obvious reasons I would not suggest username)
That way you can use it more flexible and in more scenarios.2] Allow the content to be something else then just post title.
We can select Post Title to be displayed which is ok.
But what I am currently changing every time is making it the comment content (as my use mainly focuses around blog / WP comments usage at the moment)I would like a dedicated parameter for comment content in the WP-Comments scenario.
In the back you could do something like;$comment_data['comment'] = wp_trim_words( $comment->comment_content, 10, '...' );
(you could even take that one step further and make the word count (the 10 here) an option)3] I dont like gravatar … for various reasons.(One being it is an unneeded external call)
I would like to see an option for the normal local avatar.
What you now do is a get_avatar call which returns gravatar but with below you could get the local avatar.
$avatar = get_avatar($data['email'], 100, '', $data['name'], array('extra_attr' => 'title="'.$data['name'].'"'));
Once again make it an option as it will make NotificationX more flexible.
This last one is one I just realised;
4a] Sound seems to be coming.
Looking at the demo on https://demo.notificationx.com/?product=v-neck-t-shirt I see you are looking into sound as well. Nice, please make it so the sound is something we can decide upon.4b] Sound compatibility
Also I noticed that the audio.play is not playing on Firefox. This is due to Firefox being a bit more strict on audio.play events. Not sure what you can do to remedy this.
I am using a user to user notification solution running which does trigger even on Firefox.I looked at their code, maybe it may help you get this working as well;
function um_notification_sound() { var $bell = jQuery('.um-notification-b'); var hasNew = $bell.hasClass('has-new'); var liveCount = $bell.find('.um-notification-live-count').html().trim() || 0; var sound = new Audio( um_notifications.sound_url ); if (hasNew && liveCount > $bell.data('liveCount')) { var promise = sound.play(); if (promise !== undefined) { promise.then(function (res) { console.log('Notification sound played!'); }).catch(function (error) { console.log(error.message); }); } } $bell.data
- The topic ‘Small feature requests’ is closed to new replies.