Reply To: Link sheet names to profile users ?

#10357
Stephen Sherrard
Keymaster

Hi Arthur,

Thanks for rating the plugin. I appreciate it.

Regarding your feature requests, #1 is already possible. My plugin already saves the user ID for each signup if the user is logged in when they sign up, or if the admin uses the ajax search feature to sign up other users. But, signups are NOT a custom post type, so there is no author->ID field to get. Instead, you would get the user_id property of the signup object: $signup->user_id

Using that, along with the filter hook that is already built-into the plugin to allows others to change how volunteer names are displayed, you could add a small code snippet to your child theme’s functions.php file to modify how those names are displayed (by creating your link around the name). Depending on which version of my plugin you are using, you can find the filter hook around line 770 of the class-pta_sus_public.php file. Should look like this:


// hook to allow others to modify how the signed up names are displayed
$display_signup = apply_filters( 'pta_sus_display_signup_name', $display_signup, $signup );

That filter hook passes you the signup name as it will be displayed ($display_signup), along with the $signup object (from which you can get the user_id).

Of course, you would probably want to add some conditional code to your function to make sure that there is a user_id that is an integer and greater than 1, and an actual display name first (not an empty string or some other string) before trying to create the link. But, it would be a fairly easy piece of code to do.

This is not a feature I would add myself because it’s not something we needed for our school, and not everyone who uses this plugins requires people to be signed into a user account before signing up (we did not at our school).

For #2, I don’t understand what the feature request is? You can add the shortcode argument (which I need to put into the documentation and the shortcode generator) to hide the time columns. Not sure what you mean to make the plugin more simple? The plugin started out MUCH simpler, but then people keep asking for more and more features, and then it starts to get very complex! =) Too late to go back now and start removing features to make things more simple.

If, however, you mean that you just want a more simple way to display things, there is the calendar extension:
https://stephensherrardplugins.com/plugins/pta-volunteer-sign-up-sheets-calendar-display/
Which is VERY customizable on how everything is displayed within your calendar, and also has a template and CSS system built-in to allow you to easily modify and/or replace the templates and CSS used to generate the calendar, so you can make it appear almost anyway that you want (if you are good with templates and CSS).

But, the main plugin is set up with a LOT of filter and action hooks, as well as public functions & methods that you can access from your own plugins or custom functions, so that if you are decent with PHP and understand the WordPress action/filter hook system, you can create your own custom display of signups in any way that you like.