Move "Details" button below event description

More
6 years 11 months ago #99131 by Tess
Hello-
I was wondering if you could tell me how, where and what to move to make the Details button appear directly below the short description of the event?
I've created a language override to make the button say "Read More" but cannot find the code in my template override (events_timeline.php) so that I can move it. It seems to be joined to the Register (now Buy Tickets) button and I'd like to separate them. Hopefully my screenshot will better explain my goal :)

thanks!
T
Attachments:

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

More
6 years 11 months ago - 6 years 11 months ago #99137 by James Riley
Replied by James Riley on topic Move "Details" button below event description
Found the code :) Here's my workflow (this is often the way I find where code is located in EB or other Joomla extensions).

In this case:
1) I filtered EB -> Translation for the word "Details" (in your case, you'd filter for "read more") and discovered that "EB_DETAILS" is the key for that text.
2) Doing a code search for "EB_DETAILS" on all files in /components/com_eventbooking/view , we find that "EB_DETAILS" appears in 4 different files, corresponding to different layout styles (archive, and column, default and timeline views).


You've already found the right file with your override of events_timeline.php... just look for the "EB_DETAILS" line within that file and move accordingly.

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

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

More
6 years 11 months ago #99142 by Tess
James-
Thank you! That worked, I now have my link where I want it. However, I still have it in the original spot too. When I try to delete the EB_DETAIL part of the code the page won't render.

Here's the line I'm referring to:
<a class="<?php echo $btnClass; ?> btn-primary" href="<?php echo $detailUrl; ?>">
<?php echo $isMultipleDate ? JText::_('EB_CHOOSE_DATE_LOCATION') : JText::_('EB_DETAILS'); ?>

I thought I could just remove the :JText::_('EB_DETAILS'); part and be okay, but I guess not. Do you have any guidance for a non-php person?

Many thanks,
Tess

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

More
6 years 10 months ago #99152 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Move "Details" button below event description
Go to Events Booking -> Configuration, look at Themes tab, find the config option Hide Detail Button , set it to Yes and the button will be hided

Simple like that :)

Tuan
The following user(s) said Thank You: Tess

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

More
6 years 10 months ago #99158 by James Riley
Replied by James Riley on topic Move "Details" button below event description
Follow Tuan's instructions, or if you want to modify it in code, you'll need to replace the JText::_(' EB_DETAILS') with '' (2 single quotes, or "" 2 double quotes). The reason why it was crashing was because we're dealing with a shorthand "if" statement here, which likes to have have both the true and false actions defined. The shorthand if is structured as:
Code:
evaluated_condition ? true_action : false_action ;
and you were leaving part of the statement undefined. Make sure you leave the ; at the end, or that will break the statement too.

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

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

More
6 years 10 months ago #99247 by Tess
James-
Thanks for the code and explanation — that's very helpful. In the end I did use Tuan's instructions, since it just hid the button and not my new link. However, I'm filing your instructions for future use.

Thanks again to you both!
Tess

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

Moderators: Tuan Pham Ngoc