• Resolved otaku42

    (@otaku42)


    Hi.

    By now I’m using PublishPress to notify users about new posts. While PublishPress is a nice and powerful plugin, using it solely for this purpose is like taking a sledgehammer to crack a nut.

    Looking for a solution to get notified about users logging in and out I came across Notification, and I already love it! I found that it also would be able to handle the “notify users of new posts” thing, so I could deactivate PublishPress – yay!

    However: PublishPress provides template shortcodes (the equivalent of what Notification calls merge tags) that reference properties of the receiving user account, such as “first name”, “last name”, “e-mail address” and so on. That way it’s easy to add a personal greeting to notifications, like “Hi [psppno_receiver first_name]” (which would become “Hi Mike”, “Hi Kuba”, … in the resulting e-mail).

    From what I could find out so far it seems that the Notification plugin currently does not provide equivalent merge tags. Would it be hard to add support for that? Or is it already possible and I just missed that feature?

    Bye, Mike

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Kuba Mikita

    (@kubitomakita)

    Hi Mike, thanks for the message.

    You are right and this is the main limitation of the Notification plugin. Because the carriers (like email) are very loosely connected to Triggers (like Post published) and the email recipients are parsed independently it’s not possible to get the receiver context.

    But let’s consider the two situations because it’s not always the case.

    1. Each trigger has its own context, so for example for “User logged in” trigger you have all the merge tags available for the user who logged in. If you send him an email like, “Hi {user_first_name}, someone just logged in to your account…” than it’s possible and you can use provided merge tags.

    2. If you are using the “Post published” trigger and send the email to all the Editors, it’s not possible to target each editor separately. All will get the same email content.

    This is due to the plugin architecture because you can use a static email, you don’t have the context of any WordPress user, there’s no place you could get the user name from.

    Let me know if you need further explanation.

    Thread Starter otaku42

    (@otaku42)

    Hi,

    thanks for your fast response. After reading it, I am still wondering:

    In order to send e-mails to the “audience” defined by the admin – single users, all users with a given role, and so on – the plugin ultimately has to query the database to determine the actual e-mail addresses it should send the notification e-mail to. Wouldn’t it be possible to get like the full user profile at that point, and make profile content available through merge tags within the e-mail template?

    Sure that wouldn’t work for any recipient specified via recipient type “email / merge tag”. But I’d expect it should be working for recipient types “user” and “role”, shouldn’t it?

    Bye, Mike

    Plugin Author Kuba Mikita

    (@kubitomakita)

    As you see, this option would be quite exclusive, because you say “it will work BUT not for this and this”, bad UX.

    After a second thought, it would be possible and probably we’ll release free addon to do this, but it won’t be anytime soon unfortunately as we have a full plate of tasks for the plugin and all the add-ons.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘New Post notification: Merge Tag for name of receiving user?’ is closed to new replies.