Share Locations between users

  • Carsten Jessen
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 4 days ago #60639 by Carsten Jessen
Share Locations between users was created by Carsten Jessen
We are multiple users submitting events on our site. Is there a way to make "locations" independent of user, so that we can share location entries and don't have to create the same location multiple times

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

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
11 years 4 days ago #60646 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Share Locations between users
Hi Carsten

You will need to edit the code a bit to have it working. Please follow the instructions below:

1. Open the file components/com_eventbooking/views/event/view.html.php

2. Find the code below (from line 243 to 250 if you are using Events Booking 1.7.1)
Code:
if ($user->authorise('core.admin', 'com_eventbooking')) { $sql = 'SELECT id, name FROM #__eb_locations WHERE published=1 ORDER BY name'; } else { $sql = 'SELECT id, name FROM #__eb_locations WHERE published=1 AND user_id=' . $user->id . ' ORDER BY name '; }

Change it to:
Code:
$sql = 'SELECT id, name FROM #__eb_locations WHERE published=1 ORDER BY name';

After that, it will work as expected

Tuan
The following user(s) said Thank You: Carsten Jessen

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

Moderators: Tuan Pham Ngoc