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.

Event hour on event header

9 years 6 months ago
  • Miran's Avatar
    Topic Author
  • Miran
  • Offline
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 0
Licenses:
JomSocial Active

Hi everyone!

On my J3 website i'm using the latest 411 jomsocial.
What i would like to have is simply the event hour on the event page but also in the event lists. Because if i want to know the event beginning hour, i have to go to the event page and to the event details...

Thank you :)
Regards
Miran

9 years 6 months ago
Licenses:

Hi, Miran.

Copy this file:

ROOT/components/com_community/templates/jomsocial/layouts/events/list.php

to:

ROOT/templates/your-template/html/com_community/layouts/events (if you don't have those folders - feel free to create them)

Then edit file and ad this in line 222:

<?php echo $event->startdate; ?>


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
The following user(s) said Thank You: Miran
9 years 6 months ago
  • Miran's Avatar
    Topic Author
  • Miran
  • Offline
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 0
Licenses:
JomSocial Active

Hi michal!
Thank you for your quick reply!!

I added the line and it works.
Is there a trick to change the way it is displayed:

i have 2015-10-22 20:00:00
i would like to change it to 20h15 for example (hour and minutes)

9 years 6 months ago
Licenses:

HI.

then use this:

echo date("H:i", strtotime($event->startdate));


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
9 years 6 months ago
  • Miran's Avatar
    Topic Author
  • Miran
  • Offline
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 0
Licenses:
JomSocial Active

On line 154
i changed
<div class="joms-focus__date cover">
<span><?php echo CEventHelper::formatStartDate($event, JText::_('M') ); ?></span>
<span><?php echo CEventHelper::formatStartDate($event, JText::_('d') ); ?></span>

to
<div class="joms-focus__date cover">
<span><?php echo CEventHelper::formatStartDate($event, JText::_('M') ); ?></span>
<span><?php echo CEventHelper::formatStartDate($event, JText::_('d') ); ?></span>
<span><?php echo CEventHelper::formatStartDate($event, JText::_('H') ); ?>H<?php echo CEventHelper::formatStartDate($event, JText::_('m') ); ?></span>

and on line 222
i added <?php echo CEventHelper::formatStartDate($event, JText::_('H') ); ?>H<?php echo CEventHelper::formatStartDate($event, JText::_('m') ); ?>


But the minutes are not good : it's weird... i have 11mintes of difference :))

9 years 6 months ago
  • Miran's Avatar
    Topic Author
  • Miran
  • Offline
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 0
Licenses:
JomSocial Active

it works!! Thank you Michal

But now i have a script error:
yayos.fr/media/jui/js/jquery.js:5200

9 years 6 months ago
Licenses:

Hi, Miran.

Please, open new thread for your new issue.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
The following user(s) said Thank You: Miran
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