-
AuthorPosts
-
palos Friend
palos
- Join date:
- January 2013
- Posts:
- 369
- Downloads:
- 37
- Uploads:
- 8
- Thanks:
- 125
- Thanked:
- 27 times in 7 posts
March 20, 2014 at 10:57 pm #195999e.g. JA News Pro Module and others follow nice the translated date format but JA News Featured
– forget the dot after the number of day,
– forget the name of the day,
– but put a leading zero to the one-digit days what is not right here… or I just do not need it.Where is it hardcoded?
I found a lot of folders and files in …/modules/mod_janews_featured but none of them contains a date or a createdate string. (or just I do not find them)I need 2014. March 7. Friday but it displays 2014. March 07
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
March 21, 2014 at 11:59 am #527637You can find and change the date format of JA News Featured in the templates/your_nex_template/html/mod_janews_featured/nex/blog.php file. You can edit this code:
<span class="createdate">
<?php echo JHTML::_('date', $news->created, JText::_('DATE_FORMAT_LC3')); ?>
</span>With DATE_FORMAT_LC3=”d F Y”
You can change to format: 2014. March 7. Friday
1 user says Thank You to Ninja Lead for this useful post
palos Friendpalos
- Join date:
- January 2013
- Posts:
- 369
- Downloads:
- 37
- Uploads:
- 8
- Thanks:
- 125
- Thanked:
- 27 times in 7 posts
March 25, 2014 at 11:24 pm #528140Thank you, Ninja Lead!
It is in the line 155 and we should change it like below if we need the format I mentioned above
<?php echo JHTML::_('date', $news->created, JText::_('Y. F j. l')); ?>
There is also a line at 257 what is responsible for the three normal (not featured) article’s date format:
<?php echo JHTML::_('date', $news->created, JText::_('Y. F j.')); ?>
Just cancelled using the full textual representation of the day of the week here as it would be too long…
And used “j” what shows the Day of the month without leading zeros
Some help hereIt is still odd for me that there are many of your module offer these settings at their backend. But not all.
The worst that we have already the J3.2.3 and it is still facing this kind of issues what should have been solved almost nine years ago.Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
March 26, 2014 at 9:45 am #528214If you want to sort day of the week, please try solution below:
<?php
$day_of_week = array('', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat','Sun');
echo JHTML::_('date', $news->created, JText::_('Y. F j.'))." ". $day_of_week[JHTML::_('date', $news->created, JText::_('N'))];
?>It should display: 2011. DECEMBER 10. SAT
Let me know if it helps.
-
AuthorPosts
This topic contains 4 replies, has 2 voices, and was last updated by Ninja Lead 10 years, 8 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum