Event with simple password
-
Hi!
I wonder if someone could point me in the right direction. We want to set up a number of password protected events for a special group pf people (from an organization). They will get a simple password beforehand to use at the registration. What would be the best way forward to achieve this? WordPress password protect a page is not very user friendly.
All the best
A-
This topic was modified 7 years, 10 months ago by
Argentum.
-
This topic was modified 7 years, 10 months ago by
-
Put those events in a caegory of their own and make them private events. Then use [eme_events] to show just that category on a page you want and protect that page with a WP user/password.
If you want to use simple passwords per page, just don’t make those events private but follow the same procedure.There’s also the option of making the event itself public and keep the registration form private by using the placeholder #_ADDBOOKINGFORM_IF_USER_IN_GROUP{xxxx}, creating a EME group and person, put that person in the group and link a WP account to that person.
Maybe I should create #_ADDBOOKINGFORM_IF_USER_IN_WP_GROUP{xxx} too … something to think about π
I’ll also take a look at how to detect the wordpress simple passwords, then those events can stay private too.Hm, tricky one this. I don’t really want the users to create a WP account. Only protect the events from being filled out by someone that doesn’t know a simple password.
I was thinking, perhaps, to use this plugin:
https://ww.wp.xz.cn/plugins/content-protector/
But then I need to password protect the individual events too, not just the overview page with [eme_events category=’special-group’], and I am not sure how to do that. Not good enough.The simplest way, if I could wish freely, would be to create a new template RSVP form, with the usual information gathering fields, and at the bottom a simple text entry Enter Password:[ ], and then conditionally show the submit button, only if the Enter Password text entry contains “pass123”.
Reading this now, and hm … it almost looks possible!
https://www.e-dynamics.be/wordpress/conditional-tags/Well, the way you’re describing it is exactly why private events were invented π
Password protecting rsvp form submission is possible by:
– creating your own custom password field
– use the filter eme_eval_booking_form_post_filter to check for the content of that field (and if the event is in the correct category by checking the value of $event[‘event_category_ids’] (a comma-separated list of category-ids), or call
eme_get_event_category_names() to find the names of the categories the event is in.Given some donations, I might add a password field to protect the submission in the code π
I have already given 50 euros. It was a little while ago but I always try to behave like a decent man. PayPal Transaction id 6SN33219EJ150024A. Would that still suffice or do you want more? π
A little while ago probably is months or years π
Anyway, the next version will have a rsvp password option.My goodness! Is it true? I had almost given up. I will donate as soon as I can. That is a promise.
I managed to use the standard WP page password for the event listing page, and added a snippet to functions.php that turn the password cookie for the event listing page to a session cookie, so it is deleted when the session ends.
function custom_password_cookie_expiry( $expires ) { return 0; // Make it a session cookie } add_filter( 'post_password_expires', 'custom_password_cookie_expiry' );How are you adding rsvp password? As an in-form field with validation against a set string? Or password protect the event page?
-
This reply was modified 7 years, 10 months ago by
Argentum.
In-form field.
Can I test-drive it? Perhaps come with some (silly or valuble) feedback? I am a GUI user experience person in my heart and education.
For test-driving: download the latest dev-version from here:
https://ww.wp.xz.cn/plugins/events-made-easy/advanced/Some more explanation: once installed, the rsvp section per event has a password field you can use. If used, you also need to use #_PASSWORD in your RSVP form template.
I just created a copy of my site and disabled the 2.0.37 plugin by renaming its folder and uploading the dev folder. I see that the dev version have no php files in it’s root folder, only readme and changelog. Is that as it should be? Or shall I overwrite the contents in the 2.0.37 folder with the files from the dev version?
And I look and look at the event RSVP page for a password field. It’s not there. What am I doing wrong?
The dev-version is a zip-file containing the events-made-easy folder that should replace yours (renaming an existing plugin folder is not a good idea in wordpress, you should just remove it and put the new one in place). If you don’t know how to install a wordpress plugin via zip then you’ll have to wait for the next version.
Sorry about the hazzle. The local unzipping must have failed. I uploaded the zip instead. Now the field shows. Much obliged. I will fiddle around with this. Thanks a million!
I entered a password (123) in the Event page. Added the field with <th scope=”row”>PW:</th>
<td>#_PASSWORD</td>
</tr>No matter how I try I am getting the
“You’re not allowed to do this. If you believe you’ve received this message in error please contact the site owner.”
Is this the code that checks for password in eme_rsvp.php ?
if (!empty($honeypot_check) || !empty($nonce_err)) { $result = __("You're not allowed to do this. If you believe you've received this message in error please contact the site owner.",'events-made-easy'); return array(0=>$result,1=>$booking_ids); } $event=$events[0]; if (!empty($event['event_properties']['rsvp_password'])) { if (!isset( $_POST['rsvp_password'] )) { $result = __('Password is missing','events-made-easy'); return array(0=>$result,1=>$booking_ids); } elseif ($_POST['rsvp_password'] != $event['event_properties']['rsvp_password']) { $result = __('Incorrect password given','events-made-easy'); return array(0=>$result,1=>$booking_ids); } }How does the plugin sync from #_PASSWORD to rsvp_password ?
Does the honeypot trigger before it checks for password ?If you would like to test it, I can send you a link to the dev site by email.
If you get that error, some caching plugin probably interferes. Disable caching plugins and try again.
-
This reply was modified 7 years, 10 months ago by
The topic ‘Event with simple password’ is closed to new replies.