-
AuthorPosts
-
Pankaj Sharma Moderator
Pankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
December 14, 2015 at 5:15 am #811903Hi
This way will help you to do thatOpen templates/ja_magz/templateHelper.php file
Find this codepublic static function relTime($timespan, $granularity = 1) { static $units = array( 'YEAR' => 31536000, 'MONTH' => 2592000, 'WEEK' => 604800, 'DAY' => 86400, 'HOUR' => 3600, 'MIN' => 60, 'SEC' => 1, );
Replace it with
return JText::sprintf(JHtml::_('date', $timespan, JText::_('DATE_FORMAT_LC3'))); static $units = array( 'YEAR' => 31536000, 'MONTH' => 2592000, 'WEEK' => 604800, 'DAY' => 86400, 'HOUR' => 3600, 'MIN' => 60, 'SEC' => 1, );
Let me know if it helps
idhla Friendidhla
- Join date:
- February 2011
- Posts:
- 72
- Downloads:
- 23
- Uploads:
- 30
- Thanks:
- 9
- Thanked:
- 1 times in 1 posts
December 22, 2015 at 1:40 am #828065Brilliant! Thanks for your help!
rwlfr Friendrwlfr
- Join date:
- February 2015
- Posts:
- 44
- Downloads:
- 40
- Uploads:
- 5
- Thanked:
- 2 times in 2 posts
January 10, 2016 at 10:23 pm #843198I’m sorry it doesn’t work for me (I’m using the Magz II template)
Can you confirm the file is this one :
templates/ja_magz_ii/Helper.phpWhen I change the code, I get this error :
Parse error: syntax error, unexpected ‘return’ (T_RETURN), expecting function (T_FUNCTION)Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
January 11, 2016 at 2:04 am #843549Hi
it looks like php lib on your localhost (server) is missing
php lib return function does not exist . Enable it . the file is correct and its working fine for us and users as u can see in this thread.January 18, 2016 at 2:21 pm #851781Hi Pankaj Charman,
This code didn’t work for me either, when I make the change it broke the page, can you please help me with it, couse I really need to do it.
Thanks,
Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
January 19, 2016 at 2:04 pm #854765Hi Pankaj,
Here is the result of my pages after I paste the code you share above.And I don’t know how to enable the php lib, in my server, if you tell me I’ll try.
Thanks for your help.
-
Pankaj Sharma Moderator
Pankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
January 20, 2016 at 2:44 am #860193Hi victoradrian
I do not see the error on your site , Could u make the site live and share the details via Private reply , so i can check it .January 20, 2016 at 2:10 pm #863282This reply has been marked as private.Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
January 21, 2016 at 2:12 am #863872Hi victoradrian
My account does not have permission to check the issue on your site . Kindly upgrade the user account to super user access .January 21, 2016 at 11:20 pm #864967This reply has been marked as private.Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
January 22, 2016 at 2:32 am #865028Hi
Victor.
I fixed it directly on your site , Kindly check ,date format is changed now .1 user says Thank You to Pankaj Sharma for this useful post
January 22, 2016 at 3:19 pm #865446This reply has been marked as private.Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
January 22, 2016 at 3:49 pm #865484Hi
Victor could share url where and how i can check this code on your site ?Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
January 22, 2016 at 3:51 pm #865487Hi
Glad to hear you sorted it out .
If you have any doubt and question in future do -
AuthorPosts
This topic contains 22 replies, has 5 voices, and was last updated by noticiascelta 8 years, 8 months ago.
The topic ‘How to change the date format’ is closed to new replies.
Jump to forum