Page 1 of 1

Extract/Teaser

PostPosted: October 8th, 2010, 7:08 am
by nickstrong
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

Re: Extract/Teaser

PostPosted: October 8th, 2010, 11:53 am
by Elizabeth
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.

Re: Extract/Teaser

PostPosted: October 8th, 2010, 4:33 pm
by greymatter
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.

Re: Extract/Teaser

PostPosted: October 8th, 2010, 4:46 pm
by nickstrong
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?

Re: Extract/Teaser

PostPosted: October 13th, 2010, 8:57 am
by Elizabeth
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.

Re: Extract/Teaser

PostPosted: October 18th, 2010, 10:52 pm
by greymatter
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

Re: Extract/Teaser

PostPosted: October 23rd, 2010, 4:34 am
by Jason Caldwell
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.

Re: Extract/Teaser

PostPosted: October 25th, 2010, 9:23 pm
by RichM
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-->

Re: Extract/Teaser

PostPosted: October 26th, 2010, 1:05 am
by Jason Caldwell
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.