- Posts: 208
- Thank you received: 1
How to show past event as a table?
- Tim Stöhr
- Topic Author
- Offline
- Elite Member
-
Less
More
9 years 7 months ago #70657
by Tim Stöhr
How to show past event as a table? was created by Tim Stöhr
Hi Tuan,
For advertisement purposes, I would like to show past events in a menu classified according to date. How can I do that?
Thanks
tim
For advertisement purposes, I would like to show past events in a menu classified according to date. How can I do that?
Thanks
tim
Please Log in or Create an account to join the conversation.
- James Riley
-
- Offline
- Platinum Member
-
9 years 7 months ago #70671
by James Riley
James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.
Replied by James Riley on topic How to show past event as a table?
I was pondering this just last week, but thinking a link at the bottom of the category for "see past events", sort of like Facebook does for events.
I know there is a global option for showing past events, but is there any sort of POST variable that would allow showing past events? I haven't had time to look into the code to see if there was anything, but I feel it would be easy for me to code in if not there. However, that be be another custom mod to maintain, and I already have several...
I know there is a global option for showing past events, but is there any sort of POST variable that would allow showing past events? I haven't had time to look into the code to see if there was anything, but I feel it would be easy for me to code in if not there. However, that be be another custom mod to maintain, and I already have several...
James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.
The following user(s) said Thank You: Tim Stöhr
Please Log in or Create an account to join the conversation.
- James Riley
-
- Offline
- Platinum Member
-
9 years 7 months ago - 9 years 7 months ago #70674
by James Riley
James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.
Replied by James Riley on topic How to show past event as a table?
I did some menu & code digging, and it looks like this is already built in 
You can display ALL past events in oldest-first chronological order using the Events Archive Default (or Table) menu types. I'm not sure if there is a way to reverse the order to show most-recent-first... @Tuan???
If you are writing your own url, use the following as a guide. With some playing around, I found out how to control the CATEGORY that the archive displays... :woohoo:

You can display ALL past events in oldest-first chronological order using the Events Archive Default (or Table) menu types. I'm not sure if there is a way to reverse the order to show most-recent-first... @Tuan???
If you are writing your own url, use the following as a guide. With some playing around, I found out how to control the CATEGORY that the archive displays... :woohoo:
- ?option=com_eventbooking&view=archive -- show ALL past events in default view
- ?option=com_eventbooking&view=archive&layout=table -- show ALL past events in table view
- ?option=com_eventbooking&view=archive&id=2 -- show ALL past events from event category 2 (change to whatever category you want to show) in default view
- ?option=com_eventbooking&view=archive&layout=table&id=2 -- show ALL past events from event category 2 (change to whatever category you want to show) in table view
James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.
Last edit: 9 years 7 months ago by James Riley.
Please Log in or Create an account to join the conversation.
- James Riley
-
- Offline
- Platinum Member
-
9 years 7 months ago - 9 years 7 months ago #70675
by James Riley
James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.
Replied by James Riley on topic How to show past event as a table?
Or if you are using SEO friendly urls, you can append to the url as follows
And, from what I've found so far, it you want to reverse the sort order to show reverse dates (or to sort by something else entirely), you might have to modify code...
In components/com_eventbooking/model/list.php , search for if ($name == 'archive') and modify code as follows:

- eg: www.yoursite.com/event-list/seo-friendly-url/ ?view=archive&layout=table
And, from what I've found so far, it you want to reverse the sort order to show reverse dates (or to sort by something else entirely), you might have to modify code...
In components/com_eventbooking/model/list.php , search for if ($name == 'archive') and modify code as follows:
Code:
if ($name == 'archive')
{
$query->where('DATE(tbl.event_date) < CURDATE()');
$query->order('tbl.event_date DESC'); /* <-- ADD THIS LINE */
// ADD ABOVE LINE to list in reverse date order (newest first).
// To sort by a different column, replace "event_date" with the
// column of your choosing, plus ASC or DESC for order.
}
James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.
Last edit: 9 years 7 months ago by James Riley.
The following user(s) said Thank You: Tim Stöhr
Please Log in or Create an account to join the conversation.
- Tim Stöhr
- Topic Author
- Offline
- Elite Member
-
Less
More
- Posts: 208
- Thank you received: 1
9 years 7 months ago #70728
by Tim Stöhr
Replied by Tim Stöhr on topic How to show past event as a table?
Found an even easier idea for displaying the past events... Instead of re-writing URLs you can do that already in Joomla. You can choose table or default layout as well as which category. I will have to "hack" the code for event date sorting though. Thanks for your help James!
Please Log in or Create an account to join the conversation.
- Tim Stöhr
- Topic Author
- Offline
- Elite Member
-
Less
More
- Posts: 208
- Thank you received: 1
9 years 7 months ago #70729
by Tim Stöhr
Replied by Tim Stöhr on topic How to show past event as a table?
Tuan: the past events shows the Individual price without VAT... Any possibility to quickly change this so that it shows the price with VAT? (in Europe, it is custom to show VAT as well. Without VAT, most people will not understand it)
Please Log in or Create an account to join the conversation.
- James Riley
-
- Offline
- Platinum Member
-
9 years 6 months ago - 9 years 6 months ago #71095
by James Riley
James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.
Replied by James Riley on topic How to show past event as a table?
Here's what I did to add a "View Past Events" button to the bottom of category view:
The result:
Code:
---------------------------------------
custom.css
---------------------------------------
.btn-time:before {
content:"\f017" !important;
font-size:1.5em;
padding: 0px 0.5em !important;
font-family:fontAwesome;
}
---------------------------------------
view/category/tmlp/default.php
---------------------------------------
// at very bottom, just [b]before [/b]the final </div>, added:
if ($_ SERVER['QUERY_STRING']) // remove the space between $_ and SERVER... forum is blocking my post without it :(
$archiveUrl = '?'.$_ SERVER['QUERY_STRING'].'&view=archive&layout=table&id='.$this->category->id;
else
$archiveUrl = '?option=com_eventbooking&view=archive&layout=table&id='.$this->category->id;
echo '<div class="ebjr_viewPastEvents btn btn-primary btn-time"><a href="'.$archiveUrl.'">View past <strong>'.$pageHeading.'</strong> events.</a></div>'
James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.
Attachments:
Last edit: 9 years 6 months ago by James Riley.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
9 years 6 months ago #71110
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic How to show past event as a table?
@Tim: Could you go to Events Booking -> Configuration, find the config option Show Price Including Tax, set it to Yes.
It should solve your issue.
Tuan
It should solve your issue.
Tuan
The following user(s) said Thank You: Tim Stöhr
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.