Layouts customization

  • Mike
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 10 months ago #86228 by Mike
Replied by Mike on topic Layouts customization
I continue to edit the timeline template. I've tried the DB query that you gave me - it works fine, but I think that the code could be better if that DB query will be placed as an attribute for $event. Unfortunately, I can't find the file where $event attributes are described.
Is there any way to make attribute 'city' for $event?

And how can I get category and subcategory names and links for $event in timeline.php?

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

More
8 years 10 months ago #86276 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Layouts customization
Hi Mike

In the new version 2.10.0 which I just released, it is easier to access to the data without having to write $query in the layout. Basically, you can use the following variables:

$event->categories contains all categories of the event

$event->location contains location data, so you can get location city using $event->location->city, $event->location->state

For full change logs, please see joomdonation.com/forum/events-booking-ge...-released.html#86272

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 #86283 by Mike
Replied by Mike on topic Layouts customization
Super! Thanks a lot!

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 #86287 by Mike
Replied by Mike on topic Layouts customization
And one more thing...
I've added some language constants for the template - e.g. discount alert "Discout now!" etc. Is it possible to move it to separate file for I could save it in case of EB upgrade without text editing of *.com_eventbooking.ini?

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

More
8 years 10 months ago #86288 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Layouts customization
Hi Mike

Any new languages items you added should still be there after the update. So you should not have to worry about it

But to be safe, you should make a backup of that file before upgrading as well

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 - 8 years 10 months ago #86293 by Mike
Replied by Mike on topic Layouts customization
After upgrade to 2.10
Timeline layout:
Code:
<?php echo $event->categories; ?>
prints only word 'Array'
Last edit: 8 years 10 months ago by Mike.

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 #86298 by Mike
Replied by Mike on topic Layouts customization

Tuan Pham Ngoc wrote: Hi Mike
Any new languages items you added should still be there after the update. So you should not have to worry about it

Unfortunately even Translation editing from backend of EB usually kills all my added language constants.
Of course I use backup file, but it's not effective to manually restore it every time :(

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

More
8 years 10 months ago #86309 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Layouts customization
Oh, maybe something with permission of language file and it causes the issue (not how the extension is designed to work)

Could you please help changing permission of the language file to 777 and change it again first ?

And in case you want to be safe, you can use Joomla language override docs.joomla.org/J3.x:Language_Overrides_in_Joomla

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 #86324 by Mike
Replied by Mike on topic Layouts customization
No, the problem is not in permissions.
I mean - I add some new entries by editing the language file manually with text editor and upload it by FTP.. It works.
After it I go to EB Backend/Translation, chose my language... and even if I don't make any changes and exit by 'cancel' button - all my additional entries are lost after it.
Unfortunately, that's how it works.

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 #86326 by Mike
Replied by Mike on topic Layouts customization

Tuan Pham Ngoc wrote: And in case you want to be safe, you can use Joomla language override

It should help. Thanks, I'll use it.
But you need to fix this issue - it's abnormal.

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

Moderators: Tuan Pham Ngoc