MINISTRYPLATFORM CUSTOM WIDGET

Mass Intentions — Installation Guide

A public-facing calendar showing only Mass events, colour-coded by intention status: green means no registered participants, so a Mass Intention is available; red means one or more registered participants, so an intention has been reserved. Clicking an event opens a details popup with a button through to the event details page.

This guide assumes you have read Getting Started. It covers only where the Mass Intention calendar differs from the standard path.

Every scheduled Mass, colour-coded so a parishioner can see at a glance which still have an intention available.

Built on the MinistryPlatform Custom Widget framework and the community FullCalendar widget.

What you need before starting

SQL Server Management Studio access to the MinistryPlatform database, edit access to the church website, and the two files that ship with this guide:

  • deploy_MassIntentionCalendar.sql — creates and registers the stored procedure.
  • mass-intention-calendar-embed.html — the entire front end: widget container, scripts, calendar logic, the details popup and all styling including the colour legend.

Check your Mass event type first. The stored procedure identifies Masses by Event Type. On this system the Mass event type is ID 13 — verify yours on the Event Types page in the Platform and adjust the Event_Type_ID = 13 line in the SQL if it differs.

If you do not have a dedicated hosting plan or the required SQL Server skills, reach out to the professional services team for assistance. Normal hourly rates will apply.


Step 1 Run the database script

Open deploy_MassIntentionCalendar.sql in SSMS, confirm you are connected to the MinistryPlatform database and not master — check the database dropdown — and execute it. The script does three things, all required:

  1. Creates the stored procedure dbo.api_custom_MassIntentionCalendar_JSON , which returns Mass events in a date range with a registrant count per event.
  2. Registers the procedure in dp_API_Procedures so the MinistryPlatform API is allowed to call it.
  3. Links the procedure to the Administrators security role in dp_Role_API_Procedures .

Step 3 is easy to miss and the widget will not work without it. The API checks role links, not SQL permissions.

The script ends with three verification queries. All three must return a row — Proc exists , API registered , Role linked. It is safe to re-run the script; it will not create duplicates.


Step 2 Verify the API can reach the procedure

In a browser, open the following, replacing yourchurch with your MP host prefix:

 https://yourchurch.cloudapps.ministryplatform.cloud/sky/api/CustomWidget?storedProcedure=api_custom_MassIntentionCalendar_JSON 

You should see JSON containing your Mass events. If instead you see "Procedure … does not exist or user does not have access to it" , see Troubleshooting below.


Step 3 Add the calendar page to the website

Create a new page and add an HTML embed containing the full contents of mass-intention-calendar-embed.html . Everything an administrator normally touches lives in one place: the MASS_CAL_CONFIG block at the very top of the file. You should not need to hunt through the rest of the code.

Edit these three values:

Setting What it does
congregationIDs Which parish or parishes this page shows. "" for all congregations, "5" for a single parish, or "5,8,12" for a cluster. Use the numeric Congregation_ID values from the Congregations page in the Platform.
dataHost Your MP host prefix — the part of your Platform URL before .ministryplatform.net , for example "catholicdemo" .
eventDetailsPage The page the popup button links to, with everything up to the event ID. The Event_ID is appended automatically.

The block includes commented examples for each. A fourth, more advanced setting, searchMonthsAhead , controls how far the "Find Next Available Mass" button looks ahead; it rarely needs changing.

One deployment can serve a page per parish. Because each page can point at a different congregationIDs value, a single stored procedure can drive a separate page for each parish showing only its own Masses, plus a combined page for a cluster.


Step 4 Test

Open the new page. You should see a month calendar showing only Masses, green and red per the legend, with white bold text on the event chips.

Selecting an open Mass confirms the time and links straight through to the request form.
  • Click a green Mass. The popup should say no intention is scheduled and show a green Request this Mass Intention button.
  • Click a red Mass. The popup should say an intention is scheduled and show a red Event Details button.
  • Both buttons should open the details page in the same window.

Troubleshooting

"Procedure … does not exist or user 'apiuser' does not have access to it."

This message comes from the MinistryPlatform API, not SQL Server, and almost always means a missed registration step rather than a SQL permission problem. Check in order:

  • The procedure exists in the right database and in the dbo schema: SELECT SCHEMA_NAME(schema_id), name FROM sys.procedures WHERE name LIKE 'api_custom%'
  • A row exists in dp_API_Procedures with the exact name, no typos or trailing spaces: SELECT QUOTENAME(Procedure_Name), LEN(Procedure_Name) FROM dp_API_Procedures — expect a length of 37.
  • A row links it to a role in dp_Role_API_Procedures .

The deploy script's verification queries check all three. If all three pass and the API still refuses, see If the script succeeded but the API still doesn't see it in Getting Started.

The page shows only the legend, no calendar.

The widget's data call is failing, so the widget never renders. Open the browser console (F12) and reload — the widget logs its calls when data-debug="true" . Usually this is the API error above, or a wrong dataHost value.

The calendar renders but no events appear.

The procedure filters to approved, web-approved, public-visibility, non-cancelled Masses. Confirm your Mass events have Event Type Mass, are approved for the web, and have Public visibility — or relax those filters in the stored procedure, where they are commented.

A Mass shows green but should be red, or the reverse.

The registrant count includes participation statuses Registered, Attended and Confirmed only. Interested, Cancelled, Abandoned and Awaiting Payment do not count. Adjust the Participation_Status_ID IN (2, 3, 4) line if your parish uses different conventions.

Changes to the API registration don't take effect.

The API may cache its procedure list. Recycle the MinistryPlatform API application pool in IIS — the application under the site at /ministryplatformapi — or wait for the scheduled recycle. Full steps are in Getting Started.


Customization notes

Colours are defined in two places in the embed: the COLOR_AVAILABLE and COLOR_RESERVED constants in the script, which colour the event chips, and the matching hex values in the <style> block, which colour the legend and the popup buttons. Change both to re-theme.

The date window defaults to the visible calendar range. The stored procedure defaults to 60 days out if called with no dates.


MinistryPlatform configuration

Item Requirement
Event Types Verify that you have an Event Type for Mass. Create it if necessary.
Program Verify that you have a program for handling Mass Intention payments, and that your Mass events use it. If you also have MP eGiving, ensure there is a Fund for Mass Intentions linked to the correct program and configured for payment rather than giving.
Online Registration Product Verify that you have one and that the pricing information is correct. Create it if necessary. Your Mass events should use it.
Online Registration Form Verify that you have one and that the questions are appropriate. Create it if necessary. Your Mass events should use it.
ACST powered by Vanco · 800-736-7425 · allsales@acst.com