- Posts: 12
- Thank you received: 0
Display different event info in mod_eb_events
- htown
- Topic Author
- Offline
- New Member
-
Less
More
12 years 10 months ago #16688
by htown
Display different event info in mod_eb_events was created by htown
By default the upcoming events module looks displays the event with date and time on one line. I want date on one line and start and stop time on another. Can someone help me with the code I need to change in modules>mod_eb_events>tmpl>default.php to get this result please?
many thanks,
Houston
many thanks,
Houston
- Tuan Pham Ngoc
- Offline
- Administrator
-
12 years 10 months ago #16723
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Display different event info in mod_eb_events
Hi Houston
To do this modification, you will need to know Joomla, PHP programming. If not, then you will need to find someone to help you. The steps are :
1. Open the file modules/mod_eb_events/mod_eb_events.php, find the code below :
2. Change it to :
3. In the file modules/mod_eb_events/tmpl/default.php, you can use the code below to display event end date :
PS : Code modification is not in scope of support, so if you want to do other modifications, maybe you will need to find someone to help you. We might not be able to support you with other modifications (if needed).
Regards,
Tuan
To do this modification, you will need to know Joomla, PHP programming. If not, then you will need to find someone to help you. The steps are :
1. Open the file modules/mod_eb_events/mod_eb_events.php, find the code below :
Code:
$sql = 'SELECT a.id, a.event_capacity, a.title, a.location_id, a.event_date, IFNULL(SUM(b.number_registrants), 0) AS total_registrants, c.name AS location_name FROM #__eb_events AS a '
. ' LEFT JOIN #__eb_registrants as b '
. ' ON (a.id = b.event_id AND b.group_id=0 AND (b.published = 1 OR (b.payment_method LIKE "os_offline%" AND b.published != 2))) '
. ' LEFT JOIN #__eb_locations AS c '
. ' ON a.location_id = c.id '
. ' WHERE '.implode(' AND ', $where)
. ' GROUP BY a.id '
. ' HAVING (a.event_capacity = 0 OR (total_registrants < a.event_capacity)) '
. ' ORDER BY a.event_date '
. ' LIMIT '.$numberEvents
;
2. Change it to :
Code:
$sql = 'SELECT a.id, a.event_capacity, a.title, a.location_id, a.event_date, a.event_end_date, IFNULL(SUM(b.number_registrants), 0) AS total_registrants, c.name AS location_name FROM #__eb_events AS a '
. ' LEFT JOIN #__eb_registrants as b '
. ' ON (a.id = b.event_id AND b.group_id=0 AND (b.published = 1 OR (b.payment_method LIKE "os_offline%" AND b.published != 2))) '
. ' LEFT JOIN #__eb_locations AS c '
. ' ON a.location_id = c.id '
. ' WHERE '.implode(' AND ', $where)
. ' GROUP BY a.id '
. ' HAVING (a.event_capacity = 0 OR (total_registrants < a.event_capacity)) '
. ' ORDER BY a.event_date '
. ' LIMIT '.$numberEvents
;
3. In the file modules/mod_eb_events/tmpl/default.php, you can use the code below to display event end date :
Code:
<?php echo JHTML::_('date', $row->event_end_date, $config->event_date_format, $format); ?>
PS : Code modification is not in scope of support, so if you want to do other modifications, maybe you will need to find someone to help you. We might not be able to support you with other modifications (if needed).
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- htown
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 12
- Thank you received: 0
12 years 10 months ago - 12 years 10 months ago #16734
by htown
Replied by htown on topic Re: Display different event info in mod_eb_events
I certainly appreciate you going above the call of duty here. The support here is wonderful.
I wonder why, what appears to be simple requests, require one to go and do code modifications in order to get the desired info to display in a specific format. There is other software out there that offers place holders to give the plugin this type of flexibility. Your does not seem to offer this but does offer other modifications to be done quite simply. Putting a start and end time for an event seems quite basic and expected. Why would this not be an option in the first place? Hence the request.
In my original trouble ticket you said I would need to ask for help, I was asking for help here in the forum expecting that someone else has had to ask for this in the past. I realize that code modification is not part of support but appreciate you help here in this matter.
However, the code above did not work, it made no difference.
I wonder why, what appears to be simple requests, require one to go and do code modifications in order to get the desired info to display in a specific format. There is other software out there that offers place holders to give the plugin this type of flexibility. Your does not seem to offer this but does offer other modifications to be done quite simply. Putting a start and end time for an event seems quite basic and expected. Why would this not be an option in the first place? Hence the request.
In my original trouble ticket you said I would need to ask for help, I was asking for help here in the forum expecting that someone else has had to ask for this in the past. I realize that code modification is not part of support but appreciate you help here in this matter.
However, the code above did not work, it made no difference.
Last edit: 12 years 10 months ago by htown.
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.