location sorting in Event Booking
- Tuan Pham Ngoc
- Offline
- Administrator
Less
More
12 years 2 months ago #20492
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: location sorting in Event Booking
Hi Gabriella
Could you please :
1. Share the module you developed (the city module in this case) .
2. Share me the query string which you developed.
I would be happy to add this modification to the core download package .
(right now working on multilingual feature for the extension).
Tuan
Could you please :
1. Share the module you developed (the city module in this case) .
2. Share me the query string which you developed.
I would be happy to add this modification to the core download package .
(right now working on multilingual feature for the extension).
Tuan
Please Log in or Create an account to join the conversation.
- gabree
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
12 years 2 months ago - 12 years 2 months ago #20509
by gabree
Replied by gabree on topic Re: location sorting in Event Booking
Hey, this was hard work, since I am a graphic designer :lol:
I post the file as attachment,
they should install correctly, since I've installed succesfully.
about code in the core application, these are the modification:
location model file:
com_eventbooking/models/location.php
- added in the query, beside c.name, also c.city
- added in the _buildContentWhere:
- added in the getLocation function:
- and changed the sql in the getLocation function this way (even though I'd better search both locationId or location City):
location view files:
com_eventbooking/views/view.html.php
- added at the top of the function:
- and added ath the bottom of the function:
- commented the "setTitle" and placed the city "setTitle":
com_eventbooking/views/tmpl/default.php
(my location template view file is more different than the original, but these are the important modification)
- added in the header php code:
- changed the H1 title this way:
this should be all. hope to have not forget anything
I post the file as attachment,
they should install correctly, since I've installed succesfully.
about code in the core application, these are the modification:
location model file:
com_eventbooking/models/location.php
- added in the query, beside c.name, also c.city
Code:
SELECT a.*, c.city AS city, ...
- added in the _buildContentWhere:
Code:
$locationCity = JRequest::getString('location_city', 0) ;
if ($locationCity) {
$where[] = ' c.city LIKE "' .$locationCity. '"';
}
- added in the getLocation function:
Code:
$locationCity = JRequest::getString('location_city', 0) ;
- and changed the sql in the getLocation function this way (even though I'd better search both locationId or location City):
Code:
//$sql = 'SELECT * FROM #__eb_locations WHERE id='.$locationId;
$sql = 'SELECT * FROM #__eb_locations WHERE city LIKE "'.$locationCity.'"';
location view files:
com_eventbooking/views/view.html.php
- added at the top of the function:
Code:
$city = JRequest::getString('location_city', 0) ;
- and added ath the bottom of the function:
Code:
$this->assignRef('city', $city) ;
- commented the "setTitle" and placed the city "setTitle":
Code:
//$document->setTitle($location->name);
$document->setTitle($city);
com_eventbooking/views/tmpl/default.php
(my location template view file is more different than the original, but these are the important modification)
- added in the header php code:
Code:
$locationCity = $this->location->city;
- changed the H1 title this way:
Code:
<?php echo JText::sprintf('EB_EVENTS_FROM_LOCATION', $this->location->city); ?>
this should be all. hope to have not forget anything
Last edit: 12 years 2 months ago by gabree. Reason: wrong zip
Please Log in or Create an account to join the conversation.
- gabree
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
12 years 2 months ago #20683
by gabree
Replied by gabree on topic Re: location sorting in Event Booking
I've just tried the modification explained with the new release, but it doesn't do the work.
maybe there is something more to change in the new version in order to make it work.
maybe there is something more to change in the new version in order to make it work.
Please Log in or Create an account to join the conversation.
- jacquesl
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
12 years 2 months ago #21189
by jacquesl
Replied by jacquesl on topic Re: location sorting in Event Booking
Hello, Tuan, read post on search city saw the module, i am also interested in the location module search by city , can I share the cost with other request?
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.