Substitution Strings: Difference between revisions

From Freegle Wiki
Don't paste them when sending
Wiki revamp: restructure & modernise
 
Line 1: Line 1:
Substitution strings are special things you can put in standard messages, which [[ModTools]] expands to put in the information before it sends the message. You can put them in the body or subject of a standard message.
Substitution strings are special terms you can put in standard messages, which [[ModTools]] expands with the relevant information before sending. You can use them in the body or subject of a standard message.


It's a really good idea to use these in your standard messages from the start they can make your messages more useful and friendly, and they also help you share your messages with other moderators or use them on other communities.
It's a good idea to use these in your standard messages from the start - they make messages more useful and friendly, and make it easier to share them with other moderators or use them on other communities.


'''Note''': These strings are only expanded at the time when you click a button, e.g. in Pending Messages, to generate one of the standard messages. If you then edit the message before sending it, '''don't''' paste in any substitution strings and send it like that, because the strings won't be expanded on sending.  
'''Note''': these strings are only expanded at the moment you click a button - e.g. in Pending Messages - to generate a standard message. If you then edit the message before sending, '''don't''' paste in any substitution strings and send as-is, because they won't be expanded on sending.


====Strings====
==Strings==
*$origsubj expands to the original subject line of the message.
*$origsubj - the original subject line of the message
*$membermail expands to the real email address of the member.
*$membermail - the member's real email address
*$groupname expands to the name of your community (e.g. EdinburghFreegle). You can use this to make your standard texts apply to multiple communities. You can also use this one in the BCC field, e.g. to BCC to $groupname-volunteers@groups.ilovefreegle.org.
*$groupname - the name of your community (e.g. EdinburghFreegle). Use this to make your standard texts apply to multiple communities - also usable in the BCC field, e.g. to BCC $groupname-volunteers@groups.ilovefreegle.org
*$owneremail expands to the email address of the owner of the community, e.g. ReadingFreegleUK-volunteers@groups.ilovefreegle.org
*$owneremail - the community owner's email address, e.g. ReadingFreegleUK-volunteers@groups.ilovefreegle.org
*$groupemail expands to the email address used to send to the community, e.g. ReadingFreegleUK@groups.ilovefreegle.org.
*$groupemail - the email address used to send to the community, e.g. ReadingFreegleUK@groups.ilovefreegle.org
*$groupurl expands to the URL of your community (e.g. https://www.ilovefreegle.org/explore/ReadingFreegleUK). Use this rather than giving the URL ending with /$groupname, because the latter would break if it includes any spaces. However, $groupurl is not expanded in [[admins]].
*$groupurl - the URL of your community (e.g. https://www.ilovefreegle.org/explore/ReadingFreegleUK). Use this rather than a URL ending in /$groupname, since the latter breaks if the name includes spaces. Note that $groupurl is not expanded in [[admins]]
*$myname expands to the value in Settings->Personal.
*$myname - the value in Settings > Personal
*$recentwanted expands to a list of recent WANTED messages from that member, and  
*$recentwanted - a list of recent WANTED messages from that member, and $numrecentwanted - the number of such messages
*$numrecentwanted to the number of such messages.
*$recentoffer - a list of recent OFFER messages from that member, and $numrecentoffer - the number of such messages
*$recentoffer expands to a list of recent OFFER messages from that member, and  
*$recenttaken, $numrecenttaken, $recentreceived, $numrecentreceived - work the same way, for taken/received items
*$numrecentoffer to the number of such messages.
*$recentmsg - a list of recent messages from that member, and $numrecentmsg - the number of messages
*You can guess what $recenttaken, $numrecenttaken, $recentreceived, $numrecentreceived do.
*$duplicatemessages - any suspected duplicates of this message
*$recentmsg expands to a list of recent messages from that member, and $numrecentmsg to the number of messages.
*$networkname - the network name
*$duplicatemessages expands to any suspected duplicates of this message.
*$groupnonetwork - the community name with the network removed
*$networkname expands to the network name
*$nummembers - the number of members of your community
*$groupnonetwork expands to the community name with the network removed.
*$memberreason - (pending member messages only) the reason the member gave for joining
*$nummembers expands to the number of members of your community.
*$membersubdate - (pending member messages only) the date the member applied to join
*$memberreason expands (for pending member messages only) to the reason the member gave for joining the community.
*$otherapplied - (pending member messages only) any other communities the member has applied to. Be careful - using this reveals to members that you can do this check, which may make them try harder to circumvent it if they're evil
*$membersubdate expands (for pending member messages only) to the date the member applied to join the community.
*$otherapplied expands (for pending member messages only) to any other communities which the member has applied to. Be careful – by using this you're revealing to members that you can do this check, which may make them try harder to circumvent this checking if they're evil.


====Example Message====
==Example message==
Here's an example of a message which uses substitution strings.
Here's an example message using substitution strings.


Dear $memberid,<br>
Dear $memberid,<br>
Line 34: Line 32:
$recentwanted
$recentwanted


As we say in the welcome message you'll have received when you join, you should wait a week before sending a WANTED again for the same item. Please can you wait before  
As we say in the welcome message you'll have received when you joined, you should wait a week before sending a WANTED again for the same item. Please can you wait before reposting it, to allow people time to respond?
reposting it, to allow people time to respond?


Alternatively, you can try communities further away. If you do this, please mention that you've tried this community - it'll help your message get approved.
Alternatively, you can try communities further away. If you do this, please mention that you've tried this community - it'll help your message get approved.
Line 43: Line 40:
$groupname volunteer
$groupname volunteer


 
[[Category:Moderating with ModTools]]
[[Category:Admin]]
[[category:ModTools]]

Latest revision as of 12:00, 17 July 2026

Substitution strings are special terms you can put in standard messages, which ModTools expands with the relevant information before sending. You can use them in the body or subject of a standard message.

It's a good idea to use these in your standard messages from the start - they make messages more useful and friendly, and make it easier to share them with other moderators or use them on other communities.

Note: these strings are only expanded at the moment you click a button - e.g. in Pending Messages - to generate a standard message. If you then edit the message before sending, don't paste in any substitution strings and send as-is, because they won't be expanded on sending.

Strings

  • $origsubj - the original subject line of the message
  • $membermail - the member's real email address
  • $groupname - the name of your community (e.g. EdinburghFreegle). Use this to make your standard texts apply to multiple communities - also usable in the BCC field, e.g. to BCC $groupname-volunteers@groups.ilovefreegle.org
  • $owneremail - the community owner's email address, e.g. ReadingFreegleUK-volunteers@groups.ilovefreegle.org
  • $groupemail - the email address used to send to the community, e.g. ReadingFreegleUK@groups.ilovefreegle.org
  • $groupurl - the URL of your community (e.g. https://www.ilovefreegle.org/explore/ReadingFreegleUK). Use this rather than a URL ending in /$groupname, since the latter breaks if the name includes spaces. Note that $groupurl is not expanded in admins
  • $myname - the value in Settings > Personal
  • $recentwanted - a list of recent WANTED messages from that member, and $numrecentwanted - the number of such messages
  • $recentoffer - a list of recent OFFER messages from that member, and $numrecentoffer - the number of such messages
  • $recenttaken, $numrecenttaken, $recentreceived, $numrecentreceived - work the same way, for taken/received items
  • $recentmsg - a list of recent messages from that member, and $numrecentmsg - the number of messages
  • $duplicatemessages - any suspected duplicates of this message
  • $networkname - the network name
  • $groupnonetwork - the community name with the network removed
  • $nummembers - the number of members of your community
  • $memberreason - (pending member messages only) the reason the member gave for joining
  • $membersubdate - (pending member messages only) the date the member applied to join
  • $otherapplied - (pending member messages only) any other communities the member has applied to. Be careful - using this reveals to members that you can do this check, which may make them try harder to circumvent it if they're evil

Example message

Here's an example message using substitution strings.

Dear $memberid,
You have posted for this item recently. Here are all your recent WANTEDs:
$recentwanted

As we say in the welcome message you'll have received when you joined, you should wait a week before sending a WANTED again for the same item. Please can you wait before reposting it, to allow people time to respond?

Alternatively, you can try communities further away. If you do this, please mention that you've tried this community - it'll help your message get approved.

Regards,
$myname
$groupname volunteer