Git Product home page Git Product logo

notify-plugin's People

Contributors

bennothommo avatar blazorazem avatar daftspunk avatar frthjf avatar jumbophp avatar leocantthinkofaname avatar luketowers avatar mahony0 avatar petehalverson avatar prhost avatar samgeorges avatar sikhub avatar webmaxx avatar zhiweiwu0425 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

notify-plugin's Issues

How set host type in SaveDatabaseAction

Hello,

I don't know if this is a channel for this, but I'm having a problem with the SaveDatabaseAction action, it has a field called type that it takes from the host and saves, but always saves null, I would like to define this type through my event. It would be possible? the only place I had access to the host was in the construct of the event, but even so it is not affected.

QUESTION - Help with Event::fire and sending email

In my plugin on boot()

I have added:

    public function boot()
    {
        \RainLab\Notify\Classes\Notifier::bindEvents([
            'rainlab.user.register' => \RainLab\User\NotifyRules\UserRegisteredEvent::class
        ]);
        \RainLab\Notify\Classes\Notifier::instance()->registerCallback(function ($manager) {
            $manager->registerGlobalParams([
                'user' => Auth::getUser()
            ]);
        });
    }

in my component, I have added

Event::fire('rainlab.user.register', [$user, $data]);

But nothings happens,

How I can debug where could be the problem?

Plugin interface not showing up in the settings area

Hi Guys,

I recently installed the Notify Plugin and it says that the plugin will be located in Settings > Notifications. However, I do not see any menu item related to notify in my settings panel (neither on the top bar). I checked my the folder structure, and the notify plugin does exist within the Plugins > RainLab > Notify but I cannot locate in my setting panel.

Am I missing something ? Please Help

[Feature Request] October Backend channel

I see that the goal of this plugin is to streamline the way notifications are delivered which is great. In addition to doing that, I think there would be a benefit to adding a Backend channel out of the box when this plugin is installed. Basically a way by which a user can set up a way by which notifications are delivered to other backend users based on events occurring and this can show up in the top right as a bell icon with numbered badges showing the number of notifications.

MIT License?

I'm assuming this is an MIT license like most of the RainLab plugins. Please confirm.

Creates duplicates every time you view settings

Every time I click on Notification Rules in backend Settings, it creates another record for "Send welcome email to user". Even clicking on one of the rules and deleting it doesn't help because the moment the screen goes back to the list another record is generated.

Manage timing of notifications

I would be good if there was an option to manage the timing of notifications/actions. For instance, sending a reminder 1 month after a user signed up etc.

ExecutionContextCondition not evaluating 'theme' and 'context' conditions?

Hi sorry if I'm mistaken about this, but it seems like ExecutionContextCondition is not evaluating either the theme or context options.

Here is a copy of the current isTrue function for that:

    public function isTrue(&$params)
    {
        $hostObj = $this->host;
        $attribute = $hostObj->subcondition;

        $conditionValue = $hostObj->value;
        $conditionValue = trim(mb_strtolower($conditionValue));

        if ($attribute == 'locale') {
            return array_get($params, 'appLocale') == $conditionValue;
        } else if ($attribute === 'environment') {
            return $conditionValue === \App::environment();
        }

        return false;
    }

I see the context variables isBackend and isConsole are made available in Notifier.php, which could probably be used for evaluating the context at least...

Or if I missed something please let me know!

EDIT: I do have a patched version of this condition that is working for me if you are open to a PR

ActionBuilder widget does not remember state of previous actions

When creating a list of actions, it seems that once a new action is added to the list, the previous actions do not remember their selected state. I can't determine yet if this is just in terms of generating the title, or if it is indeed forgetting the state altogether.

Example

1st Action added.

Screenshot_2020-07-13 New Notification rule myStockz

2nd Action added. (note that the first action doesn't have the text anymore, which in this instance is because the field you enter for that action is now null).

Screenshot_2020-07-13 New Notification rule myStockz(1)

3rd Action added. (note that the second action's text has changed)

Screenshot_2020-07-13 New Notification rule myStockz(2)

Undefined class constant 'CATEGORY_NOTIFICATIONS'

I just saw this plugin in my backend as "recommendation" so i clicked on it and voila: my backend does not work anymore and throws this error:
Undefined class constant 'CATEGORY_NOTIFICATIONS'

public function registerSettings()
{
    return [
        'notifications' => [
            'label'       => 'rainlab.notify::lang.notifications.menu_label',
            'description' => 'rainlab.notify::lang.notifications.menu_description',
            'category'    => SettingsManager::CATEGORY_NOTIFICATIONS,
            'icon'        => 'icon-bullhorn',
            'url'         => Backend::url('rainlab/notify/notifications'),
            'permissions' => ['rainlab.notify.manage_notifications'],
            'order'       => 600
        ],
    ];

Validation error when saving a notification with action with validation

Hello,

When there is an Action with rules, the action is saved when clicking on save in its modal, but when saving the complete notification, it presents a validation error of the action rules again, as if it had not been saved or going through POST along with the saving of the notification.

In v1 this does not happen. The error is giving in v3.

It's also showing an error in action.js, I don't know if it's related, when saving and closing the action modal, before saving the notification, it accuses this error in the console:

Screenshot 2022-09-16 at 17 27 51

https://github.com/rainlab/notify-plugin/blob/master/formwidgets/actionbuilder/assets/js/actions.js#L85-L87

Can't "Compose an email message" when "A user is registered"

Hello,

I wanted to use notify to compose an email message when a user is registered. when when I choose the "compose an email message action" I get an error :

"htmlspecialchars() expects parameter 1 to be string, array given" on line 580 of /vendor/laravel/framework/src/Illuminate/Support/helpers.php

With october 471 with all modules up to dates.

Regards,

Alex

I cannot save notification, i get "The mail template field is required"

Hello,

When i try to save notification rule from 'User' -> 'Is activated' -> Compose a mail message, i choose to send notification to all administrators, i save the rule, and when i save the notification, i get error "The mail template field is required",

When i return to the "Compose a mail message" form, i don't find the data stored.

Hello.

Action class with repeater type field

Hello,
How can make an action class with a repeater type field?

"Unexpected type of array when attempting to save attribute "repeater_field", try adding it to the $jsonable property." on line 751 of /site/vendor/october/rain/src/Database/Model.php

I need more examples

Hello.

Have you got any more examples of how to use RainLab.Notify, please?

I'm interested in creating my own notifications, but you have an example for users only. I am confused and don`t understand anything.

Where can I see examples of how to write notifications from scratch using your plugin?

Conditions not saving the value field

The ConditionBuilder formwidget changes the $_POST superglobal in L351 and L356 but due to this change in https://github.com/octobercms/library, the $_POST superglobal can't be changed directly anymore. So, the value field is not saved. This could be changed here too in order to fix it:

Insted of:

$_POST['condition_data'] = $cache;

Now should be:

$requestData = Request::all();
array_set($requestData, 'condition_data' , $cache);
Request::merge($requestData);        

Error on new notification rule creation

Hello!
I've just installed the notify plugin and I tried to create a new notification rule.

On actions, if I choose the "Store in database" option I get an "Invalid argument supplied for foreach()" on line 89 of /plugins/rainlab/notify/notifyrules/SaveDatabaseAction.php error.

If I choose the "Compose a mail message", everything work as expected.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.