Stephen Sherrard

Forum Replies Created

Viewing 14 posts - 781 through 794 (of 794 total)
  • Author
    Posts
  • in reply to: Phone number field #1821
    Stephen Sherrard
    Keymaster

    Fairly easy to edit the code to remove the field from the required fields check, if you don’t mind editing the PHP file. All you need to do is to totally delete line 91 of the class-pta_sus_public.php file, the line that reads:
    || empty($_POST[‘signup_phone’])

    That will make it not required.

    To remove that field from the signup form, you need to remove the fields in two different locations further down in that same file. Signup form function starts on line 632 You’ll need to edit out the last paragraphs and text inputs on lines 682-685 and 705-708, making sure to leave the closing single quote and semicolon after the paragraph close tag in both locations.

    That should work and shouldn’t mess up anything, although I haven’t tested it. Might want to save a backup copy of the file first. I did a quick look at where I save the signup into the database table, and it should still work without the phone field data.

    Let me know if that works.

    in reply to: Add a "class" to the headings above the contact form #1746
    Stephen Sherrard
    Keymaster

    You are correct as far as the headers on the contact form… I should have added some classes to those, or a wrapper div at least, with the last update… just super busy with projects here, so put that last update out quickly and didn’t look at the contact form function.

    I’ll see if I can push out an update today with a div wrapper around that contact form, as well as some classes for those headings.

    However, there are also filter hooks in place to allow other plugins or themes add content before and after the form (including before those headings are output). So, you could add a wrapper div of your own choosing around the contact form without modifying the plugin by adding a couple really simple hooks and functions to your theme’s functions.php file. This is all you would have to do to add your own div wrapper:

    
    function ptamdcf_add_div_start($html, $id, $location) {
    	return '<div class="ptamd_contact_form">';
    }
    add_filter('pta_member_before_contact_form', 'ptamdcf_add_div_start', 10, 3);
    
    function ptamdcf_add_div_end($form_html, $id, $location) {
    	return $form_html . '</div>';
    }
    add_filter('pta_member_before_contact_form', 'ptamdcf_add_div_end', 10, 3);
    

    Also, the nonce and referrer fields are necessary for security and best practices. Those are generated by the built-in wordpress function wp_nonce_field, and the location in my script is actually inside the form, but it looks like I didn’t set the optional third echo argument to false, so it’s echoing those fields before the rest of the form is returned. It still works fine that way, but I’ll change that in the new update.

    in reply to: Add "class" to the location header output #1739
    Stephen Sherrard
    Keymaster

    You’re welcome. Closing this thread so I can keep track of things once this forum gets busier.

    in reply to: Wholesale Ordering #1715
    Stephen Sherrard
    Keymaster
    in reply to: Wholesale Ordering #1690
    Stephen Sherrard
    Keymaster
    in reply to: Wholesale Ordering #1688
    Stephen Sherrard
    Keymaster
    in reply to: Add "class" to the location header output #1655
    Stephen Sherrard
    Keymaster

    Yes… good suggestion, and easy enough to add with the next update.

    in reply to: Make sending emails and collecting phone numbers optional #1569
    Stephen Sherrard
    Keymaster

    Also, for a quick fix to make phone optional, you can edit the class-pta_sus_public.php file and remove line 91 that looks like this:

    || empty($_POST[‘signup_phone’])

    delete that entire line, and you shouldn’t get an error message if you leave the phone field blank.

    If you don’t want to send out the sign-up confirmation emails, which is also copied to the event chair emails, you can delete lines 156-158 in the same file, which look like this:

    if ($emails->send_mail($wpdb->insert_id) === false) {
    $this->messages .= apply_filters( ‘pta_sus_public_output’, __(‘ERROR SENDING EMAIL’, ‘pta_volunteer_sus’), ’email_send_error_message’ );
    }

    in reply to: Make sending emails and collecting phone numbers optional #1568
    Stephen Sherrard
    Keymaster

    I understand… no online data is ever 100% safe, but a phone number is not much of a security issue like a SSN would be, and most phone companies are already selling your phone numbers to marketers anyway. If people are that paranoid about their phone numbers and emails, then they shouldn’t even be online at all. Most hackers are much more interested in accessing email accounts so they can send their spam, so they best thing you can do is to set it up so that all your WordPress users are forced to use very strong passwords, and never use “admin” as the user name for your admin account.

    Also, if you are requiring users to be logged in, then the fields on the sign-up forms will be pre-filled, so they won’t have to type them in each time.

    Wordpress and this plugin are open source, so you could freely modify the plugin to make the phone field not required, or to remove it entirely. Any one with just a little bit of PHP knowledge could easily make those changes.

    Again, though, I will definitely keep this in mind as a potential future option, and this one wouldn’t be too much work to implement. I obviously can’t implement every single feature request, as the plugin would become unwieldy and be too confusing with the amount of settings/options needed to implement everything. That’s why I set up this new feature request forum, as an easy way for me to keep track of feature requests, and eventually pick the most popular ones if and when I decide to include more features.

    At the same time, any body is free to take this plugin and fork it into an entirely new plugin, as that’s originally how this plugin got started (a modification of an existing plugin to fit the needs of our school’s PTA site).

    in reply to: Make sending emails and collecting phone numbers optional #1566
    Stephen Sherrard
    Keymaster

    Phone numbers and email address are NEVER shown to the public with the sign up sheets plugin, so there is no privacy/security concern there. The public doesn’t even see full names for sign-ups. Since people can’t always be trusted to type their email correctly, a phone number is a good alternate means of contact, and a much faster method of contacting volunteers if something changes at the last moment.

    However, I will keep this here and consider adding another option to make the phone field optional.

    If you don’t want the automatic reminder emails, you simply don’t enter anything in the reminder fields when you create a new sign-up sheet and no reminders will be sent. If you do that, then the only emails that get sent are a confirmation email right after they sign up, along with a notice email to the committee chairs. That’s pretty standard for signing up for anything via the web, and any one who marks those emails as spam clearly has some issues.

    Also, on a related note, you can install an SMTP plugin on your site to make WordPress use a SMTP email account to send outgoing emails, which you could then configure to use a Gmail or other off-server email account to send emails if you are worried that your server will be shut down for simply sending sign-up confirmation emails.

    in reply to: Additional Admin / Volunteer Fields Under Edit Tasks #1514
    Stephen Sherrard
    Keymaster

    I think that’s a bit over kill… adding too many fields to the database, and too many fields/columns to fit nicely into one row in the regular WordPress content area. Starts to get cluttered really fast!

    Each sheet has a full editor for the main sheet description, and in there you can easily put all that information in one place, instead of trying to store that with each task. For most of the sign-ups we do for our own PTA, no additional info is ever needed. For those rare occasions when some task/item needs a bit of extra explanation, that is very easy to add to the main sheet description.

    Contact info is provided for each sheet, so it’s very easy for somebody to contact the chairs privately if they have concerns or additional information they want to provide.

    There is already a field that lets you choose the text prompt for the item details input for each task, where you could enter things like “what is your shirt size”.

    in reply to: Make "View Sign Ups" Editable & Email Notice on Changes #1513
    Stephen Sherrard
    Keymaster

    Please note that you can already do this in a round about way.

    Admin can clear any signups from the admin dashboard.

    Admin, or any other user, can sign up anybody on the front end form. If you are logged in, it will pre-fill your information, but you can override any of the fields, allowing you to sign up someone else. If you enter the other person’s email address when you sign them up, they will get a confirmation email immediately, as well as reminder emails if you have reminders set for the sheet.

    So, all of the above is possible, just not all for the admin dashboard right now. The only catch, is that if you are logged in when you sign someone else up, it will still put that signup as belonging to your user ID (the user that is logged in). To work around that, you should be logged OUT of the site, and then when you signup somebody else, it will try to match the email you enter to a user account. Then, that person will be able to see the clear link on the signups list.

    in reply to: Specify committee chairs #1507
    Stephen Sherrard
    Keymaster

    Perhaps I’m not understanding what you want to do, but you should already be able to do that. You can have as many “positions” in the directory as you want, and each position can have any number of members. Also, a member can belong to more than position.

    So, for your situation, I would set up one “position” for the committee chairs, and one position for the committee members. You could do that for every committee. By doing it that way, you also make it easy for somebody to contact only the committee chairs (since they have their own position) without it sending a message to all committee members. Also, the chairs can be included in the committee members position as well, so if you do want to send a message to all members, the chairs would get that message as well.

    in reply to: Populate database #1159
    Stephen Sherrard
    Keymaster

    Hi Fred,

    Sorry for the delay… email notification must have gone to spam folder.

    You may want to search WordPress.org for plugins that can import/export data for Custom Post Types. I know there are a few out there, but I haven’t personally tried any of them.

    My plugin doesn’t create any new database tables. Instead, it creates a custom post type called “member”, and all the additional info for each member (contact info, and custom fields) are store as post meta fields.

    So, you would need to find something that can take info from your CSV and first create a “member” post type, and then map each column from your CSV data to a specific post meta key. You would have to search through my code to find the post meta keys, but they are usually prefixed by “_pta_member_directory_” and then the name of the field, such as “_pta_member_directory_email”.

    I’d have to look through my code for the custom fields plugins to confirm, but I’m pretty sure I stayed with the same prefix and then the slug version of whatever name you gave to the custom field you created. Although, things like links are split into two custom fields, one for the title and one for the url.

    So, the short answer is I’m not sure there is any easy way to do this. If you can find a plugin that can do the mapping for you, it would certainly be easier, but you need to figure out the meta keys for all the fields you want to transfer over.

Viewing 14 posts - 781 through 794 (of 794 total)