Community Support Forums — WordPress® ( Users Helping Users ) — 2012-01-23T14:00:54-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=16849 2012-01-23T14:00:54-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16849&p=61307#p61307 <![CDATA[Re: Custom expected formats for registration fields]]>
%%current_user_level%% gets replaced with the user level of the user currently logged in.

If my user level is 4, %%current_user_level%% will be replaced with 4.

If my user level is 1, %%current_user_level%% will be replaced with 1.

So, let's say I have a user level of 3 and I login. If your special redirection URL is set to this,

http://www.url.co.uk/?page_id=53/s2member_level_1%%current_user_level%%/

Then I will be redirected to this,

http://www.url.co.uk/?page_id=53/s2member_level_13/

Does that make sense? Not really, no! What you want is this:

http://www.url.co.uk/s2member_level_%%current_user_level%%/

So now, when I login, I will go to this page:

http://www.url.co.uk/s2member_level_3/

However, you need to do two things:

1) Configure permalinks so you're not using ?page_id=53
2) Create a WordPress page for each of your s2Member Levels. If you have 3 levels, you will need to create three WordPress pages: s2member_level_1, s2member_level_2, and s2member_level_3. If those pages don't exist, then the redirect won't go anywhere.

Does that make sense?

Statistics: Posted by Raam Dev — January 23rd, 2012, 2:00 pm


]]>
2012-01-20T09:24:35-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16849&p=61101#p61101 <![CDATA[Re: Custom expected formats for registration fields]]>
With regard to the url you suggested, should the actual user level not be included and read s2member_level_1 like this??

http://www.url.co.uk/?page_id=53/s2member_level_1%%current_user_level%%/

You can assume from these questions that I still havent solved it!! So stupid!

Niall

Statistics: Posted by niallw — January 20th, 2012, 9:24 am


]]>
2012-01-20T02:57:52-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16849&p=61088#p61088 <![CDATA[Re: Custom expected formats for registration fields]]>
With this special redirection URL on, will those logging in with level 0 still see the login welcome page?

How do you go about setting up more than 1 special redirection URL?

Thanks

Niall

Statistics: Posted by niallw — January 20th, 2012, 2:57 am


]]>
2012-01-19T23:08:59-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16849&p=61060#p61060 <![CDATA[Re: Custom expected formats for registration fields]]>
niallw wrote:
I literally want to redirect, almost skip, the login welcome page if they have access level 1

I looked at the options for specific redirection url in the login welcome page. Surely this would solve the issue as it would direct to a specific page based on user level. Here is the url i typed in.

http://www.url.co.uk/?page_id=53/%%current_user_level%%/s2member_level1/

this didnt work either.


I misunderstood earlier what you were trying to do. If you don't want to use the Login Welcome Page at all, then using the Special Redirection URL with Replacement Codes is exactly what you should be using.

Could you try using this URL:

Code:
http://www.url.co.uk/?page_id=53/s2member_level%%current_user_level%%/


Then, make sure the s2member_level1 page actually exists so when the redirect happens it goes somewhere.

Statistics: Posted by Raam Dev — January 19th, 2012, 11:08 pm


]]>
2012-01-19T05:26:15-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16849&p=60959#p60959 <![CDATA[Re: Custom expected formats for registration fields]]>
I looked at the topic you posted and generated the following code. Is this right?

Code:
<?php
$redirect_url = "http://www.url.co.uk/?page_id=53" . S2MEMBER_CURRENT_USER_ACCESS_LEVEL === 1 . "/";
?>
<script type="text/javascript">

window.location = "<?php echo $redirect_url; ?>";

</script>


All that happened was the same page loaded, without any content and it kept trying to load like the javascript was stuck in a loop.

I literally want to redirect, almost skip, the login welcome page if they have access level 1

I looked at the options for specific redirection url in the login welcome page. Surely this would solve the issue as it would direct to a specific page based on user level. Here is the url i typed in.

http://www.url.co.uk/?page_id=53/%%current_user_level%%/s2member_level1/

this didnt work either.

There must be a solution to this. I know I'm new and probably missing the obvious.

Appreciate ongoing help.

niall

Statistics: Posted by niallw — January 19th, 2012, 5:26 am


]]>
2012-01-18T22:51:11-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16849&p=60943#p60943 <![CDATA[Re: Custom expected formats for registration fields]]> header() useless (that's why you're getting the cannot modify header errors).

You might be able to use that code if you manually edit your theme templates and add the code there.

The alternative for redirecting inside a WordPress post is to use JavaScript. See here for an example: viewtopic.php?f=4&t=16867&p=60929#p60929

Statistics: Posted by Raam Dev — January 18th, 2012, 10:51 pm


]]>
2012-01-18T14:38:24-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16849&p=60914#p60914 <![CDATA[Re: Custom expected formats for registration fields]]>
The code i've been trying is as follows

Code:
<?php if (current_user_can("access_s2member_level1")){
    header("address here");
} else {
    header("address here");
} ?>


I have also tried this having read other forums

Code:
<?php if (current_user_can("access_s2member_level1")){
wp_redirect( a url() ); exit;
}else{
wp_redirect( another_url() ); exit;
} ?>


I have installed the php exec plugin but get this error:-

Warning: Cannot modify header information – headers already sent by (output started at /homepages/39/d372554375/.............../template-full-width.php:7) in /homepages/39/d372554375/................./wp-content/plugins/php-execution-plugin/includes/class.php_execution.php(273) : eval()’d code on line 29

Statistics: Posted by niallw — January 18th, 2012, 2:38 pm


]]>
2012-01-18T13:18:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16849&p=60892#p60892 <![CDATA[Re: Custom expected formats for registration fields]]> Statistics: Posted by Raam Dev — January 18th, 2012, 1:18 pm


]]>
2012-01-17T14:50:27-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16849&p=60844#p60844 <![CDATA[Re: Custom expected formats for registration fields]]>
Thanks for getting back.

It would be if the first two characters were letters and the next 6 were numbers. Or similar.

Could you help with a query on advanced conditionals if possible. It's just an if else statement to redirect to a certain page based on membership level. I've been trying location headers but I am getting errors. Someone suggested wp_redirect function. Would/should this work?

Sorry if explanation poor. I can post code if required.

Statistics: Posted by niallw — January 17th, 2012, 2:50 pm


]]>
2012-01-17T14:09:25-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16849&p=60837#p60837 <![CDATA[Re: Custom expected formats for registration fields]]>
Glad to hear you're enjoying the plugin! :)

Are you referring to the Expected Format: drop-down box when adding a new Custom Registration Field? What kind of format are you wanting to add?

Statistics: Posted by Raam Dev — January 17th, 2012, 2:09 pm


]]>
2012-01-14T11:04:41-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16849&p=60507#p60507 <![CDATA[Custom expected formats for registration fields]]>
Really enjoying the quality of this plug-in.

Just wanted to know if there was a way to add custom formats to registration fields. There are several covered, however, I was wondering if there was a way to add your own?

Wanting to ensure that the entry ties in a password that will have been sent to the user from another site.

thanks,

niallw

Statistics: Posted by niallw — January 14th, 2012, 11:04 am


]]>