More advanced agenda customization

Out of the box, the printable meeting agenda feature provided by RSVPMaker for Toastmasters is perfectly functional, and a number of built-in options exist for making limited customization (TM Administration > Settings > Agenda Formatting).

But if — as with my tabletop RPG-based club, Dungeons & Toast — your club desires greater control over the agenda appearance, you can use the

toastmasters_agendapath

Note: This guest post by Loni Huff is for more technical club webmasters, as in those comfortable with writing custom code. Loni is one of the people who continually pushes me to make the core WordPress for Toastmasters software better and more flexible. She was able to make these customizations partly because she hosts her club website independently, using the open source software version. If your club website is hosted on Toastmost, reach out to me at david@wp4toastmasters.com if you would like to add the kind of custom code she describes.

filter to point to a fully-customizable agenda file. Here is the procedure:

  1. To consolidate all your RSVPMaker customizations in one place, create a new plugin, rsvpmaker-for-toastmasters-addons:
    1. Create a directory in your wp-plugins directory entitled rsvpmaker-for-toastmasters-addons.
    2. Within this new directory, create a file entitled rsvpmaker-for-toastmasters-addons.php. Within this file, add the following:
<?php
/**
 * Plugin Name: RSVP for Toastmasters Addons
 * Plugin URI: Your URL
 * Description: Addons created for RSVP for Toastmasters by David Carr
 * Version: 1.0
 * Author: Your Name
 * Author URI: Your URL
 */
?>
  1. Navigate to the rsvpmaker-for-toastmasters plugin directory and download a copy of agenda-custom.php. Rename this file my_custom_agenda.php and upload it to your newly-created rsvpmaker-for-toastmasters-addons plugin directory.
  2. Open the rsvpmaker-for-toastmasters-addons.php file and add the following to the bottom of the file, before the closing ?> tag:
// BEGIN override the custom agenda file
function my_custom_agenda($agendapath) {
    return WP_PLUGIN_DIR . '/rsvpmaker-for-toastmasters-addons/my-custom-agenda.php';
}
add_filter('toastmasters_agendapath','my_custom_agenda');
// END override the custom agenda file
  1. Open your my-custom-agenda.php file. Add any links to needed JavaScript (ex. jQuery, Bootstrap) just above the line that reads <style> within the <head> of the HTML document.
  2. Add any links to needed style definitions (ex. Bootstrap) just below the line that reads </style>.
  3. Use the custom style definitions you have included to lay out the page as you prefer. Be careful to include the call to the
    tm_agenda_content()
    function:
<?php echo tm_agenda_content(); ?>

Using Bootstrap 4 and some custom styling, the weekly agenda for Dungeons & Toast looks like this:

Customize User Name Display

For privacy reasons, we choose to display the first name and first initial of the last name for our members, rather than defaulting to display name. Luckily, there is a filter you can use to change the way users’ names are displayed on your agenda. To do so, add the following code to your rsvpmaker-for-toastmasters-addons.php file:

// BEGIN override name display
function get_member_name_jr($name, $user_id, $user) {
    $output = $user->first_name . ' ' . substr($user->last_name, 0, 1) . '.';
    if ( !empty( $user->education_awards )) {
        $output .= ", " . $user->education_awards;
    }
    return $output;
}
    
add_filter('get_member_name','get_member_name_jr',10,3);
// END override name display

* This software is offered "for Toastmasters" but not is provided by or endorsed by Toastmasters International. The use of Toastmasters brand assets (with proper disclaimers) in website designs has been reviewed by the Toastmasters International brand compliance team.