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) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Smarty Date - Where do I put it?
Pages: [1]

Author Topic: Smarty Date - Where do I put it?  (Read 855 times)

nessnzoe

  • I post occasionally
  • **
  • Posts: 84
  • Karma: 2
    • GingerFeet LLC
  • CiviCRM version: 3.4.8
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.14
  • PHP version: 5.3.6
Smarty Date - Where do I put it?
July 07, 2011, 11:56:06 am
Hi all,

I'm looking to include a date for our clients in the email message templates. I've read this thread -- http://forum.civicrm.org/index.php?topic=18494.0 -- but am not clear WHERE I add this code. I'm not a PHP programmer, so I was hoping that I could include this in the message template (i.e., via Mailings -> Message Templates - Add Message Template). I tested that theory by putting

Code: [Select]
{$smarty.now|date_format}
in an email via my own contact record and, sadly, what I saw was: "{$smarty.now|date_format}"  ???

Can I include this code directly in the plain-text or HTML message areas for an email? Or are you talking about including it on some underlying PHP template?

Very confused!
Thanks,
Vanessa

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Smarty Date - Where do I put it?
July 07, 2011, 05:53:32 pm
If you're on a recent version, you may need to update your civicrm.settings.php file to allow for usage of smarty variables in your message templates. Check for this line:

define( 'CIVICRM_MAIL_SMARTY', 0 );

... and change the 0 to 1.

Also please update your forum profile to include CMS, CMS version, CiviCRM version etc.
Protect your investment in CiviCRM by  becoming a Member!

nessnzoe

  • I post occasionally
  • **
  • Posts: 84
  • Karma: 2
    • GingerFeet LLC
  • CiviCRM version: 3.4.8
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.14
  • PHP version: 5.3.6
Re: Smarty Date - Where do I put it?
July 08, 2011, 09:13:18 am
Thanks, Dave.

I'll have our IT guy take a look at this.

I updated my profile for Civi and Drupal, but will have to check with my guy about MySQL, etc. We're on Drupal 6, CiviCRM 3.3.5.

Vanessa

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Smarty Date - Where do I put it?

This forum was archived on 2017-11-26.