latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

About: Jonas Lundman

Sorry, I've not written a description yet. I'll get to it soon!

My Latest Replies (From Various Topics)

Viewing 8 replies - 1 through 8 (of 8 total)
Author Replies
Author Replies
Posted: Monday Jul 8th, 2013 at 6:53 pm #53133

wont work

Posted: Monday Jul 8th, 2013 at 5:58 pm #53131

Is this not fixed yet? Please, we cant use bad or sloppy code in our installs by company policy.

Posted: Friday Oct 12th, 2012 at 6:54 am #28206

Hi, thx for reply.
I don wanna redirect with javascript, or manipulate “diffrent” or multiple option pages. Just need:
TIME TO REDIRECT wheever you are function() or Hook{

$url_to_optionspage = my settings in backend or actual url retrived from some function
str_replace (‘’, ‘’.$LANGUAGE.’/’, $url_to_optionspage);
return $url_to_optionspage;


This is a hack to get WPML to work. Otherwise a danish/ whatever visitor get the english (default) options page

I can hack the core, and do this when this url is read from the saved table, in worst case. But I donno where to start look. A filter would be nice to hook into.

I must say that the last thing (and only) issues with s2member is the languages url. Otherwise very happy pro customers.
/ thx

Posted: Wednesday Oct 10th, 2012 at 10:49 am #27991

Ok. Well it didnt work, but help me out to another solution (see end of this post). When placing

$m = $user_login;
if($la == “en”) $la = “”;
else $la = $la.”/”;
$url = $GLOBALS[‘INSTALL’].”/”.$la.”members/”.$m.”/”;

directly in core : ws_plugin__s2member_fill_login_redirect_rc_vars

It works. BUT in the hook, the member login name isnt there. I tried all theese solutions :

function ua_redirect_after_login($url){
$m = get_user_field(“user_login”); // nope
$id = bp_get_member_user_id(); // nope
$m = get_user_field(“user_login”, $id); // nope
$username = (!$username && is_object ($user = wp_get_current_user ()) && !empty ($user->user_login)) ? strtolower ($user->user_login) : strtolower ($username);

$user = ((is_object ($user) || is_object ($user = (is_user_logged_in ()) ? wp_get_current_user () : false)) && !empty ($user->ID)) ? $user : false;
$user_id = ($user) ? (string)$user->ID : “”;
$user_login = ($user) ? (string)strtolower ($user->user_login) : “”;

$m = $user_login; // or every try above
if($la == “en”) $la = “”;
else $la = $la.”/”;
$url = $GLOBALS[‘INSTALL’].”/”.$la.”members/”.$m.”/”;
return $url;

// tried both :
add_filter( “ws_plugin__s2member_login_redirection_url” ,”ua_redirect_after_login”, 1 );
//add_filter (“ws_plugin__s2member_fill_login_redirect_rc_vars”, “ua_redirect_after_login”, 1);


I don wanna manipulate in the core files so:

s2member => Login Welcome Page : “Or, you may configure a Special Redirection URL, if you prefer. You’ll need to type in the full URL, starting with: http://. A few Replacement Codes are also supported here. ” I SET :


Then in functions.php

function ua_redirect_after_login($url){
if($la == “en”) $la = “”;
else $la = ‘/’.$la;
$r = $GLOBALS[‘INSTALL’].$la;
$url = str_replace(‘_Q_’, $r, $url);
return $url;
add_filter( “ws_plugin__s2member_login_redirection_url” ,”ua_redirect_after_login”, 1 );

I Hate to not know why, so if someone can see why my solutions in the first place don work, please reply or comment. Otherwise this thread is closed from my part.


Posted: Tuesday Oct 9th, 2012 at 6:57 am #27880

Hi and thanks for a reply.

the login redirect welcome page is – in s2member backend – set to optional fileld and we used :

domain/members/profile/%%USERNAME and so on

Works fine.

But if a user changes a language before login, the user get redirected to the english version (default) profile home.

We shold need like domain/%%LANG%%/members/profile/%%USERNAME

But that not supportet by s2m.

So I nned a filter to squeeze this lang select in the url redirect.

So who´s caching this variable anyway? (s2m?) when the

get_user_field(“user_login”); is not set, but who calls the %%USERNAME%% ?
Can I use that or DELAY this filter OR $_GET the posted (succeded) username or?

Any suggestions here would be nice. I mean SOME FUNCTION is using login redirect welcome page – that works – and I just need to add / replace str_replace() call in that filter/ hook/ function.

Thanks anyaway for a asome plugin

Posted: Monday Oct 8th, 2012 at 10:55 am #27800


Posted: Thursday Oct 4th, 2012 at 4:52 am #27395

Hi and thanks for the reply.
Yes, I tried create the .mo file with diffrent tools, including the steps in that link. Ive moved around the mo files in diffrent directories, re-saved, re-scanned. I been searching around for weeks / scanned all I can find on both s2member forum, WPML forum, Qtranslate etc etc

To slice it down a little and find the problem, I would like to know WHERE do the PRO forms been echoed out, and see if those labels REALLY are in the gettext calls when output. The funny is that the labels “strenght password indicator” works, and The diffrent lang modules I tested find almost every string, but output always default lang. Some strings are missing though. (as explained above) and I need to know if they really are _x(). Sholud be…

Posted: Sunday Aug 19th, 2012 at 9:12 am #22495

Use XCloner – Ive been moving around s2member sites from localhosts, backups and tick tack automatic beckups, moving to another domains. Just unpack you backup and everything is exactly the same – amazing! Just start to surf as nothing happends.

A Clone need a new empty database created before unpack at new dir. The installs path could be tricky if ya never working with this kinda stuff (where to start in urls with public_html/subdomains…) BUT move the TAR and XCloner file without a backup and adress them – you get retrived all info you need at your host.

s2member fix: General – url after logged in … :
“Or, you may configure a Special Redirection URL, if you prefer. You’ll need …”
Any chenges / custom redirect url settings in s2member after logged in seems to be hard-coded-absolute-url, cant find a short-code-s2member solution there, but it takes 5 sek to fix that after xcloner been running.

Im using:
And need to change everytime the domain root here

Images adressed in posts issues, I use custom shortcodes for src ([INSTALL-DIRECTORY]/wp-content/…) when adding images in post/ editor

Eh, and the header images url has to be assigned, but thats a WP thing, Shure this is easy to fix with a hook somkewhere to use relative urls.

And for some reasons, the system feel extra fine after go to permalink settings and jsut click save. Fixes some plugins glitches sometimes.

Viewing 8 replies - 1 through 8 (of 8 total)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.