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™

Restrict a text from all the posts

s2Member Plugin. A Membership plugin for WordPress®.

Restrict a text from all the posts

Postby cristiandark » February 4th, 2012, 11:08 am

Hi there, i want to know if is possible to hide a text from the blog, and to be only avanible to premium users.

Example: I want to hide "Download" text, the "Download" text will contain a url to the a file. I've tryed with URI but is not working. If download text have the url to http://85.25.000.00/download/february/test-file.mp3 i puttet on URI /download/ also /download, /february/ , etc. And is still visible.

So is there any solution to hide Download from guest, and to be avanible only to Leve 4 users? And also to be done automatically, without addig [private][/private] and things like that. Sorry for my bad english :)
User avatar
cristiandark
Registered User
Registered User
 
Posts: 3
Joined: February 2, 2012

Re: Restrict a text from all the posts

Postby Eduan » February 4th, 2012, 11:15 am

You could try s2Member conditionals, you can find the shortcode versions under WP Admin -> s2Member -> API / Scripting -> Simple/Shortcode Conditionals.

You can find the PHP versions under WP Admin -> s2Member -> API / Scripting -> Advanced/PHP Conditionals. For these you will need the Exec-PHP plugin or any other WordPress plugin that allows you to insert PHP into posts/pages.

Hope this helps. :)
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.

Re: Restrict a text from all the posts

Postby cristiandark » February 4th, 2012, 11:21 am

Hi there, i don't have the necessary skills to do that, if you can do that, i'm ready to pay:P
User avatar
cristiandark
Registered User
Registered User
 
Posts: 3
Joined: February 2, 2012

Re: Restrict a text from all the posts

Postby Eduan » February 4th, 2012, 11:36 am

You don't need to pay me.

I'm gonna give you some examples so that you can use them:
The following code will show you where to put the level 4 content:
Code: Select all
[s2If current_user_is(s2member_level4)]
    Some premium content for Level 4 Members only. This is where the download link will go.
[/s2If]
This code will only show the download link to level 4 members. You can modify the number on top to protect content on different levels.

Hope this is understandable. :)
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.

Re: Restrict a text from all the posts

Postby cristiandark » February 4th, 2012, 11:46 am

I don't have any idea how it works, that code it has to be present in all the posts? becouse i want that the "Download" text to be hidden default, without adding codes, etc in the post. I hope you understand what i need
User avatar
cristiandark
Registered User
Registered User
 
Posts: 3
Joined: February 2, 2012


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot] and 1 guest