CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Replace All Message Tokens
Pages: [1]

Author Topic: Replace All Message Tokens  (Read 345 times)

JohnFF

  • I post frequently
  • ***
  • Posts: 235
  • Karma: 6
  • CiviCRM version: 4.4.13
  • CMS version: Drupal 7.28
  • MySQL version: 5.5.31-1
  • PHP version: 5.3.27
Replace All Message Tokens
July 23, 2014, 01:08:09 pm
Hi guys,

What's the best way to replace all of the message tokens in a message? I can replace individual ones but can't seem to get all of them done in a neat way.

Links to lines of code much appreciated!

Thanks,

JohnFF
If you like empowering charities in a free and open way, then you're going to love Civi.

Email Amender: https://civicrm.org/extensions/email-amender
UK Phone Validator: https://civicrm.org/extensions/uk-phone-number-validator
http://civifirst.com
https://twitter.com/civifirst

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: Replace All Message Tokens
July 23, 2014, 02:44:40 pm
Does this help?

https://github.com/civicrm/civicrm-core/blob/0671028905130f2a767a73b42466bb264f6ff23d/CRM/Core/BAO/MessageTemplate.php#L196

@xurizaemon ● www.fuzion.co.nz

JohnFF

  • I post frequently
  • ***
  • Posts: 235
  • Karma: 6
  • CiviCRM version: 4.4.13
  • CMS version: Drupal 7.28
  • MySQL version: 5.5.31-1
  • PHP version: 5.3.27
Re: Replace All Message Tokens
July 29, 2014, 08:35:07 am
Very much, thanks!
If you like empowering charities in a free and open way, then you're going to love Civi.

Email Amender: https://civicrm.org/extensions/email-amender
UK Phone Validator: https://civicrm.org/extensions/uk-phone-number-validator
http://civifirst.com
https://twitter.com/civifirst

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Replace All Message Tokens

This forum was archived on 2017-11-26.