On this page
Tag a privatemsg when it's being sent.
Last updated on
30 April 2025
In this how-to we're going to tag a privatemsg when it is sent by the website admin. We're going to use rules for this.
- Start a new rule
- Give it a LABEL and MACHINE READABLE NAME
- Now were going to 'Add a condition'
- The condition will be that we only want to tag the privatemsg when it's being sent by the Admin (uid=1)
- Choose 'Rules: Check a truth value'
- In the 'truth value' input, paste the following (don't forget to include the
<?php ?>)<?php return $author->uid==1; ?>
- Press save
Great. So now what we have got is a rule which checks if the $author->uid of the privatemsg is 1. If that is correct, we want Rules to do an action. That action is, load a tag (automatically create one if it doesn't exist) and then assign it to the sent privatemsg. So here goes.
- Now click 'Add an action'
- Choose 'Privatemsg: Load a tag'
- Here we define what tag to load. If it is an existing tag, then just input the name of the tag in the 'TAG NAME' input field or underneath that input the Tag id. If you want to create a new tag. Just write the tag name you want to use in the 'Tag name' input field. Privatemsg will automatically create the new tag.
- Save it
- Now we need to assign the tag to the sent privatemsg
- Press again 'Add an action'
- Choose 'Privatemsg: Tag a privatemsg thread'
- You will see two dropdown (select list) options. One will be 'TAG NAME', the other will be 'USER FOR WHICH THE MESSAGE WILL BE TAGGED'
- For 'TAG NAME', select the Loaded tag option
- For 'user for which the message will be tagged', set the recipient
- Save
Done
Now when we send a privatemsg to someone as the admin, their privatemsg gets tagged. So they can quickly find messages sent by the website admin.
This of course is just an example,and you can go much further with this.
Help improve this page
Page status: Not set
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion