Upcoming Events Module: Add Event Time

  • Siterelish LRM
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 2 months ago #92929 by Siterelish LRM
Upcoming Events Module: Add Event Time was created by Siterelish LRM
I believe another site is using Events Booking and we like the way the data is structured in the Upcoming Events module (see attached image). I know we could tweak the template file for the module to look the same and I found the template file, but am a bit lost.

Can someone help us out with the lines of code we need to insert to include the time of the event and the city, state and country of the event? (NOTE: We want to leave the Month and day block the same irregardless of what is done in the example image).

Thanks!
Attachments:

Please Log in or Create an account to join the conversation.

More
7 years 2 months ago #92934 by James Riley
Replied by James Riley on topic Upcoming Events Module: Add Event Time
I tracked down the site that you took the screenshot from (thank you Google!), and it turns out that it is actually a WordPress site running The Events Calendar by Modern Tribe, and not EventBooking.

HOWEVER...
It should be possible to more-or-less obtain that look. When you set up your Upcoming Events module, use the "improved" layout (not "defautl" layout) in order to get the date box on the right side, and set the Show Location option to Yes, and Show Category/Thumbnail options to No. Then write the needed CSS to style the module and implement via [EventBooking -> Configuration -> Custom CSS tab ]

If you want to also include the date information as a line of text (as shown in your sample), you will have to edit/override the template file at /modules/mod_eb_events/tmpl/improved.php to add this. You can likely copy and paste the date code from default.php, as I'm pretty sure it shows the date as a line of text.

For info on how to create an override, see docs.joomla.org/J3.x:How_to_use_the_Temp...r#Creating_Overrides (using the built-in Template Manage - Override funtion) or docs.joomla.org/How_to_override_the_outp...rom_the_Joomla!_core (manually create an override).

So that's WHAT to do... just not exactly HOW to do it. Hopefully it is enough to get you started though :)

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 :.

Please Log in or Create an account to join the conversation.

  • Siterelish LRM
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 2 months ago #92938 by Siterelish LRM
Replied by Siterelish LRM on topic Upcoming Events Module: Add Event Time
I'm so sorry that I wasn't more specific. We are already using the Improved layout for the module. My apologies!

And yes, I have some PHP coding experience, but needed the exact template file as I believe I was looking in the wrong place.

I'll let you know how we make out :)

Please Log in or Create an account to join the conversation.

  • Siterelish LRM
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 2 months ago #92939 by Siterelish LRM
Replied by Siterelish LRM on topic Upcoming Events Module: Add Event Time
The only thing I'm unclear about at the moment is what folder the custom template goes in. I double checked in the documentation ( eventbookingdoc.joomservices.com/develop...ion/customize-layout ) and it references overrides for the event list, event detail, and event registration forms, but not for the upcoming events module. Can you provide the exact path for the folder. Thank you!

Please Log in or Create an account to join the conversation.

More
7 years 2 months ago - 7 years 2 months ago #92940 by James Riley
Replied by James Riley on topic Upcoming Events Module: Add Event Time
/modules/mod_eb_events/tmpl/improved.php
to
/templates/TEMPLATE_NAME/html/mod_eb_events/improved.php [edited: not default.php like I posted originally!!!]

If you need more information, check the official Joomla docs at docs.joomla.org/How_to_override_the_outp...rom_the_Joomla!_core . :)

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: 7 years 2 months ago by James Riley. Reason: indicated in red

Please Log in or Create an account to join the conversation.

More
7 years 2 months ago - 7 years 2 months ago #92941 by James Riley
Replied by James Riley on topic Upcoming Events Module: Add Event Time
Oops -- the destination file should have been "improved.php", and I forgot the /templates/ folder. Silly me...
I have revised my post above :whistle:

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: 7 years 2 months ago by James Riley.

Please Log in or Create an account to join the conversation.

  • Siterelish LRM
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 2 months ago #93003 by Siterelish LRM
Replied by Siterelish LRM on topic Upcoming Events Module: Add Event Time
Not to worry James! Thank you for the information. I will attempt to make the edits. Wish me luck! I'll post my results to this post when I'm done :)

Please Log in or Create an account to join the conversation.

More
7 years 2 months ago - 7 years 2 months ago #93016 by James Riley
Replied by James Riley on topic Upcoming Events Module: Add Event Time
I liked your layout idea so much that I revised my site to do use this layout :)
1) Copy /modules/mod_eb_events/tmpl/improved.php to /templates/TEMPLATE_NAME/html/mod_eb_events/improved.php (or use the Template Mangers' override feature).
2) Add the following to the file (I changed the class "event_date" -> "to event_date_inline" so that this line wouldn't also take on the properies of the date-in-the-box :
Code:
<!-- ************* (code based on default.php) ************** --> <p><small class="event_date_inline"> <i class="icon-calendar"></i> <?php if ($row->event_date == '2099-12-31 00:00:00') { echo JText::_('EB_TBC'); } else { echo JHtml::_('date', $row->event_date, $config->event_date_format, null); } ?> </small></p> <!-- ************* PASTE IT BEFORE THE EXISTING ************** --> <?php if ($showCategory)
.............

3) And in EB's custom.css file, add the styling you'd like. I used this:
Code:
li.vevent .span9 p {margin:0;} li.vevent .span9 p:first-child {margin:0 0 5px;} li.vevent .event-date {float:left; padding: 0 10px;} li.vevent .span9 {overflow:hidden; padding-right:10px;} li.vevent small.event_date_inline {padding: 4px;} li.vevent small.event_date_inline [class^="icon-"] {font-size: 18px;position: relative;top: 3px;} li.vevent small [class^="icon-"] {display:inline-block; width: 22px !important;}

4) If you want to remove the icons from in front of the line items, add this CSS after the CSS above:
Code:
li.vevent small [class^="icon-"]{display:none;}

Final result:


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: 7 years 2 months ago by James Riley.
The following user(s) said Thank You: Tuan Pham Ngoc

Please Log in or Create an account to join the conversation.

More
7 years 2 months ago #93052 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Upcoming Events Module: Add Event Time
Many thanks James. I like it, too. Will look at it and might steal your work and add it to core download package and make it available for using for all EB customers :)

Tuan

Please Log in or Create an account to join the conversation.

  • Siterelish LRM
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 2 months ago #93059 by Siterelish LRM
Replied by Siterelish LRM on topic Upcoming Events Module: Add Event Time
Awesome! Thank you so much for sharing this James! I had tweaked our custom template after your direction regarding the path for the custom template location and got pretty close to what we wanted.

The only 2 issues that are still on my list was fixing the CSS so that there wasn't such a huge space between each line - I believe your CSS below will help me with that - and adding the "City, State, Country" to the location link. If I can't figure out that last piece (City, State, Country", I submit a support ticket.

In the meantime, I will give your CSS a try. Thanks so much!!!

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc