The PTA Volunteer Sign Up Sheets Calendar Display generates a variety of calendar views for the PTA Volunteer Sign Up Sheets plugin. This plugin requires version 1.12.3, or later, of the PTA Volunteer Sign Up Sheets plugin.
This plugin creates a custom post type registered as “volunteer_calendar”, which will show up in your admin menu as “Calendars”. From the Calendars menu, you can add a new calendar, view & edit existing calendars, and set global options for all calendars.
You can have as many calendars as you need, each of which will be their own custom post with their own permalink. Each calendar can show All of your signup sheets, or you can specify one or more specific sheets to show on a specific calendar.
See the sections below for detailed description of all available options, as well as how to further customize the calendar display via templates and custom CSS.
Adding or Editing a Calendar
The main calendar add/edit page is where you define most of the options for a specific calendar.
You must give the calendar a title, which is also used to generate the permalink (if you are using pretty permalinks).
The regular content area allows you to add any specific information/content you want displayed on that calendar page. The content will appear above the calendar (in the default template layout).
The Calendar Settings meta box is where you define all the options for this specific calendar. Options are described below:
- Show which sheets? – This is a multi-select box that allows you to choose one or more specific signup sheets to show on the calendar. The default setting is “All”, which will show all active sheets.
- Fixed Date – This is a month/year picker field that allows you to set a single month to show on the calendar. If this is set, the calendar will ONLY show that month, and will NOT have any navigation arrows for next/prev months. Default setting is blank, which allows your visitors to view any month, with the current month & year being displayed upon initial page load.
- Show Sheet Title? – Checkbox to allow you to set whether or not the sheet/event title is shown above the task/item list for all days where that sheet has any tasks/items to display. If you are using a custom calendar for one specific sheet/event, you may wish to un-check this box to save some space and avoid repeating the title many times.
- Show Sheet Details? – Checking this box will show the sheet/event details (the text area sheet description/content you entered in the main plugin when creating the sheet) within the calendar. When the box is checked, a few more options will appear:
- Show Details with pop-up? – Check this to show the details in a pop-up window instead of trying to fit what could be a lot of content into a limited space on your calendar. The next two options only apply when this option is checked.
- Text for pop-up details link – This allows you to specify the text used for the pop-up details link
- Details title bar text – Allows you to specify the text that shows in the title bar of the pop-up details window.
- Show View Sheet Link? – Checking this will show the “View & Signup” link (text for the link is defined in the main plugin, and can be filtered via custom PHP, or can be changed via the Customizer extension). This link will take the user back to the main plugin page to view that specific sheet. If you don’t want them to leave the calendar page, then you should probably keep this un-checked.
- Show Pop-up Link? – If you check this, then, by default, only the sheet title will be shown in the calendar, and when that is clicked, a dialog box will open to show the details (all of the things you have chosen to show) for that specific sheet and specific date. Checking this reveals one more option, below:
- Event title bar text – Allows you to define the text in the title bar for the event details pop-up box
- Show Task Title? – This is checked by default to show the task/item title. If you have only one task/item for a sheet/event, or even a whole calendar, you could un-check this to hide the titles.
- Show Task Times? – Check this to show task start and end times (only when they exist) on the calendar.
- Show Task Signups Name List? – This will show the full list of signups for a task item. If you have the main plugin set to show signup names, then this will show the first name and last initial. If you don’t have it set to show names, then it will show “Filled” (the text can be filtered by custom PHP functions, or changed with the Customizer extension). If the volunteer is logged in to the same account they used when they signed up, then they will see their name for any tasks/items they signed up for, even if you have the main plugin set to hide names (all other volunteer signups will still show as “Filled”). Checking this option reveals one more setting:
- Show Signup Clear Link? – Checking this will show a “Clear” link next to the signups, if certain conditions are met. Admin and signup sheet managers will always see clear links, so that they can clear any signup quickly from the calendar view. Volunteers must be logged into the same account they used to sign-up, and then they will see a clear link for their own signups (not for anyone else), but only if you have the main plugin set to allow clear links for that sheet, and they are not within the number of days you set to allow clearing. When a clear link is clicked, the signup will be cleared via an Ajax function, and a dialog box will pop-up letting them know it was a success, along with a “Close and Refresh” button that will refresh/update the calendar.
- Show Task Signups Summary? – As in the main plugin, checking this will show a simple summary of signups, such as “1 Filled, 1 Remaining”. Unlike the main plugin, this option is not mutually exclusive with the above option, so you could show a list of signups as well as a signup summary (instead of one or the other).
- Show Task Signup Link? – This will show a signup link for the task/item, but only if there are spots still available.
- Show Signup Form in pop-up? – Checking this will open the sign-up form in a pop-up dialog box, allowing the user to signup via an Ajax function without leaving the calendar page. If this is NOT checked, then when they click on a signup link, it takes them to the signup form on the main plugin volunteer page.
- Require Login to view? – You can check this to completely hide a calendar from the public, requiring volunteers to login before they can even see the calendar. This can be defined for each calendar, and will ignore the login setting of the main plugin. If this is NOT checked, then the following option appears
- Require Login to signup? – If you are NOT requiring login to view (above option), then you can still require that volunteers login before they can signup. Again, this can be set on a per calendar basis, and will ignore the main plugin settings.
- Starting weekday – Set the starting day for the weeks in your calendars.
- jQuery UI Theme – Choose a jQuery UI theme stylesheet to load (loads from Google CDN). This applies to all the pop-up dialog boxes used by the calendars.
- Mobile Breakpoint – Choose the screen width below which the calendar table will collapse to a single column view (only showing days with tasks/items).
- Pop-up window width & height – These two settings let you set the height and width of the pop-up details boxes. These are the boxes that show all the details of a sheet/event for a day. Allows you to tailor the size of the dialog boxes based on how much info you are showing for each sheet & task.
- Sign-up window width & height – These two settings allow you to set the size of the sign-up form dialog boxes separately from the event details boxes. The sign-up form boxes are also used to display the results when a user clears a signup.
Messages & Text
- Days of week – Allows you to specify exactly how you want the days of the week shown on your calendar (e.g., abbreviations instead of full names). Please note that you MUST start with Sunday in this setting, regardless of the starting day you selected in the general settings. You MUST also enter a comma between each day, and there MUST be 7 days in the list or you will get an error.
- Months – As above, this field allows you to specify exactly how you want the months of the year displayed on your calendars. Again, they MUST be separated by commas, and there MUST be 12 of them.
- Close button text – Allows you to specify the text for the “Close” button on any pop-up details boxes.
- Cancel button text – Allows you to specify the “Cancel” button text for the sign-up form pop-up box.
- Close and Refresh button text – This is the text on the “Close and Refresh” button that appears after a successful signup or clearing. The button must be clicked in order to force a refresh of the calendar.
- Block UI Text – The text that appears when the user interface (UI) is blocked during AJAX requests (loading event data, getting signup form, processing signup or clear, refreshing calendar, etc.).
Main plugin additional Sheet options
- View with Calendar: This new field for the add/edit sheet page in the main plugin allows you to select a specific calendar to view the sheet with. What that does is modify the “View & Signup” link in the main list of sign-up sheets (main plugin) so that when you click on it, that specific sheet will be opened in the calendar of your choice. By default the “No Calendar View” will be selected, which shows the sheet using the regular plugin view.
TEMPLATES & CUSTOM CSS
This plugin uses 3 custom template files, and 1 CSS file, to define the appearance and layout of the calendars. If you are happy with the way the calendars look by default, then you do not need to do anything, as the appropriate templates and CSS file are loaded directly from the plugin folders.
However, if you are comfortable with PHP and/or CSS, and you want to modify how the calendars look, then you may wish to modify some or all of these files.
The 3 PHP/HTML template files can be found in the “templates” folder of the plugin. If you wish to customize these, and you are confident enough with PHP not to break anything, you should NOT directly modify these files! Instead, COPY the files you wish to modify to a folder with name “pta-volunteer-calendar” in your theme’s folder. Ideally, you should be using a child theme, so that these files do not get overwritten or erased if you update the main theme.
My plugin will first look for the templates in that folder of the active theme, and use those first, if they exist. If any of them do not exist, it uses the templates from the plugin’s folder.
Similarly, the main CSS file for the public facing calendar can be found in the public/css folder of the plugin. Again, if you want to customize the CSS, simply COPY the CSS file to a “pta-volunteer-calendar” folder in your theme’s folder (same as for the templates).
Below is a description of each template file (each template also has some notes within it to help you):
This is the layout for an individual sheet/event on a single day. So, this template is loaded and parsed for every day that has active tasks/items in the current calendar. This template is VERY PHP heavy, and so it is NOT recommended that you modify it unless you really know what you are doing. HTML start/end comments have been placed around sections to let you know what each section is doing, and to allow you to cut and paste sections easily if you want to change the order in which things appear. Please read the notes in the template itself!
This is a very simple template that generates the div and the link text for the pop-up details link when you choose to show event details in a pop-up (as opposed to listing them all out directly in each day of the calendar).