To implement the sharing of Events, several steps are required, both on the site that is hosting the Event (the server) and on the guest site (the client).
Server
- Create a User record that will control the sharing, typically this will be the webmaster.
- Generate an "API Token" for this user and send it to the webmaster of the Client site.
- Ensure that plugin plg_ra_events is installed and enabled.
- On the "Publishing" tab of any event that you wish to share, set Shared to Yes and optionally set a Share date.
Client
- From the Ramblers Dashboard, create a new record in "API sites". Specify the name of the Server site, its website address and enter the "API Token" from the Server site.
- In the list of Api sites there will be a little blue icon. This makes a call to the Server website to validate the configuration is correct on both sites. Click on this, and check that there is no error reported. If an error is given, you will be able to go no further until it is resolved.
- If there are no shared events on the Server site you will get a warning message, otherwise you will see a diagnostic display of all the fields from the first event. There may well be an error saying that a matching Contact can not be found. Pay particular attention to the value of "contact_name".
- Check that there is a record in your list of contacts that has the same name AND that this contact is linked to a valid profile.
- Unless that is that case, visitors to your site will not be able to send emails to the organiser. If necessary, create a contact, and check that the error message has disappeared.
- The next check is to return to the list of sites and click on the "Refresh" button. This will process all the shared events from the Server site and create equivalent records on your site. Check that no messages are shown for other contacts.
- You could continue to synchronise the two website manually on a regular basis, but is is straightforward to automated the process.
- Ensure that plugin plg_ra_events_cli is installed and enabled. You can then set up a "scheduled task" (aka a cron job) to run every night and refresh the events.
- This job will follow the standard Joomla paradigm "joomla.php ra_events:eventscopy". This scans the table of Api site and processes events from any site that has been configured.
- Statistics about the number ofvdites gound, and the number of events found is logged. The log records can be seen from RA Dashboard > System Reports > Logfile records.
