Substitution Strings

From Freegle Wiki
Jump to navigationJump to search

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.

It's a really good idea to use these 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 groups.

Strings

  • $origsubj expands to the original subject line of the message.
  • $membermail expands to the real email address of the member.
  • $groupname expands to the name of your group (e.g. EdinburghFreegle). You can use this to make your standard texts apply to multiple groups. You can also use this one in the BCC field, e.g. to BCC to $groupname-volunteers@groups.ilovefreegle.org.
  • $owneremail expands to the email address of the owner of the group, e.g. ReadingFreegleUK-volunteers@groups.ilovefreegle.org
  • $groupemail expands to the email address used to send to the group, e.g. ReadingFreegleUK-volunteers@groups.ilovefreegle.org.
  • $groupurl expands to the URL of your group (e.g. https://www.ilovefreegle.org/explore/ReadingFreegleUK).
  • $myname expands to the value in Settings->Personal.
  • $recentwanted expands to a list of recent WANTED messages from that member, and
  • $numrecentwanted to the number of such messages.
  • $recentoffer expands to a list of recent OFFER messages from that member, and
  • $numrecentoffer to the number of such messages.
  • You can guess what $recenttaken, $numrecenttaken, $recentreceived, $numrecentreceived do.
  • $recentmsg expands to a list of recent messages from that member, and $numrecentmsg to the number of messages.
  • $duplicatemessages expands to any suspected duplicates of this message.
  • $networkname expands to the network name
  • $groupnonetwork expands to the group name with the network removed.
  • $nummembers expands to the number of members of your group.
  • $memberreason expands (for pending member messages only) to the reason the member gave for joining the group
  • $membersubdate expands (for pending member messages only) to the date the member applied to join the group.
  • $otherapplied expands (for pending member messages only) to any other groups 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

Here's an example of a message which uses 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 join, 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 groups further away. If you do this, please mention that you've tried this group - it'll help your message get approved.

Regards,
$myname $groupname Moderator