Sort Events by Date
- Tuan Pham Ngoc
- Topic Author
- Offline
- Administrator
-
This question was asked by a customer via support ticket system. I posted it here in case you need it, you can modify it to meet your requirement :
I have a few questions as to how I can complete the following:
- How can I display my events in date order using the event start date, with the soonest event showing first ?
- How can I hide the 'Individual Price' if the price is not entered or set to zero.
- Which css do I need to modify in order to change the button hyperlink text color?
Here are my answers for the above questions :
- How can I display my events in date order using the event start date, with the soonest event showing first ?
=> By default, events are ordered by ordering which you setup in events management of Event Booking. To make it odered by event date, you need to modify one line of code. Please open the file components/com_eventbooking/models/category.php, look at line 133, change the code from :
To :
- How can I hide the 'Individual Price' if the price is not entered or set to zero.
=> Please open the file components/com_eventbooking/views/event/tmpl/default.php, look at the lines of code from line 100 to line 112 :
(Attached is the modified file, you can simply get it and upload to your site) .
- Which css do I need to modify in order to change the button hyperlink text color?
=> The css file is components/com_eventbooking/assets/css/style.css. The css code for the button is from line 183 to line 227.
Hope this help .
Regards,
Tuan
Attachment default-20101122.zip not found
- Tuan Pham Ngoc
- Topic Author
- Offline
- Administrator
-
In the latest releases of Event Booking, there is a config option in configuration area of the extension which allows you to sort events by date or by ordering. You can change it by going to Configuration -> Event Booking, look at Themes tab, find the config option and change it to the ordering type you want .
Thanks,
Tuan
Please Log in or Create an account to join the conversation.
- socoweb
- Offline
- New Member
-
- Posts: 3
- Thank you received: 1
- How can I display my events in date order using the event start date, with the soonest event showing first ?
=> By default, events are ordered by ordering which you setup in events management of Event Booking. To make it odered by event date, you need to modify one line of code. Please open the file components/com_eventbooking/models/category.php, look at line 133, change the code from :
To :
To change the date display / sort order, line 192 can be changed to
$orderby = ' ORDER BY a.event_date DESC';
which sorts the table by date descending
and with the backend Configuration:themes: Order Events By: Event Date setting
it creates a date descending table, with current events at top
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Topic Author
- Offline
- Administrator
-
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- lukashajek
- Offline
- Junior Member
-
- Posts: 30
- Thank you received: 0
this is not working for me. I have this choice selected, but its not working. example .
It is working in component, but not in content plugin.
Thank you for a hint. Lukas
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Topic Author
- Offline
- Administrator
-
What content plugin you are talking about ? I believe there is no content plugin to show list of events in the package ?
Tuan
Please Log in or Create an account to join the conversation.
- lukashajek
- Offline
- Junior Member
-
- Posts: 30
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Topic Author
- Offline
- Administrator
-
Here is the updated plugin which use the setting in configuration area of Event Booking to sort event (it sorts events by title before). Please make sure you backup the site (or the plugin) before install this new version (I haven't tested this new version yet but It should work).
Tuan
Please Log in or Create an account to join the conversation.
- lukashajek
- Offline
- Junior Member
-
- Posts: 30
- Thank you received: 0
did you forget to attach the file, or am I looking wrong?
Thank you
Lukas
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Topic Author
- Offline
- Administrator
-
Sorry. It seems I forgot to upload file. Please get it here .
Tuan
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
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.