Tags
A tag is a placeholder in the message text, between curly brackets. JoomSMS replaces it for each receiver when the SMS is sent, so "Hello {joomsms:user_firstname}" becomes "Hello Anna".
In the message editor, click Insert Tag in the toolbar. The list shows the tag groups of the enabled plugins. Click a tag to put it at the cursor. The preview shows the text with the tags replaced for one receiver.
Tag groups
| Group | Plugin | Example |
|---|---|---|
| JoomSMS user's information | JoomSMS Tag : JoomSMS User Informations | {joomsms:user_firstname}, {joomsms:user_phone_number}, any custom field |
| Joomla user's information | JoomSMS Tag : Joomla User Information | {joomlauser:name}, {joomlauser:username}, {joomlauser:email} |
| Insert content | JoomSMS Tag : Content Manager with JoomSMS Tag : Joomla Content | an article's title, text and link, see Article tags |
| Community Builder, JomSocial, EasySocial, AcyMailing user's information | The plugin of that extension | {cbuser:<field>}, {jomsocial:<field id>}, {easysocial:<field id>}, {acymailing:<field>} |
| VirtueMart, HikaShop, redSHOP user and order information, coupons | The shop plugins | the customer's name, the order number, a coupon code |
| Event information | The event plugins | the event title, date and place |
The JoomSMS Tag : JoomSMS User Informations plugin also replaces the code in the subscription confirmation and unsubscribe SMS ({joomsms:user_activationcode}). Keep it enabled if you use the subscription forms.
Formatting options
{joomsms:...} tags accept options after a |:
| Option | Effect |
|---|---|
|default:friend |
Text used when the value is empty: "Hello {joomsms:user_firstname |
|ucfirst, |ucwords, |lower, |upper |
Change the case. |
|type:date |
Show a date value as a date. |
In 6.5.7, options do not work on the tags of the Joomla user, Community Builder, JomSocial, AcyMailing, HikaShop and VirtueMart plugins: |default:... is ignored there.
Translations
The JoomSMS : Manage text plugin replaces {trans:LANGUAGE_KEY} with the text of a Joomla language key, in the language of the page or cron run that sends the SMS. Add your keys with System > Language Overrides.
Tags to avoid
The Joomla user's information group lists every column of the Joomla users table, including password, activation, otpKey and otep. Never put those in a message: they are secrets, and SMS travel through a third party in plain text.
Tags make a text longer or shorter, so the number of SMS parts can differ from one receiver to the next.