Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Adding the year to event date displays

7 years 7 months ago
Licenses:
JomSocial Active GURU Expired

ISSUE SUMMARY:
Hi all, hopefully this is just a really quick tweak - we have a number of events that will be set up quite far in advance, even veering into the next year. Is it possible to change how the date displays (everywhere that the date is displayed), to show the year as well as the day and month?

I can happily style it myself, if need be. I just need it there. :)

Thanks in advance for any help you can offer!

Kind regards,

-- Nathan

7 years 7 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Nathan,

Please provide me the screenshoot for what do you want to achive?

thank you!

7 years 7 months ago
Licenses:
JomSocial Active GURU Expired

Hi Dimas, thanks so much for such a quick reply! :)

I've attached two Photoshopped files of what I was thinking, although I'm happy to be led if you have a better idea of how to display the year in those two contexts.

Kind regards,

-- Nathan

Attachments:
7 years 7 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi,

1. Open this file components/com_community/templates/jomsocial/layouts/events/single.php,

<span><?php echo JText::_( CEventHelper::formatStartDate($event, 'M') ); ?></span>
                    <span><?php echo JText::_( CEventHelper::formatStartDate($event, 'd') ); ?></span>
to :
<span style="font-size:20px"><?php echo JText::_( CEventHelper::formatStartDate($event, 'M') ); ?> <?php echo JText::_( CEventHelper::formatStartDate($event, 'd') ); ?></span>
                    <span><?php echo JText::_( CEventHelper::formatStartDate($event, 'Y') ); ?></span>

2. open this file modules/mod_community_events/tmpl/default.php, find this code :
<span class="month"><?php echo JText::_( CEventHelper::formatStartDate($event, 'M') ); ?></span>
                <span class="date"><?php echo JText::_( CEventHelper::formatStartDate($event, 'd') ); ?></span>

replace to :
<span class="month"><?php echo JText::_( CEventHelper::formatStartDate($event, 'Y') ); ?></span>
                <span class="date" style="font-size:16px"><?php echo JText::_( CEventHelper::formatStartDate($event, 'M') ); ?><br><?php echo JText::_( CEventHelper::formatStartDate($event, 'd') ); ?></span>

cheers!

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW