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.

Could anybody please help with some code?

Home Forums Community Forum Could anybody please help with some code?

This topic contains 5 replies, has 2 voices. Last updated by  Cristián Lávaque 4 years, 9 months ago.

Topic Author Topic
Posted: Sunday Mar 25th, 2012 at 5:26 pm #9063
Mark Davies
Username: mark696

Hi guys,

I am building a site using S2 member and want to have a link on the login welcome page that will send a member to their own individual page. I think that I am going to have to create the page first for each member and that is not a going to cause a problem. I want to put this link in some content that has been “dripped” to the member after a month. The problem that I have is a limited knowledge of php.

Would anyone know how to achieve this? I can’t think of any way to get the program to recognise which page has been assigned to which member.

The best solution would be for the page to be created by the system when a member signs up but I have never heard of this in WordPress or S2 member. If anyone knows how to achieve this please let me know.

Thanks,

Mark.

List Of Topic Replies

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Friday Mar 30th, 2012 at 3:50 am #9562

Hi Mark. Thanks a lot for helping that other user earlier. :)

About your question, you’ll need to custom code it, but it’s not impossible. Here’s a video Jason created about that:

If you need help with the coding, you can try places like oDesk, eLance or jobs.wordpress.net.

Now, do you really need a separate page for each user? Is the content going to be that different? Or is it basically the same but the values change depending on the user? If the latter, then you can use one page with some PHP to use variables and customize the page for each person.

I hope that helps. :)

Posted: Friday Mar 30th, 2012 at 5:42 am #9568
Mark Davies
Username: mark696

Thank you Christian,

I have watched the video and now think I know exactly what to do. My login-welcome page is set using php code to show different content to members at different levels and is all working perfectly so from the idea I have from watching the video I think that I can now simply use some more php to display a link on the relevant form of the login-welcome page(

<a href="http://mysite.com/%%current_user_login%%" >My page</a>

) a day or two after the member has signed up which will give me time to manually add each page.

Again thanks for your help, I will be upgrading once I have finished building my members area.

I want to use the individual members page for file sharing. My clients should have the ability to upload pdf’s, mp3’s, mp4’s, images and documents in order that I can quickly download them to use on their projects. I know that this could all be done by email if they sent me their media directly but I want them coming back to the site regularly!

Can you think of a plugin that would suit my purpose there? Is there a plugin that would integrate with S2Member for members uploading files securely? I have tried a few that do not work.

All the best,

Mark.

Posted: Friday Mar 30th, 2012 at 8:03 pm #9614

Ah, I understand why you want them to have their own pages. No, I don’t know what plugin to recommend for that, sorry.

I’m glad that video helped! Thanks for the update. :)

Posted: Saturday Mar 31st, 2012 at 4:10 am #9648
Mark Davies
Username: mark696

Hi Christian,

Thanks again for your help, I have got it all working now and after a bit of trial and error I came up with the code:

<?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 1){ ?>
    Follow the link to your page:
<p><a href="http://mysite.com/index.php/<?php echo S2MEMBER_CURRENT_USER_LOGIN; ?>/">My page</a></p>
<?php } ?>

This link is somewhat different from the link you would enter in the general-options/login-welcome-page customization tab mentioned in the video you sent me. That link only works when you set the program to re-direct the user to their own page on login. If you do not use the link I have shown you above as a hyperlink and you use the link used in the login-welcome-page options then you get a “not found” error. It may be worth mentioning if you guys ever update that video. Still, no complaints, it certainly got my brain working!!! lol

This works perfectly so now I can now do exactly what I was looking to do. As a gesture I have now purchased your pro package a little earlier than I was going to. I expect that in the customer support forum I will be able to get your help any time. Great stuff!

By the way, I have found a plugin called “Nmedia file upload” another great plugin. It does not upolad files into the secure folder (S2member-files) but it can be used on any page and will only show the current user’s file uploads (based on their unique user name). They can also download them again or delete them, and on their wp-admin-user page it lists all of their files for me to download and/or delete! I could almost get rid of the idea of having individual pages now! I just need to find another way of delivering the other feature that I had planned for the individual pages.

The thing I like the most about S2member is that it teaches you how to use php as you go along. Great stuff!!!

All the best, and thanks again,

Mark.

Posted: Sunday Apr 1st, 2012 at 11:12 pm #9729

Awesome, Mark! I’m very glad you got it working the way you wanted, and that plugin you found is great, many have asked me for a user uploads plugin and now I can show them that one.

Thanks for your support! Sure, post in the Customer Support forum when you need help with s2Member. :)

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

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

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.