NSP GK5 - DATE and YEAR instead DAY and DATE

May 2014 Joomla Template
GK User
Thu Dec 11, 2014 3:04 pm
Hi,
I'd like to view DATE and YEAR in the "Latest event" area and in the "Category view" instead of DAY and DATE (see attached screenshot).

Is it possible?


Best regards
luca grillo
User avatar
Junior Boarder

teitbite
Sat Dec 13, 2014 12:06 pm
Hi

Please edit line 66 in file /modules/mod_news_pro_gk5/tmpl/portal_modes/events_list/controller.php to:

Code: Select all
               $event_info['date'] = JHTML::date($event_timestamp_sql, 'M j') . '<small>' . JHTML::date($event_timestamp_sql, 'Y') . '</small>';
User avatar
Moderator

GK User
Mon Dec 15, 2014 11:13 am
Hi,
it works great, thanks a lot!

BUT... is it possible to do the same in the K2-category-view ( see my demo: http://grillo.bz.it/atesina/index.php/e ... -regionale )?

I tried to find and replace the code $event_info['date'] in various php-files (like category_item.php) but it doesn't work.

Any suggestions?

Best regards
luca grillo
User avatar
Junior Boarder

teitbite
Mon Dec 15, 2014 7:45 pm
Hi

Try to look in file /html/com_k2/templates/default/item.php at line 159 there will be a line:

Code: Select all
          <?php echo JHTML::_('date', $this->item->created, 'D j M, Y'); ?>


here is a manual about how to use this: http://php.net/manual/pl/function.date.php
User avatar
Moderator

GK User
Tue Dec 16, 2014 8:54 am
Thanks for helping!
I'll try :)

luca
User avatar
Junior Boarder

GK User
Tue Dec 16, 2014 9:09 am
Done!
Thanks for the precious help

luca
User avatar
Junior Boarder

teitbite
Fri Dec 19, 2014 10:54 am
Hi

No problem. Glad I could help :)
User avatar
Moderator


cron