Blog

Creating Custom WordPress Websites (and Site Networks) for Event Management

Over the past several years, I have used WordPress and my RSVPMaker plugin to create a series of membership-based websites that revolve around signing up to attend events or in some cases fill specific volunteer roles at events (range safety officer at a rifle range, speakers and evaluators for Toastmasters clubs).

This is a progress report on my most ambitious project to date in this category, shared partly so anyone trying to create something similar will consider hiring me as a consultant. But I’ll also share some tips I hope will be useful to other developers.

As part of my WordPress for Toastmasters project, I took advantage of the multisite support in the WordPress software to allow officers in these public speaking sites to create a free website as a subdomain of toastmost.org (mysite.toastmost.org, yoursite.toastmost.org, etc.). Although the software for managing meeting agendas is available as open source, many leaders in Toastmasters would like to take advantage of the software without being responsible for setting up an independent website and installing WordPress plugins.

Although WordPress was originally created for bloggers, it can be extended with plugins to add functionality such as event management. It also includes a fairly sophisticated user security system (occasionally hacked but quickly patched) including necessary functions like a process for users to reset their passwords when they forget them. I use this as the basis for a membership website in which you must be logged in to view members-only content and certain functions are reserved for site editors or administrators. Most of these functions are well documented on the WordPress developer reference site. For example, the function is_user_logged_in() tells me if a website visitor has authenticated as a user. For WordPress multisite, I need is_user_member_of_blog() to determine if the user is not only logged in but a member of the blog currently being displayed.

If the documentation doesn’t answer all your questions about how a function works, you can download the source code from wordpress.org and go spelunking through functions until you get a better idea of what exactly is going on. I’ve had to do that occasionally for functions in both WordPress and popular add-ons like BuddyPress (for example, to figure out why BuddyPress seemed to behave differently in a multisite environment). Meanwhile, I’m working on fleshing out RSVPMaker’s own developer documentation (see: Developer Functions for Extending RSVPMaker).

WordPress provides a default user interface for allowing members to register for an account and create a site on a multisite network. In my case, this was something else I needed to customize, so each new site would be initialized with a theme reflecting the branding and trademark disclaimers required by Toastmasters International, along with some starter text for a home page and starter templates for meeting events.

A network of WordPress multisite events websites.

In addition, before they can register as users and create a site, I require them to sign up for the MailChimp mailing list for the project. RSVPMaker includes an API integration with MailChimp, including the ability to verify that an email address is subscribed to a mailing list. So I have them sign up for the list used for project announcements and include instructions for creating a site as part of the confirmation message. The link they follow to the signup form includes their email address as a query parameter. Before displaying the signup form for creating an account, I use the API to verify their subscription.

Requiring that they sign up for the MailChimp mailing list also serves to filter out hackers and spammers, who typically won’t go to the trouble of signing up for the email list and verifying their subscription with MailChimp. Why bother, when there are so many easier targets on the web?

There are other, more general purpose membership management plugins available, but the great glory of creating something custom is it can be exactly what you want and need.

If you would like help creating custom events websites, I am available as a consultant. Drop me a note at david@rsvpmaker.com.

Developer Functions for Extending RSVPMaker

If you are creating a custom events website for which RSVPMaker is the foundation but you want to add your own flourishes, you should be aware of several utilities functions.

I created these for my own selfish purposes. As someone who customizes events for specific purposes, I have gradually gotten to the point where I don’t want to deal with the internal complexities of my own plugin. And from studying the APIs of other software I’ve had occasion to modify or extend, I’ve started to figure out what that ought to look like for RSVPMaker.

Here are a few basic functions that are useful if you are trying to get events data out of the system and display it in some custom manner, for example in a widget or a shortcode different from the ones RSVPMaker includes.

To get a listing of future events use get_future_events:

The variable $events will be an array of objects, each of which represents an event post. The event post objects include all the usual blog post fields such as post_title, post_author, post_content, with the additional fields datetime (the SQL timestamp for the date and time of the event) and date (date formatted as Month Day, Year as in July 6, 2017). You can add where and limit parameters to the query. You then loop through the results like in this example using a shortcode.

The full function signature is

Changing the $output parameter from OBJECT, the default, to ARRAY_A, would give you an associative array for each event. The fourth parameter, $offset_hours is used to prevent events from expiring off the list the moment their start time is past. I’ve come across a number of situations where it’s preferable to have an event displayed several hours past the start time, for example so people who are arriving late or are in the middle of the meeting can still look up details such as the agenda or location.

There is also get_past_events function, which works almost the same way (no $offset_hours parameter) but lists past events starting with the most recent and counting backwards.

Here’s an example that would pull in all the past events since the start of 2017.

You can retrieve a single event using get_rsvp_event. It accepts 2 parameters, $where and $output (defaults to OBJECT)

or

Here are a few others that might come in handy.

Use get_events_by_template to retrieve all the events associated with a specific template, in ascending date order by default and as row objects by default.

Count of future events (no parameters)

Get the date associated with an event, based on ID, with get_rsvp_date. SQL date will be returned. To format, you might use strtotime as in this example.

Because a single event can span multiple dates, there is also a get_rsvp_dates function that returns an array of timestamps. This is also the version you would have to use if you also want to retrieve the event duration. Look at the rsvp_date_block function in rsvpmaker-pluggable.php for an example of how RSVPMaker uses this internally to display the date or dates at the top of an event post.

Can I Help?

If you would like help creating custom events websites, I am available as a consultant. Drop me a note at david@rsvpmaker.com. Some of the customizations I’ve worked on over the past couple of years include:

  • Signups for volunteer roles at a rifle range, with a reporting back end to show which roles are filled versus open for each shift.
  • A network of membership-based event websites for a nonprofit organization (Toastmasters), set up as subdomains using WordPress multisite. Chapter officers can sign up to get a free site, using a custom user and site registration process. They can then manage their own events and create accounts for their own members. They can collect event registrations via RSVPMaker but also sign members up to fill specific roles using the WordPress for Toastmasters extensions.
  • In a couple of cases, I’ve made signing up for MailChimp a prerequisite for creating a user account. The MailChimp confirmation message directs people back to a website page with a coded url that includes their email address. Before the signup form will display, their subscription must be verified via the MailChimp API.

Toward a Proper API

Going back to 2010, RSVPMaker has included a mechanism for developers to override pluggable functions with their own versions. The functions documented above represent the beginnings of a cleaner API.

Gathering Different or Additional Information About Guests

This small feature update came in response to a request from a user who was planning an event for which parents will register their themselves and their children. The event organizers need some additional information about the children, such as grade level.

RSVPMaker already allowed you to set up a registration form where some fields included on the main form will not necessarily be displayed on the guest form. Now you can specify that a field should be displayed only on the main form, on both the main form and guest form, or only on the guest form (not the main form).

Here’s what that looks like with the RSVPMaker form builder:

Guest-only setup

If you edit the shortcode directly, you would make it:

The guestfield attribute set to 1 means “also display on guest form” whereas setting it to 2 means “only display on guest form.”

Additional field on guest form
Host and guest (parent and child in this example) on the RSVP Report.

See the demo.

How Do You Use RSVPMaker? Share Your Story in a Guest Blog or Video

Sample Event

After years of working to improve RSVPMaker, answering questions about it, and troubleshooting problems, I want to hear from those of you who have made it work for you in your business or nonprofit.

Can I get you to share your story in a guest post on the RSVPMaker blog? I would also be interested in connecting with you in an online video meeting to interview you about your story. This can be your opportunity to ask questions or tell me about improvements you would like to see at the same time.

What do you say?

David F. Carr, versatile and inventive writer, editor, and web consultant
Author, Social Collaboration for Dummies

See my work on Forbes, connect with me on TwitterLinkedIn, or Facebook
Appointment scheduling: https://calendly.com/davidfcarr

RSVPMaker is Now on GitHub

This is an invitation to developers with ideas about how to make RSVPMaker better. The code is now on GitHub:

https://github.com/davidfcarr/rsvpmaker

While I have received occasional code contributions over the years, I hope this will make it easier to collaborate with others who have great ideas or who have stronger skills in some areas than I do. Even if you don’t have code to contribute, there is an Issues section where you can record wish list items.

I’m relatively new to using GitHub, so I welcome advice on how to use the platform effectively.

RSVPMaker on GitHub

Customization for Notification Emails

Added by popular request: a new way of modifying the notification and confirmation messages RSVPMaker sends when someone submits the form for an event.

The default is still that a notification goes to the event organizer (or whatever email address or addresses you supplied) saying something like “RSVP YES for The Big Event on May 1” and the attendee gets a version that says “Confirming RSVP YES for The Big Event on May 1.” By default, the confirmation message also includes a button people can click to update their RSVP.

Now, if you want to use “Registration” rather than RSVP in the subject line, or you want to leave off the “Update RSVP” button (some people have told me they don’t want to make it too easy for people to back out), you can make those changes. (See also: How to Change the RSVP Now! Button.)

The notifications editor opens up possibilities for adding personality to these transactional messages. It also simplifies the process of localization, since “RSVP” is not universally understood across languages and cultures.

Sample form, showing customized subject line
Confirmation message with a customized headline

The information you record here should be generic enough to apply to all your events. You still get the option to add a per-event confirmation message, which will be included as long as your template includes the [rsvpmessage] placeholder (one of several documented on the page for the template editor). By default, the confirmation message is just “Thank you!” but I’ve also used RSVPMaker to register people for webinars where that message includes detailed instructions for accessing the online event. For a terrestrial event, it might be driving directions.

The Notification Templates screen is distinct from the Email Template screen, which you use to define one or more templates for the layout of your HTML email, for example to specify a background color. Notification messages use the default template defined on that screen.

While RSVPMaker is intended to be useful out of the box, I continue to look for ways to let you make it your own.

P.S. for Developers

If you create extensions to RSVPMaker, there are filters and actions you can tap to extend this feature as well.

The default array of variables used for these templates is defined like this:

You can add to it with a filter like

Your filter would be passed an array and return your modified version with additional entries in the same format.

The sample forms use data pulled from a simple key / value array, where entries look like

The filter for that is ‘rsvpmaker_notification_sample_data’.

Finally, there is a ‘rsvpmaker_notification_templates_doc’ action you can use to add to the documentation at the bottom of the page.

As part of my WordPress for Toastmasters project, I plan to use this same template utility for confirmation and reminder messages for specific meeting roles.

Create Your Own RSVPMaker Events Listing Format

I’ve been working on creating a better API for developers who want to extend RSVPMaker, without hacking the core code of the plugin or overriding the pluggable functions. This example shows how you might take advantage of the get_future_events() function to write your own shortcode or widget code that outputs an event listing in a format of your own design.

get_future_events accepts 2 parameters, both optional — get_future_events($where,$limit)

$where is a SQL clause like ‘post_author=2’

$limit is a limit on the number of events that should be returned.

In this example, I added a shortcode that accepts where and limit as parameters that can be passed to the get_future_events function. You can also use before and after with either a specific MySQL formatted date or a date function like CURDATE() or DATE_ADD(). The past attribute directs RSVPMaker to use the get_past_events() function (which works the same way) instead. (This was only supposed to be a simple example, but I got carried away.)

I also included a showfield attribute to let you see the fields returned (the post_content body is hidden). In addition to all the normal $post properties, you get datetime (the full MySQL datetime for the event) and date (a formatted version). You can output the date in a different format by running the datetime data through PHP’s strtotime() to get a timestamp and then formatting your date with date() or strftime().

Here is the code, followed by a couple of examples.

[rsvpmaker_shortcode_demo]
Output:

July 23, 2017
Sunday Seminar

July 30, 2017
Sunday Seminar

August 6, 2017
Sunday Seminar

August 13, 2017
Sunday Seminar

August 19, 2017
Testing 30-Minute Timeslots

[rsvpmaker_shortcode_demo showfields="1"]
Output:

stdClass::__set_state(array( 'postID' => '115748', 'ID' => '115748', 'post_author' => '1', 'post_date' => '2017-03-07 22:21:54', 'post_date_gmt' => '2017-03-08 03:21:54', 'post_content' => '[post content goes here]', 'post_title' => 'Sunday Seminar', 'post_excerpt' => '', 'post_status' => 'publish', 'comment_status' => 'closed', 'ping_status' => 'closed', 'post_password' => '', 'post_name' => 'sunday-seminar-2017-7-23', 'to_ping' => '', 'pinged' => '', 'post_modified' => '2017-03-07 22:21:54', 'post_modified_gmt' => '2017-03-08 03:21:54', 'post_content_filtered' => '', 'post_parent' => '0', 'guid' => 'https://rsvpmaker.com/rsvpmaker/sunday-seminar-2017-7-23/', 'menu_order' => '0', 'post_type' => 'rsvpmaker', 'post_mime_type' => '', 'comment_count' => '0', 'datetime' => '2017-07-23 19:30:00', 'date' => 'July 23, 2017', ))

[rsvpmaker_shortcode_demo where="post_title LIKE ‘%the%’"]
Output:

August 24, 2017
RSVPMaker Entrepreneur Of The Year Dinner

[rsvpmaker_shortcode_demo after="DATE_ADD(NOW(), INTERVAL 30 DAY)"]
Output:

August 20, 2017
Sunday Seminar

August 24, 2017
RSVPMaker Entrepreneur Of The Year Dinner

August 26, 2017
Cub Scout Camping Trip

August 27, 2017
Cub Scout Camping Trip

August 27, 2017
Sunday Seminar

[rsvpmaker_shortcode_demo past="1"]
Output:

July 16, 2017
Sunday Seminar

July 9, 2017
Sunday Seminar

July 2, 2017
Sunday Seminar

June 25, 2017
Sunday Seminar

February 10, 2017
3 Different Tickets

Using RSVPMaker for WordPress with Stripe Instead of PayPal

If you charge for some of your events, you now have the option to use the Stripe payment service rather than PayPal. This is a new feature (call it “beta” if you like), so if you try it please report back with a comment below to confirm that it worked for you.

Rather than writing my own API integration code for Stripe, I’m supporting this with an assist from the WP Simple Pay Lite for Stripe plugin. (There is also a Pro version for you to consider, but the free version seems to work just fine for my purposes). Once you install and activate the plugin, you will see a checkbox option to “Use Stripe instead of PayPal” on the RSVPMaker settings screen.

You will also need to have SSL security enabled on your site (or at least on the event page) to use Stripe payment in production. These days, SSL is becoming more and more of a default requirement for all websites, and there are good free options for obtaining SSL certificates. The reason SSL is not required for RSVPMaker’s default PayPal integration is that the responsibility for encrypting the financial transaction is delegated to PayPal’s website. After users complete the transaction at paypal.com, they’re redirected back to your WordPress site, and the payment is logged to the RSVP record.

You may find the Stripe integration to be a nicer user experience because the user never leaves your website and is presented with a straight credit card entry form, rather than a choice between between paying by credit card or with a PayPal account. According to this comparison, Stripe’s fee schedule also includes fewer surcharges.

For the sake of the demo below, I have WP Simple Pay enabled but in test mode.

Tuesday September 19, 2017 7:00 PM
 

In addition to integrating with PayPal, RSVPMaker can be used with the competing Stripe payment service when used in combination with the WP Simple Pay Lite for Stripe plugin. For this demo, the plugin is set for test mode allowing you to try it using these fake credit card credentials:

Number 4111 1111 1111 1111
Expiration Date: any future date
Code: any 3 digit code

17 signed up so far.

RSVP Now!

Event Types:

Webinars on Webinars: Public Speaking and Online Tools

I’m working on a series of events this month related to online tools for organizing events, tools for organizing online events, and the developing the public speaking skills needed to communicate effectively in webcasts, webinars, online meetings, and live video.

Webinar: Market and Manage Events with RSVPMaker for WordPress – Tuesday January 10th, 1:00 PM EST – my webinar on a free WordPress plugin for event management (which, among other things, can be used to organize webinars built around YouTube Live)

Organizational Meeting: Online Presenters Toastmasters Club – Tuesday January 10th, 2017, 8 pm to 9 pm EST – first steps toward the formation of a Toastmasters club dedicated toward training and practice for online presentation skills, to be conducted online

WordPress for Toastmasters Webinar for January 2017 – Thursday January 19th, 2017, 1:00 PM EST – tutorial and Q&A session on the software for managing Toastmasters clubs (including online clubs)

Taking Public Speaking Online: Secrets of the Geeks on Tour – Wednesday January 25th,  7:00 PM EST – I’ll be moderating an educational webinar offered by Toastmasters district 47 featuring Jim and Chris Guld, whose weekly YouTube Live TV show is a marketing tool for their business teaching about technology for travelers

Learn Professional Online Presentation Skills with Roger Courville – Tuesday February 7th, 8:00 PM EST to 9:00 PM EST – I’ll be hosting an educational webinar offered by Toastmasters district 47 featuring Roger Courville, an world renowned expert on online presentation skills

Video: RSVPMaker for WordPress Setup and First Event

Here is a video introduction to RSVPMaker, covering its basic setup and the publication of a first event to your website.

Key points: