How to use the JEM Embed Plugin

1. What does this plugin do?

The JEM Embed plugin allows you to get JEM events as structured data (JSON). This makes it possible to show JEM events on other websites that are not running Joomla.

The data from the events are provided through a special URL. By adding parameters to this URL, you can control which events are returned and how they are displayed.

To configure the output from the source site see on this help page section 2–6, to embed the events on an other web site, see section 7.


2. Basic Usage

JEM Embed works by calling a special Joomla URL. When you open this URL, Joomla returns a list of events instead of a normal webpage.

The base URL (mandatory):

https://domain.com/index.php?option=com_ajax&plugin=jemembed&group=content&format=json

You can add more parameters to this URL to filter events or change the output.


3. Example with Parameters

To the base URL can be added: 1) the security token (see section 4), 2) various optional paramters (see section 5).
https://domain.com/index.php?option=com_ajax&plugin=jemembed&group=content&format=json
&token=YOUR_SECURITY_TOKEN 
&max=10
&venueids=1,2
&category=2,3,5
results in:
https://domain.com/index.php?option=com_ajax&plugin=jemembed&group=content&format=json&token=YOUR_SECURITY_TOKEN&max=10&venueids=1,2&category=2,3,5

When multiple parameters are used, only events that match all conditions will be returned.


4. Security Token

To protect your data, access to the events is secured with a token.

&token=YOUR_SECURITY_TOKEN

Requests without a valid token will not work.


5. URL Parameters

5.1 Which events should be returned?

Parameter Meaning
type=today Events happening today
type=unfinished Ongoing and upcoming events
type=upcoming Only future events
type=archived Past (archived) events
type=newest Newest events
featured=on Only featured events
featured=off Exclude featured events
featured=only Show only featured events

5.2 What information should be shown?

Parameter Options
title on | link | off
date on | link | off
time on | off
enddatetime on | off
category on | link | off
venue on | link | off

5.3 Filter by category or venue

Parameter Description
catids=1,2,3 Only events from these categories
venueids=1,2 Only events from these venues

5.4 Limits and text options

Parameter Description
max=n Maximum number of events
cuttitle=n Maximum length of the event title
noeventsmsg=text Message shown if no events are found

6. Parameter Notes


7. Showing events on another website

Step 1: Download the files

Download and extract jemevents.zip

It contains:

Step 2: Upload the files

Upload these files to the external website:

Step 3: Configure jemevents.php

Open jemevents.php and set:

Step 4: Include the JavaScript file

Add this line before </body>:

<script src="/jemevents.js"></script>

Step 5: Add the event container

Place this where the events should appear:

<div id="jemevents-container"></div>

The events will be loaded automatically.


8. Final Notes