PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Extract/Teaser

s2Member Plugin. A Membership plugin for WordPress®.

Extract/Teaser

Postby nickstrong » October 8th, 2010, 7:08 am

Hi - I'm a new user, or rather I'm testing the plugin to see if it does what I need, which is fairly straightforward. Reading through the instructions I'm fairly clear on the basic operation/set up for my site, which is almost completely page (not post) based and which therefore cannot use Categories or Tags for content, and which needs basic levels of -
  • Visitor - able to see the extent of the site, the navigation menu and the page title/header image and first paragraph of text - i.e Extract or Teaser
  • Member - free - able to see the complete site and its contents, after registration/logging-in.
  • Customer - various types - able to see/purchase eBooks and downloads.

ok, so the question is, how do I implement the 'teaser' (Visitor) operation. I have had a look at the Advanced Conditional API set-up (suggested in another question here) but it looks far too complicated for a simple soul like me. I would just like to (set something up? and then) include a statement like [more] or [restrict] at the point in the page text where the viewer needs to have registered as a member. (and obviously logged-in Members can see everything from the off, without having to jump that hurdle on each page).

Could someone - Jason? - guide me, step by step, on how to achieve this? If it is actually possible so to do.
Many many thanks.

BTW This is the way I want to do it - it's a big (100 page +) existing information site and I'm not going to do a complete page restructure/rewrite to match complete pages to visitor/member levels. ;)
You're very welcome to look at the site
User avatar
nickstrong
Registered User
Registered User
 
Posts: 2
Joined: October 8, 2010

Re: Extract/Teaser

Postby Elizabeth » October 8th, 2010, 11:53 am

Hi,

Advanced Conditionals will work for you.
Code: Select all
<?php if (current_user_can("access_s2member_level1")){ ?>
    Some content for Members who are logged in with an s2Member Level >= 1.
<?php } else { ?>
    Some public content.
<?php } ?>


In order to use PHP scripting inside your Posts/Pages, you'll need to install Exec-PHP.
User avatar
Elizabeth
Moderator
Moderator
 
Posts: 160
Joined: May 12, 2010

Re: Extract/Teaser

Postby greymatter » October 8th, 2010, 4:33 pm

Couldn't this functionality be implemented with shortcodes in the visual editor, rather than having to drop down to HTML source? WPMU DEV's Membership plugin offers that feature.
User avatar
greymatter
Registered User
Registered User
 
Posts: 5
Joined: October 8, 2010

Re: Extract/Teaser

Postby nickstrong » October 8th, 2010, 4:46 pm

Elizabeth wrote:Hi,
Advanced Conditionals will work for you.

Er yes, thank you, but how exactly do I use them/where do I put them?
How do I indicate the end of the 'open' text and the start of the 'logged in visitor' text?
User avatar
nickstrong
Registered User
Registered User
 
Posts: 2
Joined: October 8, 2010

Re: Extract/Teaser

Postby Elizabeth » October 13th, 2010, 8:57 am

greymatter wrote:Er yes, thank you, but how exactly do I use them/where do I put them?
How do I indicate the end of the 'open' text and the start of the 'logged in visitor' text?

Take a look at this video, it may help:
http://www.s2member.com/advanced-conditionals-video/

greymatter wrote:Couldn't this functionality be implemented with shortcodes in the visual editor

I do not recommend using the visual editor when coding.
User avatar
Elizabeth
Moderator
Moderator
 
Posts: 160
Joined: May 12, 2010

Re: Extract/Teaser

Postby greymatter » October 18th, 2010, 10:52 pm

Elizabeth, what I'm saying is that I was under the impression that, given a little more work by PrimoThemes/WebSharks, I believe the same thing could be accomplished with shortcodes, which would allow you to safely use the visual editor, rather than using <?php tags and ExecPHP. I'm pretty new to the technical end of WordPress, so I'm not positive, but that seems to be the way things work. So I'm wondering, if that's true, why shortcodes have not been created to accomplish these fundamental queries.

Is it not as easy as I believe, or is it just a matter of being low priority?

Thanks,
Lee
User avatar
greymatter
Registered User
Registered User
 
Posts: 5
Joined: October 8, 2010

Re: Extract/Teaser

Postby Jason Caldwell » October 23rd, 2010, 4:34 am

Hi Lee. Thanks for your patience.

Actually, Shortcode Conditionals are included in the release of s2Member v3.2.7+. We refer to them as "Simple Conditionals", and they DO utilize Shortcodes so that you don't need to use PHP tags unless you really have to. Please check your Dashboard under: s2Member -> API Scripting -> Simple Conditionals. There are also Shortcode equivalent code samples provided throughout all documentation in the API Scripting section of your Dashboard.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Extract/Teaser

Postby RichM » October 25th, 2010, 9:23 pm

Maybe I'm stating the obvious here, but adding the following tag at the desired spot in the HTML pane of the editor will separate the page/post into public/restricted parts.

<!--more-->
User avatar
RichM
Registered User
Registered User
 
Posts: 1
Joined: October 25, 2010

Re: Extract/Teaser

Postby Jason Caldwell » October 26th, 2010, 1:05 am

Correct. When you are protecting individual Posts/Pages, you are ONLY protecting the Permalink for those Posts/Pages. In other words, you're only protecting the full content. Short teasers WILL still be available on your site in archive views, where a small snippet will be displayed ( e.g. a Teaser ). For example, within a list of "Posts by category", "Posts by author", etc.... depending on your theme.

Using the <!--more--> tag, or the "Excerpt" field on your Post/Page editing form allows you to specify which portion of the content will be used as the teaser. This is an easy way to handle Teasers on any WordPress-powered site.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot] and 4 guests

cron