Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 25 2019 17:22
    EOM opened #35
  • Dec 20 2018 22:58
    JeanValJeann opened #34
  • Oct 07 2018 15:03
    Devin0231577 commented #31
  • Oct 07 2018 14:15
    rafi01010010 commented #31
  • Sep 18 2018 03:50
    tgoeminne opened #33
  • Sep 16 2018 15:04
    emiliano-idata opened #32
  • Jun 18 2018 03:05
    Devin0231577 opened #31
  • Jun 13 2018 14:38
    zakblacki edited #30
  • Jun 13 2018 14:38
    zakblacki opened #30
  • May 23 2018 11:53
    LubosRemplik commented #29
  • Mar 02 2018 13:11
    codecov-io commented #29
  • Mar 02 2018 13:10
    codecov-io commented #29
  • Mar 02 2018 13:09
    codecov-io commented #29
  • Mar 02 2018 13:08
    codecov-io commented #29
  • Mar 02 2018 13:07
    codecov-io commented #29
  • Mar 02 2018 13:07
    codecov-io commented #29
  • Mar 02 2018 13:07
    LubosRemplik commented #29
  • Mar 02 2018 13:06
    codecov-io commented #29
  • Mar 02 2018 13:06
    codecov-io commented #29
  • Mar 02 2018 12:44
    codecov-io commented #29
AKKAWEB
@akkaweb
Much better! Thanks a lot! I also moved
$notificationManager->addRecipientList('administrators', [7]);
as I will be using administrators in a bunch of other places. Code look much more cleaner!
Bob Mulder
@bobmulder
Nice! Thats what it's meant to. I understand it wasn't clear enough in the docs?
AKKAWEB
@akkaweb
Well! The doc was not as specific as you have put it to me now. Now it makes way more sense. I think it would help other users of your plugin if you can make this suggestion there...
Just to add, everything else though is very clear on your doc and easy to follow..
AKKAWEB
@akkaweb
@bobmulder Perhaps on your next release. It would be nice to have an option within getNotifications() that would limit the amount of notifications to return. Like latest 4 notifications.
Bob Mulder
@bobmulder
Great idea @akkaweb, as well, feel free to do a PR ;) Don't have that much time for this plugin...
AKKAWEB
@akkaweb
@bobmulder Will do! Thanks!
AKKAWEB
@akkaweb
@bobmulder FYI! I did a PR for the LIMIT change. Once you get a chance to review, please let me know if you have any questions.
Bob Mulder
@bobmulder
@akkaweb Thank you! I've added a comment to #8
AKKAWEB
@akkaweb
@bobmulder Thanks for the constructive comments. I have made suggested changes and updated submitted code.
designskiller
@designskiller
hi
How to install notifier without using composer
Bob Mulder
@bobmulder
Why should you want that @designskiller?
designskiller
@designskiller
because if i do that with composer others will be updated too
Am using an existing project.
Bob Mulder
@bobmulder
Thats only positive right?
designskiller
@designskiller
yes
Bob Mulder
@bobmulder
You can download a zip from github...
But I strongly recommend using composer
designskiller
@designskiller
is there any option with composer that only install notifier without updating others ?
Bob Mulder
@bobmulder
Add the requirement manually to the composer.json and run 'composer update (package)'
designskiller
@designskiller
Thanks @bobmulder
Bob Mulder
@bobmulder
To improve you work-flow you should define versions in composer. That makes it easier to rely on previous versions to prevent bugs, but still use composer the easy way
designskiller
@designskiller
Thanks @bobmulder i will improve
Bob Mulder
@bobmulder
No problem @designskiller, you're welcome!
designskiller
@designskiller
Hi
what is the best way to check notification every second ?
Bob Mulder
@bobmulder
Doubt if you should do that. But if you want to; create an json endpoint which will check for notifications....
designskiller
@designskiller
Why you doubt that @bobmulder
Bob Mulder
@bobmulder
Every second a query with many users at the same time will be heavy...
designskiller
@designskiller
then what shuold i do any ideas @bobmulder
Bob Mulder
@bobmulder
Check per minute @designskiller ?
AKKAWEB
@akkaweb
@designskiller, @bobmulder is correct as it can be heavy on the server. I had the same need to check quickly for new notifications at page load. The way that it works for me is that I start checking immediately at page load, but my jquery script increments the call by 1 second after each call. Such that I get every second, every two seconds, every three seconds, etc. You can even increment by the X seconds you desire or double the interval. Like every second, two seconds, four seconds, eight seconds.
Also for me, I set max increment at 5 minutes and the process starts all over again. Just in case a user leaves the page open and walks away.
Optionally you can even stop the calls at that time
Bob Mulder
@bobmulder
Great information @akkaweb. Probably you can share some code?
Another solution could be: https://pusher.com/...
AKKAWEB
@akkaweb
Sure... I will post my code in a little bit
designskiller
@designskiller
Thanks @bobmulder and @akkaweb i am going to do it from your ways.
@akkaweb if you are going to share some code that would be great help.
AKKAWEB
@akkaweb
@designskiller the following is a jQuery example of how to increment intervals, not specifically an example of how to display your notifications. As a matter of fact, my setup was to check for something else.. not notifications. Here is my jQuery code
jQuery.noConflict();

var interval = 1000;

setTimeout(checkStatus, interval);

function checkStatus(){
    jQuery.ajax({
        method: "GET",
        url: '/dashboard/notifications/new'
    }).done(function(data){
        notifications = jQuery.parseJSON(data);
        notificationsUpdate(notifications);
    });

    // ie. every 1, 2, 3, 4, 5, 6, 7 secs, etc
    interval += 1000;
    // ie. double - every 1, 2, 4, 8, 16, 32 secs, etc.
    // interval = interval * 2;

    setTimeout(checkStatus, interval);
}

function notificationsUpdate(notifications){
    // Code to handle notifications display
}
designskiller
@designskiller
@akkaweb Thanks man!
AKKAWEB
@akkaweb
No prob
ulistaerk
@ulistaerk
@bobmulder hey
Bob Mulder
@bobmulder
hey @ulistaerk
I'll try to reproduce in a minute
ulistaerk
@ulistaerk
ok :)
I've tried cakephp 3.2.10 (which worked fine in other projects) and got the same error
Bob Mulder
@bobmulder
Ok thanks
B1scuit
@B1scuit
Just popped a pull request through as CakePHP updated to 3.3.X last night so now the plugin cant be installed as composer reports cakePHP does not neet the requirements.