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.

Setup Questions …

Home Forums Community Forum Setup Questions …

This topic contains 12 replies, has 4 voices. Last updated by  Bruce 4 years, 1 month ago.

Topic Author Topic
Posted: Tuesday Nov 27th, 2012 at 12:25 pm #32712

Hi!

Just a couple questions getting started.

1) How can I use the first person’s name as a shortcode in pages/posts?

2) Should drip content membership areas be setup on pages or posts?

3) Will these pages or posts show up as links automatically on the welcome/login page or should I add the links manually?

Thanks!

List Of Topic Replies

Viewing 12 replies - 1 through 12 (of 12 total)
Author Replies
Author Replies
Posted: Tuesday Nov 27th, 2012 at 3:00 pm #32737
Raam Dev
Username: Raam
Staff Member

Hi Traci,

Please see my replies below:

1) How can I use the first person’s name as a shortcode in pages/posts?

You can do that with the s2Member PHP/API Constants (see Dashboard -› s2Member® -› API / Scripting -› PHP/API Constants):

[s2Get constant="S2MEMBER_CURRENT_USER_FIRST_NAME" /]

2) Should drip content membership areas be setup on pages or posts?

That all depends on what content you’re dripping. If you’re dripping posts, then you’ll want to set it up on posts. Otherwise, you’ll want to use pages. Pages are designed for more static content while Posts are designed for stuff that you want to be displayed in chronological order, like a series of blog posts or news articles.

Usually when you’re dripping content, it’s static content that you write once and then put up somewhere, so Pages make more sense. Then you can use the Content Dripping features of s2Member (see Dashboard -› s2Member® -› API / Scripting -› Content Dripping) to only give access to those pages after specific amounts of time.

3) Will these pages or posts show up as links automatically on the welcome/login page or should I add the links manually?

You will need to build these links manually. If you’re dripping content then you can use the same content dripping conditionals on your welcome/login page to only show the links when the user has access to them.

For example:

<?php if(S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS >= 30){ ?>
    Link to Page the user has access to after 30 days
<?php } ?>

<?php if(S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS >= 60){ ?>
    Link to Page the user has access to after 60 days
<?php } ?>

<?php if(S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS >= 90){ ?>
    Link to Page the user has access to after 90 days
<?php } ?>
Posted: Wednesday Nov 28th, 2012 at 6:18 pm #32836

Thanks Raam, that was very helpful.

I’ve got another question for you. Is this the error message I should be seeing when trying to download a file protected by ccap subdirectories when not logged in:

404: Sorry, file not found. Please contact Support for assistance.

Just want to be sure I’m on the right track.

Thanks!

Posted: Thursday Nov 29th, 2012 at 7:18 am #32892

No, s2Member would not return a 404 for a protected file, it’d redirect to the Memberhsip Options Page as with any restricted content you don’t have access to. [hilite path]Dashboard -› s2Member® -› General Options -› Membership Options Page[/hilite]

If you’re getting a 404, first make sure the file is actually where the URL you’re using points to. Are you using Amazon or the s2member-files folder? Could you post the URL to the file? (It’s okay if you don’t use the actual domain name.)

Posted: Thursday Nov 29th, 2012 at 12:25 pm #32920

Hi guys, it may be quicker to have my systems integration person email you directly, would that be alright?

Posted: Thursday Nov 29th, 2012 at 12:54 pm #32923

Here’s an example of the link we’re trying to protect:

http://domain.com/?s2member_file_download=access_s2member_ccap_workouts/Workout_1.pdf

No, we’re not using Amazon.

Posted: Thursday Nov 29th, 2012 at 2:31 pm #32937
Raam Dev
Username: Raam
Staff Member

Hi Traci,

With that URL, the Workout_1.pdf file should be inside wp-content/plugins/s2member-files/access_s2member_ccap_workouts/Workout_1.pdf, is that correct?

If the file is just inside wp-content/plugins/s2member-files/Workout_1.pdf, then the URL should be:

http://domain.com/?s2member_file_download=Workout_1.pdf

Posted: Thursday Nov 29th, 2012 at 2:58 pm #32940

Workout_1.pdf is located in:

/domainsite/wp-content/plugins/s2member-files/access_s2member_ccap_workouts/

We’re trying to use Custom Capabilities for protected files and pages access which is why we’ve put it in the extra folder at the end.

Posted: Friday Nov 30th, 2012 at 7:03 am #32980

Thanks.

Could you try this URL? Does it work?

http://www.domainsite.com/?s2member_file_download=access-s2member-ccap-workouts/Workout_1.pdf

or this one

http://www.domainsite.com/wp-content/plugins/s2member-files/access-s2member-ccap-workouts/Workout_1.pdf

Just change the domain name to the actual one, and keep the [hilite mono]www[/hilite] in mind (I’m not sure if your site uses it or not). Knowledge Base » Don't mix www and without

Posted: Friday Nov 30th, 2012 at 1:32 pm #33028

Hi Cristián,

The site actually is using the www prefix, so thanks for catching that. However the links still don’t work and give the 404 error.

Any other ideas?

Posted: Friday Nov 30th, 2012 at 5:26 pm #33055
Raam Dev
Username: Raam
Staff Member

Traci,

If you disable the s2Member plugin (make sure Deactivation Safeguards are enabled in Dashboard -› s2Member® -› General Options -› Deactivation Safeguards), can you then access the file by visiting it’s URL (e.g., http://www.domainsite.com/wp-content/plugins/s2member-files/access-s2member-ccap-workouts/Workout_1.pdf)?

Posted: Sunday Dec 2nd, 2012 at 1:37 pm #33218

Hi Raam,

Good question. After disabling the plugin and trying that we’re seeing the same error. Is this a permissions issue? Permission settings on /s2member-files/ and /access-s2member-ccap-workouts/ is 705.

Posted: Sunday Dec 2nd, 2012 at 4:42 pm #33237
Bruce
Username: Bruce
Staff Member

Hi Traci,

Have you run the Server Check Tool on your server?

It appears that this may be a permissions issue. The permissions that are set up give no access to the “group” of your webserver (with 0). Try changing your permissions to the standard 775.

Viewing 12 replies - 1 through 12 (of 12 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.