|
Hi Jason,
Many thanks for the reply and the code you supplied. Sorry for late reply – for some reason I didn’t get the email notification for your update.
I will try the code out and report back with the results…
Thanks,
Sarah
|
|
Thanks Bruce.
The website is using s2Member’s Pro Forms.
So am I right in thinking that the Pro Forms don’t have an effective built in anti-(human)-spam mechanism, but also are unlikely to integrate with 3rd Party anti-spam plugins?
If so, it seems like this is an area that needs some urgent attention. Unless of course there is another solution that I have missed.
Given that the plugin I mention above is able to check against the Akismet DB for registrations, I would assume that s2Member could do something similar??
Thanks,
Sarah
-
This reply was modified 3 years, 11 months ago by
Sarah Hills.
|
|
Have been doing some more digging. From what I can make out, Akismet does not check for spam user registrations.
There is however a plugin Stop Spammer Registrations Plugin which does appear to check against the Akismet DB (as well as others) for registrations as well as other stuff.
Does anyone have any experience of using this with S2Member? Or any suggested alternatives?
Thanks
|
|
Also… just noticed that with js disabled, I can submit my form without checking my ‘required’ terms and conditions checkbox??
Seems like this is a bit of a loophole to me?
Thanks,
Sarah
|
|
Ok, I’ve worked out what’s causing the issue – I have multiple pro forms on a single page (which I understand S2 doesn’t currently support??). They are both hidden by default, and the user clicks one of two buttons & the corresponding form is shown.
The only difference between the two forms is the level users are registered at. Is there any way of using a single form, but dynamically changing the level depending on which button the user selects?
I don’t want to have to re-direct to another page if I can help it…
Thanks
-
This reply was modified 4 years, 1 month ago by
Sarah Hills.
|
|
Ignore that, just sent a message via the contact form…
|
|
Sure – can I send it to you in a PM/email? Let me know how…
Thanks,
Sarah
|
|
|
|
Thanks for the pointer… for anyone else that might be looking to do the same thing:
add_action( 'set_user_role', 'add_role_change_note', 10, 2);
function add_role_change_note( $user_id, $new_role ) {
c_ws_plugin__s2member_user_notes::append_user_notes ($user_id, "User role created as/changed to " . $new_role .': '. date ("D M j, Y g:i a T"));
}
Note this appends the note to user record when added via S2Member, demoted via S2Member, or edited in wp-admin. It doesn’t add the note when the user is added via wp-admin.
|
|
Hi Cristian,
Thanks for your help!
Re. 1 – I should have been more clear – the reason I’m wary of copying whole classes over to MUplugins is that I have lots of client websites to maintain, so if at all possible, I try and avoid anything that requires manual checking/upgrading at a later point. Is there any other way to add a user note, when the user account is first created and when the account type is changed?
2 – Thanks – I hadn’t realised the distinction between the two types of separator, that’s great!
Sarah
|
|
I think what Dan meant is that although the change to the email address isn’t (and shouldn’t be) made, the user is not informed of this fact – rather, they simply see the ‘Profile updated successfully.’ message.
To my mind, this should indeed be corrected as it’s v. misleading for most users!
Thanks,
Sarah
|
|
Have looked into this a bit further, and wonder whether a custom profile edit page would be easier to achive with something like Gravity Forms.
According to this thread (member only access) on GF forums, this functionality is under development as part of their User Registration add-on. But…. no date!
On the same thread, someone has posted a customisation here: http://blog.fublo.net/2011/12/edit-wordpress-user-profiles-gravity-forms/. I’ve not tried it (& personally will probably stick to the default for now), but in case this helps anyone else…
|
|
Further discussion in this post…
|
|
Further discussion in this post…
|
|
Thanks Cristian, just tested & that works great to change the ‘Additional Info’ text.
Although I think I’m going to have to end up hiding it with CSS anyway, as I’m trying to get a consistent appearance for the registration & profile edit forms… and the ‘Additional Info’ header doesn’t appear on the latter!
Thanks though for the pointer… hopefully it might be helpful to someone else.
|
|
Thanks again David – appreciate your time. I’m a bit wary of potentially removing the rest of the form processing though – not just for now, but in case it causes issues later down the line with upgrades etc.
I’m starting to think I’m just going to have to use the default layout for both registration and profile edit (they need to be somewhat consistent I think). Not great, but I don’t see any ‘upgrade-proof’ way around it.
Given this, is there any way of changing the ‘Additional Info’ label (I know as a last resort I can resort to hiding via CSS). To my mind it seems that this label should be outside of
%%custom_fields%%
similarly to how the label for the initial registration fields can be modified separate from the fields themselves.
Getting every so slightly frustrated with this… I love what S2 does on the whole, but it seems like something pretty obvious has been missed here? (Or perhaps I’m just an extra demanding user!!!)
|
|
Just done a quick test, and it seems not.
There must be some other way of modifying the Profile Edit form without overwriting the core files??
Any help appreciated…
|
|
Just found this thread which references the template used for the shortcode profile edit form:
2. This one handles the Shortcode [s2Member-Profile /]
/s2member/includes/classes/sc-profile-in.inc.php
However, Raam also says that
Keep in mind these are core files, so those changes will be overwritten when upgrading s2Member.
Is it possible to copy these to a theme directory & hence not have the changes overwritten when s2Member is upgraded?
|
|
I’m also trying to work this one out??
|
|
Just tried this out & it works great thank you! Thanks for the v. clear instructions.
Any idea whether this would work for a custom profile update form too?? Just off to give it a go now…
|
|
Hi David,
Many thanks for this and for taking the time to reply.
I am planning to try this out early next week – will report back then as to how it goes!
Thanks,
Sarah
|
|
Yep, that works – thank you!
|
|
I think I worked out what was causing the problem… I had a ‘Read more’ tag inside the restricted content i.e.
[s2If current_user_can(access_s2member_level1)]
Restricted content here…
<!--more-->
More content here...
[/s2If] [s2If !current_user_can(access_s2member_level1)]
This seems to cause a problem with this (any?) shortcode. Does anyone know how I can create a shortcode which allows me to hide the content but also let the admin user include a read more tag within the restricted content (for logged in users)? This is what I have at the moment:
function hex_protected( $atts, $content = null ) {
extract(shortcode_atts(array(
), $atts));
if (current_user_can("access_s2member_level1")){
$html = $content;
} else {
$html = 'This content is for members only. Please <a href="'.get_bloginfo('url').'/login/">log in</a> or <a href="'.get_bloginfo('url').'/membership/">register to join</a>.';
}
return $html;
}
|
|
Just following up on the shortcodes; I am now using something like the following to protect content:
[s2If current_user_can(access_s2member_level1)]
Restricted content here…
[/s2If]
[s2If !current_user_can(access_s2member_level1)]
Please login to view this content.
[/s2If]
This works beautifully on the single post page, but doesn’t work on the posts index page (i.e. my main blog page). I’ve tried activating the ‘Alternative View Protection’ option (‘Filter ALL WordPress® queries; protecting all Alternative Views.’) which I thought would do the trick but it hasn’t??
Am I doing something wrong or is there another way around this?
Many thanks for your help
Sarah
|
|
That’s great, thanks Eduan!
|