OSB Table Plugin

The OSB Table Plugin (plg_osbtable) is a Joomla content plugin that lets you embed a fully functional OS Services Booking form directly inside any Joomla article or custom HTML module using a simple shortcode. Instead of sending visitors to a dedicated booking menu item, you can display the booking table in-context — right next to your service descriptions, blog posts, or promotional pages.

Requirements

  • Joomla 4.x / 5.x
  • OS Services Booking component (com_osservicesbooking) installed and configured

Key Features

  • Simple shortcode syntax — a single {osbtable ...} tag is all you need.
  • Flexible filtering — scope the booking table to a specific service, employee, category, or venue using inline parameters.
  • Full booking flow — the embedded table supports date/time selection, customer information, payment methods, cart mode, and confirmation dialogs exactly as the standard component view does.
  • Captcha support — when captcha is enabled in the component configuration it is automatically applied for guest users.
  • Bootstrap aware — loads Bootstrap CSS/JS only when the component configuration requires it, avoiding conflicts with your template.
  • Works anywhere content plugins run — articles, custom HTML modules (via {loadposition} trick or direct plugin call), third-party page builders that respect Joomla content events.

Activation

  1. Go to Extensions → Plugins in the Joomla administrator.
  2. Search for "OSB Table" (or filter by Type = Content).
  3. Click the plugin name to open it, then set Status to Enabled.
  4. Click Save & Close.

Shortcode Syntax

Place the shortcode anywhere in the article or module body:

{osbtable PARAMETERS}

Parameters are separated by a pipe | character and follow a key:value format:

ParameterKeyDescription
Service ID sid Filter the booking table to show only the specified service. Use the numeric ID found in Services → Edit Service (the ID column in the services list). Omit this parameter to show all available services.
Employee ID eid Pre-select a specific employee/staff member. Use the numeric ID from Employees → Edit Employee. Omit to show all employees.
Category ID cid Limit the display to services belonging to this category. Use the numeric ID from Categories → Edit Category.
Venue ID vid Pre-select a venue/location. Use the numeric ID from Venues → Edit Venue. Omit to allow the customer to choose from all venues.

Examples

Show a booking table for Service ID 1 only:

{osbtable sid:1}

Show a booking table for Service ID 1 delivered by Employee ID 2:

{osbtable sid:1|eid:2}

Show a booking table for Category ID 3, all services in that category:

{osbtable cid:3}

Show a booking table for Service ID 1, Employee ID 2, restricted to Venue ID 4:

{osbtable sid:1|eid:2|vid:4}

Full combination — service, employee, category, and venue all specified:

{osbtable sid:1|eid:2|cid:3|vid:4}

Using the Plugin in Joomla Articles

This is the most common use-case. You can create a dedicated article for a particular service and embed the booking table directly beneath the service description.

Step 1 — Make sure the OSB Table plugin is enabled (see Activation above).

Step 2 — Open the article editor (Content → Articles → Add New Article or edit an existing one).

Step 3 — In the article body, find the location where you want the booking table to appear and type the shortcode. For example:

<p>Book your appointment below:</p>
{osbtable sid:1}

Step 4 — Ensure the Content - OSB Table plugin is listed before other content plugins that might strip unknown tags. You can reorder plugins under Extensions → Plugins by drag-and-drop on the ordering column.

Step 5 — Save the article and view it on the frontend. The {osbtable ...} tag is replaced with the live booking form.

Tip: You can use one shortcode per article. If you need multiple booking forms on the same page, place them in separate articles and use the Joomla article include feature, or use custom HTML modules (see below).

Using the Plugin in Custom HTML Modules

Custom HTML modules are a great way to add the booking table to any module position on your site — sidebars, footers, landing page slots, etc.

Step 1 — In the Joomla administrator go to Extensions → Modules → New.

Step 2 — Choose Custom HTML as the module type.

Step 3 — Give the module a title (e.g., Book Now).

Step 4 — In the module content area, switch to the HTML source view (click the </> or Source button in the editor toolbar) and paste the shortcode:

{osbtable sid:2|eid:3}

Step 5 — In the Advanced tab, make sure the Prepare Content option is set to Yes. This tells Joomla to run content plugins — including the OSB Table plugin — on the module's output.

Step 6 — Assign the module to the desired template position and the pages where it should appear.

Step 7 — Save and view your site. The shortcode is replaced with the booking table wherever the module is displayed.

Note: If your editor (e.g., TinyMCE) strips the curly-brace tag, switch to the plain HTML source editor before inserting the shortcode, or disable the "Clean on save" TinyMCE option for that module.

Practical Applications

Use CaseRecommended ShortcodePlacement
Service landing page (one service) {osbtable sid:1} Article body
Employee profile page {osbtable eid:5} Article body
Category overview page (all services in a category) {osbtable cid:2} Article body
Location/venue specific booking {osbtable vid:3} Article or module
Sidebar "Book Now" widget {osbtable sid:1} Custom HTML module in a sidebar position
Homepage hero booking section {osbtable cid:1} Custom HTML module in a full-width position
Staff-specific booking embedded in a blog post {osbtable sid:2|eid:4} Article body

How It Works (Technical Overview)

The plugin registers a listener for Joomla's onContentPrepare event. When a page is rendered on the frontend, the plugin scans each piece of content for the {osbtable ...} pattern. For every match it:

  1. Loads the OS Services Booking component helpers, class files, and payment plugins.
  2. Parses the inline parameters (sid, eid, cid, vid).
  3. Injects those values into the Joomla input object so the booking component can pick them up.
  4. Calls OsAppscheduleDefault::defaultLayout() to render the booking form HTML.
  5. Appends the modal dialog markup (generateModalPop()) required for cart confirmation messages.
  6. Returns the rendered HTML, replacing the shortcode in the final page output.

The plugin only runs on the site application (frontend); it is skipped entirely in the administrator backend to avoid performance overhead.