1

I am using the Mentions module to be able to tag other users in a posts.

I also installed the Rules module and made a new rule which sends email and shows a message on site if the logged in user is mentioned in a blog.

But I need notifications like this to be displayed in a new window.

How can I achieve that?

0

You could also use the Message module for this. So that you expand the rule you already have (or clone it in a variation of it) to have the Rules module create message "entities" (which is what you get if you use the Message module). And then just use the power of Views to display those messages that got created in the format you need (page, block, etc).

Here is a blueprint of what you'd need:

  1. Define an appropriate Message type, using the Message module. Think of Message types as similar to "Content types", which will be used to create Messages, similar to Nodes. I'd imagine that the message text you'll want to use is similar to the eMail or messages your existing rule already produces.

  2. Enhance your rule with a Rules Action "Create entity" (of type "Message"). Refer to the answer in Which user related token(s) can be used to create a Rule for setting up a message type? for some examples, which are related to these variations of using Mentions:

  3. Make sure to also add a Rules Action to pass any relevant tokens from Statuses, via Rules, as Replacement tokens that you can use in your Message type you created with the Message module. Refer to What's the purpose of "Replacement tokens" of a Message type? for more details on this.

  4. Use Views to display the created messages in the format you prefer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.