I have finished a release candidate for WP-Members 2.7.1 that is ready for public testing. As previously announced, this update has a number of fixes and improvements.
The WP-Members 2.7.1 beta rc4 can be downloaded here.
Here is a list of what is included in this version:
- Improved the default email install process. This will check for proper installation of each of the emails the plugin sends. If you have customized already, it will skip what you have. If the email is blank, it will fill it with the proper default.
- Removed password from the [fields] email shortcode. This is only used in the admin notification email, and only if you are using user defined passwords. The password value was never sent, but I cleaned it up anyway to take this field out of the group.
- Corrected the sidebar login widget div tag. With the 2.7 update, I rebuilt the sidebar widget to accommodate the multi-widget class. In doing so, we lost the div tag that was used for styling. Some minor edits bring this back in 2.7.1.
- Fixes to the form field validation – specifically invalid usernames and emails.
- Moved the send-from filters for outbound emails to be specific to the plugin. The plugin uses wp_mail to send its messages. You can set the address you want these to come from as of 2.7. However, this was a site-wide filter. 2.7.1 changes this to be specific to the plugin. If you use a sitewide filter, that’s ok, too.
- Fixed the “remember me” cookie in the login process.
- Replaced some deprecated WordPress functions.
- Added an optional TwentyEleven stylesheet. There are several ways to implement this, the easiest of which would be to set the stylesheet option in the plugin settings to:
http://yourdomain.com/wp-content/plugins/wp-members/css/wp-members-2011.css - Added some authentication to the backend login so that user defined passwords can now be used with moderated registration.
- Added user deactivation. You can now activate, deactivate, or reactivate a user. If you are using user defined passwords, this process will not reset the user’s password. If users do not choose their own passwords at registration, then this process will reset their password.
- Added several filter and action hooks.
If anything sneaks in before the final release, I’ll add it to the list!
The 2.7.1 code cross reference is documented here.
Enjoyed this article?
Don't miss a single post. Subscribe to our RSS feed!
Marcelo Paoli says
Hi, im my version 2.7 i’ve had a bug. Right after a user was updated, the link that send back to users.php in the dialog box directed to the wrong location.
Find the problem in wp-members-admin, line 1126, i’ve replaced it with:
echo ” ID}&wp_http_referer=\users.php\”>” . $user->user_login . “\n”;
Doesn’t know if it’s the right fix, but it worked for me… Thanks for the great plug-in.
Chad says
Thanks for catching that. Actually, the correct fix would be to get the value for wp_http_referer this way:
At least, that is how WP does it for the user.php table. I add that fix to the 2.7.1 release.
Marcelo Paoli says
Chad, also in the “Login Failed” dialog, the “Click Here to Continue” link is not sending to WP base. I have a instalation that is “http://127.0.0.1/website/version2” (WP is installed here) , the link sends me back to “http://127.0.0.1…”
Marcelo Paoli says
I have found a particular problem. I’m using Qtranslate plugin to build a multilanguage website. It adds the query “?lang=pt” to my links. I also got pretty permalinks. Problem is, when i’m using Qtranslate with WP-Members it gets in the way… like when i try to edit my profile it outputs “http://127.0.0.1/website/page?lang=pt?a=edit” and doesn’t work. The right link would be “http://127.0.0.1/website/page?lang=pt&a=edit” Why isn’t the “?” in the query becoming an “&” ? I’m gessing it’s a .htaccess rewrite rule problem, or would it be inside a function in PHP?
Chad says
When you are using pretty permalinks, the plugin adds it’s querystring beginning with ‘?’. If you are using the default permalinks, it will append with an ampersand (&). BTW, the plugin is not likely to work will in a multilanguage environment.
There is one possible workaround for you in this case. In the upcoming 2.7.1 release, there will be a few filter hooks available. Note: 2.7.1 is still a beta release, and the hooks are considered experimental and thus subject to change. However, you could use them as a workaround for this issue.
In this particular case, you can filter the links on the Members Area page when logged in with the wpmem_member_links filter. You could append to the string that it generates, or in your case, dump it and write your own links. You would do this in your functions.php file. It would be something like this:
Marcelo Paoli says
Chad, thanks for the response. I’ve tried your code, it builds the correct links, but display them as text, not as a links. Guess the fix is simple, but i’m not very good at PHP, so i wasn’t able to fix them… though i’ve did a workaround for now, changing the function “wpmem_chk_qstr” in the core… line 773… i know it’s the wrong way to go, but it’s working for now.
} else {
if( !$url ) { $url = get_permalink(); }
$return_url = $url . “&”;
Mikael Boldt says
when checking my Translation of your plugin I found this:
Control panel / Users / WP-Members is not prepared for translation
Richard says
Hi Chad,
I updated from 2.6.4 to 2.7.1, and when doing so my Swedish translations were lost (I made a custom po-file in 2.6.4). Do I have to run “$chk_force = true” everytime I update the plug? Or is there something else that I’ve missed or that has gone wrong?
Thanks,
Richard
Chad says
Hi Richard – you just need to reload your custom .mo file back to the /lang/ folder. Then you should be fine. (Also, there were a few additions in this update that may need to be translated, so there is a new pot file included in the release.)
Frieddy says
Hi,
I set up a miltilingual website (English/German) with qtranslate and want to use wp-members in both languages. How do I load the appropriate language?
Any help is greatly appreciated!
Frieddy
Chad says
At this time, WP-Members is not multi-lingual compatible.
Rob says
Is there a way to make it multilingual? I figured since the language files were there it would work.
So far I’ve been able to translate some of the messages by using qtranslate quicktags in the backend. It works as well to translate the outgoing emails which is awesome. You can also use the quicktags to make translated fields in the reg form.
What would we need to do in the code to make it recognize the lang files ?
Thanks for all your hard work Chad !
Cheers
Chad says
The primary challenge to making the plugin multilingual is that the fields are stored in the database, and they are stored as already translated. I experimented early on with having them be translated when displayed, but that didn’t work too well because the user can create and delete and recreate their own fields. So there isn’t a way of translating these.
However, if you have been able to translate the outgoing emails, you might be able to also do it with the fields as well. If you find success in that area, let me know. I’d be interested to hear your experience with it.
Rob says
Ok thanks!
I’m sure there are a ton of people who would love to have it work in multiple languages. For the fields I can easily change the language of the WP Members fields by adding qtranslate quicktags ([:en]English[:fr]French). I can’t change username and email though.
I started doing the same thing for the email dialogs. You can even change the custom email name. I haven’t tried putting different email addresses per language yet.
For the password field and the TOS if I understand correctly it’s the slug name which is important, right? If it is I can probably make the displayed name work with the quicktags as well.
For qtranslate users here’s an article about how to use them on their forum… http://www.qianqin.de/qtranslate/forum/viewtopic.php?f=3&t=385
I’m wondering if there’s a way to tag the individual phrases directly in the WP Members code to achieve the right settings. Probably labour intensive to change everything in the code but I’m totally willing to make it look more professional in both languages I’m using.
Thanks in advance,
Rob
p.s. I will try fiddling with putting these codes in to see what happens
Rob says
Chad,
Update: Preliminary tests show that using the qtranslate quicktags directly in the code works. It wasn’t working everywhere but for simple error messages and titles it works. I’m still trying to figure out the right way to make it work for things like “you are logged in as %s”
An example of how to make the quicktags work take for instance line 133 of sidebar.php:
label for=”username” which is __( ‘Username’, ‘wp-members’ ) I changed to __( ‘[:en]Username[:fr]Utilisateur’, ‘wp-members’ )
Let me know if I’m doing something that can compromise the plugin at all. I’m really making this up as I go along. 🙂
I hope this can help anybody who needs WP Members to be multilingual. Probably a pain though if you have more than 2 languages. And I guess the caveat remains to save your changes for when the plugin gets updated.
Cheers,
Rob