Page 1 of 1
Persian date Smarty
Posted: Wed Jul 02, 2014 8:06 am
by farhadprm
Hi,
I found a smarty plugin to visualize the Persian calendar. Does anyone know how I could integrate it into CMSMS?
The link is:
http://code.google.com/p/smartyjalalipl ... p&can=2&q=
There is also a version of CMSMS but is too old and does not work with 1.11.x.:
https://onedrive.live.com/?cid=fa49c2c8 ... C314%21163
Thanks in advance
far
Re: Persian date Smarty
Posted: Wed Jul 02, 2014 10:40 am
by Jo Morg
farhadprm wrote:Does anyone know how I could integrate it into CMSMS?
Usually, any smarty plugin can be dropped in CMSMS own plugins folder and it should work, but these have a hardcoded include, so your best option is to find the smarty own plugins folder (should be <site_root>\lib\smarty\plugins) and drop those files there.
HTH
Re: Persian date Smarty
Posted: Wed Jul 02, 2014 11:15 am
by farhadprm
Thank you for your response.
I copied the files in (<site_root>\lib\smarty\plugins) but when i call it my site go down.
For example, when I edit:
Code: Select all
{$entry->postdate|cms_date_format}
to
I recieve error.
Maybe I'm wrong code to call it?
Thank you
Jo Morg wrote:farhadprm wrote:Does anyone know how I could integrate it into CMSMS?
Usually, any smarty plugin can be dropped in CMSMS own plugins folder and it should work, but these have a hardcoded include, so your best option is to find the smarty own plugins folder (should be <site_root>\lib\smarty\plugins) and drop those files there.
HTH
Re: Persian date Smarty
Posted: Wed Jul 02, 2014 11:18 am
by Jo Morg
farhadprm wrote:I recieve error.
What is the error message?
Re: Persian date Smarty
Posted: Wed Jul 02, 2014 11:23 am
by farhadprm
this is the error message:
Code: Select all
ERROR: at line 17 in file /var/www/vhosts/domain.it/httpdocs/lib/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php:
Syntax error in template "module_db_tpl:News;summaryresponsive-summary-main" on line 17 " {$entry->postdate|jdate_format}" unknown modifier "jdate_format"
Jo Morg wrote:farhadprm wrote:I recieve error.
What is the error message?
Re: Persian date Smarty
Posted: Wed Jul 02, 2014 11:39 am
by Jo Morg
Ok. There is a difference in last release of Smarty in that the correct Smarty plugins folder is in <site_root>\lib\smarty\libs\plugins (my bad), so you'll need to move the files to this folder...
... the bad news is: I tested this, and although it recognizes the modifier it doesn't seem to work so well. You'll need to debug it as there seems to be an issue with the plugin itself.
HTH
Re: Persian date Smarty
Posted: Wed Jul 02, 2014 12:20 pm
by farhadprm
I tried this version and it worked!
Thank you
http://code.google.com/p/smartyjalalipl ... p&can=2&q=
Jo Morg wrote:Ok. There is a difference in last release of Smarty in that the correct Smarty plugins folder is in <site_root>\lib\smarty\libs\plugins (my bad), so you'll need to move the files to this folder...
... the bad news is: I tested this, and although it recognizes the modifier it doesn't seem to work so well. You'll need to debug it as there seems to be an issue with the plugin itself.
HTH
Re: Persian date Smarty
Posted: Wed Jul 02, 2014 12:24 pm
by Jo Morg
Cool!
Maybe I just don't have the locale set on my side and it pukes

.
Glad it worked for you.