Page 1 of 1

[Solved]Creating page/post for specific User NOT level

PostPosted: January 20th, 2012, 11:01 am
by adam1987
Hi, dear admin:

I realized that the post I crated was not even read by anyone....... I wonder is that because I did not purchase the pro version? :(
I really really want to know if your plugin could actually crate page or post that can show up for only 1 specific user according to his or her ID instead of the level.
However, I do not mean to let the member to purchase the info but somehow provide him the info that we need to do manually and later on we post the info in certain page or post to only viewable for him.

I would be really appreciated if anyone could help me out!

Thank you all
Adam

Re: Creating page/post for specific User NOT level

PostPosted: January 20th, 2012, 4:12 pm
by adam1987
After I watch the video tutorial--Specific Posts/Pages ( Video ), one big question comes up:
-do we have to make a user to purchase certain page in order to make it only viewable by him? Could the page be assigned to the one who immediately after registration ?

For some reason there is just nothing about crating a page or post that can only accessible for specific user instead of level.

Please help, guys

Re: Creating page/post for specific User NOT level

PostPosted: January 20th, 2012, 10:09 pm
by Cristián Lávaque
Hi Adam.

This one may help you with what you want to do: viewtopic.php?f=36&t=586

Re: Creating page/post for specific User NOT level

PostPosted: January 21st, 2012, 6:46 am
by adam1987
Thanks for the answer! I am checking it out Monday and will reply about the result, thank you very much :D

Re: Creating page/post for specific User NOT level

PostPosted: January 23rd, 2012, 12:09 pm
by adam1987
Jason Caldwell wrote:Thanks for the great question.

In your Dashboard, under: s2Member -> API Scripting -> API Constants, you will find reference to this PHP Constant: S2MEMBER_LOGIN_WELCOME_PAGE_URL

So you can use this PHP Constant inside a PHP theme file, or even inside a Post/Page
if you have the PHP Execution plugin installed. Here is a quick code sample.

Code: Select all
<a href="<?php echo S2MEMBER_LOGIN_WELCOME_PAGE_URL; ?>">My Account</a>
* Note that this PHP Constant is dynamically adjusted for the current User/Member. So whatever you've configured as your Login Welcome Page for s2Member ( even if you're using a Special Redirection URL ), this PHP Constant will hold that value; with the dynamic properties ( i.e. Replacement Codes ) already filled in for the current User/Member.


Thanks Jason for your great work! I was looking for this a long time!
but I got a trouble, Since the PHP Execution plugin been stopped updating so I am using this one:Shortcode Exec PHP. I think what you mean in the instruction is that create a short code with the plugin?
So what I did is that:
1. I copy and pasted the <a href="<?php echo S2MEMBER_LOGIN_WELCOME_PAGE_URL; ?>">My Account</a> into the Shortcodes Field and crates some kind of code snippet with my own customized name as [ clientArea ]
2. I pasted this shortcode [ clientArea ] into Login Welcome Page.
3. Logged in with corresponding user, the [ clientArea ] text just appears straight on the page instead of some kind of link of My Account.
4. I tried to just copy and paste the code into the page directly, shows My Account as a link, but not working.

I wonder is using the PHP Extraction the only way to make this code work, does it means that the plugin still compatible with WP 3.3.1?

This is a pretty key process for the member system, wonder if anyone could help out? :)

Thanks in advance :D

Cristián Lávaque wrote:Hi Adam.

This one may help you with what you want to do: viewtopic.php?f=36&t=586



*Cristián, I asked same question in the original post but seem not getting any answer for the above question, wonder if you able to answer it at the moment? Thanks~

Re: Creating page/post for specific User NOT level

PostPosted: January 26th, 2012, 12:02 pm
by Raam Dev
If the PHP Execution plugin isn't working for you, try the Exec-PHP Plugin.

Re: Creating page/post for specific User NOT level

PostPosted: January 27th, 2012, 9:32 am
by adam1987
Got it :)