Substitution Strings

From Freegle Wiki
Revision as of 12:00, 17 July 2026 by RevampBot (talk | contribs) (Wiki revamp: restructure & modernise)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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