Layouts customization

  • Mike
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 3 months ago - 9 years 3 months ago #78518 by Mike
Layouts customization was created by Mike
Need an advice with layouts customization.
1) If I need to display the author of the event in timeline and event details layouts - is it possible to use any of pre-defined variables? Or I'll need to get it directly from SQL data?
2) Is it possible to show custom fields in the top of the event description (It means, not to show them in a table, but to use them in the header near the date and time information)? For example, if I need to display week days for continuous events.
Last edit: 9 years 3 months ago by Mike.

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

  • Mike
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 3 months ago - 9 years 3 months ago #78526 by Mike
Replied by Mike on topic Layouts customization
3) Is it possible to add the google map widget, showing the event venue, to the event description page?
4) Is it possible to show the city from the event venue location?
5) Is it possible to use the city from the event venue location, as the filter in the search form?
Last edit: 9 years 3 months ago by Mike.

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

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
9 years 3 months ago #78547 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Layouts customization
Hi Mike

For all of these items, you will need to edit the code yourself. Look at the file components/com_eventbooking/view/event/tmpl/default.php

For the google map widget (item #3), you can try to find and publish the plugin "Eventbooking - Map plugin". That plugin will show the map of the location below the event description

Regards,

Tuan

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

  • Mike
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 3 months ago #78878 by Mike
Replied by Mike on topic Layouts customization

you will need to edit the code yourself. Look at the file components/com_eventbooking/view/event/tmpl/default.php

This is exactly what I'm trying to do, but I'm not so familiar with php, this is why I need some advice on this stage

For example, custom fields.
there's a code in a components/com_eventbooking/view/event/tmpl/default.php
Code:
foreach($this->paramData as $param) { if ($param['value']) { echo $param['title']; echo $param['value'] ; } }
My custom fields:
Code:
<field name="field_speaker" description="" size="50" label="Speaker" type="text"/> <field name="field_hours" description="" size="50" label="Number Hours" type="text"/>
If I need to display only "field_hours" for this event - what php command am I need to use instead of
Code:
foreach($this->paramData as $param)

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

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
9 years 3 months ago #78920 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Layouts customization
Hi Mike

You can use this code:
Code:
<?php echo $this->paramData['field_hours']['value'] ;?>

That should display the value of field_hours field for the event

Tuan

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

  • Mike
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 3 months ago - 9 years 3 months ago #79107 by Mike
Replied by Mike on topic Layouts customization
Thanks for an advise!

This code In my_template\com_eventbooking\event\default.php shows the Venue City
Code:
$this->location->city
If I use the same string at my_template\com_eventbooking\common\events_timeline.php - it doesn't work
Code:
$event->location->city

And how to get 'created_by' value of the event? Is there any similar command, that could be used for it?
Last edit: 9 years 3 months ago by Mike.

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

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
9 years 3 months ago #79137 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Layouts customization
Hi Mike

The location information is not available via $event object, so you will need to query the database for that information. Try this code and it should work:

$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('*')
->from('#__eb_locations')
->where('id = '. $event->location_id);
$db->setQuery($query);
$rowLocation = $db->loadObject();

echo $rowLocation->city;


For created_by, not sure you want to get id of the user who created that event ? Or you want to get name of that user?

Tuan

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

  • Mike
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 10 months ago #85836 by Mike
Replied by Mike on topic Layouts customization
Thanks for your help and sorry for a long pause from my side.

Where are the default event image thumbnail's sizes defined? I mean reduced thumbnails of an event images - now it's only 120px width, but I need to increase it.

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

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
8 years 10 months ago #85907 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Layouts customization
Go to Events Booking -> Configuration, find the config options Thumbnail width and Thumbnail height, then change the value of these config options to meet your need

Regards,

Tuan

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

  • Mike
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 10 months ago #86227 by Mike
Replied by Mike on topic Layouts customization
I've found my problem cause - I've changed width only, this is why I didn't see an effect. After I've changed both width&height - works fine, thanks.

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

Moderators: Tuan Pham Ngoc