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.

David Welch


My Latest Replies (From Various Topics)

Viewing 25 replies - 101 through 125 (of 407 total)
Author Replies
Author Replies
Posted: Wednesday Sep 19th, 2012 at 1:40 pm #25831
David Welch
Username: dwbiz05

Also, I don’t know of any option to turn off styles in the admin panel, unless that is a new function in a recent upgrade that I may not have.

Dave

Posted: Wednesday Sep 19th, 2012 at 1:38 pm #25826
David Welch
Username: dwbiz05

This may be a stupid question, but looking at your theme header code, is the wp_head(); function before or after your stylesheet?

If it’s after, then that might be why it’s overriding your css in your stylesheet.

If not, then I’ll have to think about it some more… lol.

Hope that helps,

Dave

Posted: Tuesday Sep 18th, 2012 at 8:58 am #25694
David Welch
Username: dwbiz05

Thanks,

I’ll take a look.

Dave

Posted: Monday Sep 17th, 2012 at 11:32 pm #25652
David Welch
Username: dwbiz05

In your button shortcode, change the ps=”paypal” attribute to ps=”your-custom-page-design-name”.

See S2member makes it “paypal” by default so it’s overriding your paypal settings when the form is processed by paypal.

Hope that helps,

Dave

Posted: Monday Sep 17th, 2012 at 11:17 pm #25651
David Welch
Username: dwbiz05

Hey,

Not sure what you are using to process payments, but this should be fairly simple.

Go to (your payment type [Paypal, Auth.net, etc]) Pro forms or buttons in the s2member menu, look for the section that says “Specific Post/Page Access Links”.

That should walk you through generating an access link that you can e-mail to the customer.

Example: I use Auth.net. So my steps would be to go to Auth.net Pro Forms -> Auth.net Specific Post/Page Access Links -> use the link generator -> copy/paste into an email to the customer.

Hope that makes sense. Let me know if you have any questions.

Dave

Posted: Friday Jul 13th, 2012 at 12:38 pm #19177
David Welch
Username: dwbiz05

This is a list of the hooks / filters in the IP restrictions class:

http://www.s2member.com/codex/stable/s2member/ip_restrictions/package-filters/

I’ve not been through them all so I can’t say specifically that you will be able to do what you want, but that’s the possibilities.

Hope that helps,

Dave

Posted: Tuesday Jul 10th, 2012 at 2:03 pm #18826
David Welch
Username: dwbiz05

Update

I have started on this project / concept. Unfortunately right now I’ve got a client web application that is eating my lunch and I just launched my own website that is slowly starting to pick up some steam.

This one is kind of on the back burner for now, but I’ll work on it more as I get time. Maybe we’ll get lucky and S2member’s next version will come out with everything we want! :)

Thanks!

Dave

Posted: Thursday Jun 21st, 2012 at 9:04 am #17123
David Welch
Username: dwbiz05

Hopefully this will get you started on the right track…

Add this to your Theme’s functions.php file:

//Make sure this goes between the php opening and closing tags.
add_shortcode('dw-content-drip-menu','dw_content_drip');

function dw_content_drip(){
	$menu = '<ul class="content_drip_menu">';
	
	if(S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS >= 0){
	   $menu .= '<li><a href="">Course 1</a></li>';
	}
	if(S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS >= 7){
	    $menu .= '<li><a href="">Course 2</a></li>';
	}
	
	if(S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS >= 14){
	    $menu .= '<li><a href="">Course 3</a></li>';
	} 
	
	if(S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS >= 21){
	   $menu .= '<li><a href="">Course 4</a></li>';
	}
	//Add courses as needed like above
	
	
	$menu .= '</ul>';

	return $menu;
}

add_shortcode('dw-content-drip-check','dw_content_drip_check');

function dw_content_drip_check($atts,$content){
	extract(shortcode_atts(array("days" => 0),$atts));
	
	if(S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS >= $days){
		return do_shortcode($content);
	}
}

Use this shortcode in your page or sidebar text widget to show the list of links (content dripped):

[dw-content-drip-menu /]

Use this tag around your course content, using the “days” attribute to make sure it is only shown to those who have paid for that long:

[dw-content-drip-check days="21"]
Put your content here...
[/dw-content-drip-check]

Hope that helps,

Dave

Posted: Wednesday Jun 20th, 2012 at 9:35 pm #17051
David Welch
Username: dwbiz05

You should be able to set an end time in your free registration form shortcode with this attribute:

tp=”1″ regular period = 1
tt=”W” regular term = Week

This means they will have access for only 1 week. After this tie they should be re-directed back to the membership options page if they try to access secured content.

Hope that helps,

Dave

  • This reply was modified 4 years, 6 months ago by  David Welch.
Posted: Wednesday Jun 20th, 2012 at 9:31 pm #17049
David Welch
Username: dwbiz05

It depends on exactly what you need it to do and how involved it is. If you just need to do time-based dripping on one page you can usually do it with the shortocdes in s2member, but if you need something more advanced, it just depends on your requirements.

How are you wanting your content dripping to work?

Dave

Posted: Wednesday Jun 20th, 2012 at 11:14 am #17021
David Welch
Username: dwbiz05

@Paul

Thanks for the input and the heads up. As you said, this isn’t an overnight or over-the-weekend gig. :)

@Everyone

My idea would be to start with a basic functionality and then add more advanced functionality as we can. Of course, if Jason comes up with something cool that is automatically integrated, all the better. I’m waiting to see if this is on his list for the New version of s2member. If it’s not, then I’ll push more to get it done.

Here are my basic function (Phase 1) thoughts:

Admin:
1. Ability to set a global commission on all purchases (registrations, cc’s, specific post/pages, etc.)
2. Ability to set a different commission on specific purchases (I’m thinking via the shortcode attributes)
3. Ability to set a different “global” commission for an individual affiliate
4. Ability to see all clicks and commission stats by referral
5. Ability to view, download and edit commission information for each referral (edit: add, remove, mark as paid, etc.)
6. Ability to set individuals, roles or all users as affiliates
7. Ability to save list of products which affiliates can promote

Affiliate:
1. Ability to create dynamic referral link for any product
2. Ability to view own clicks and earnings
3. Ability to set payment type

This is a working list so feel free to add as you think. If you believe something is good, but probably not in the initial phase, just put “New Phase” so we know you aren’t intending it to be part of the original.

I’ll post source code as soon as I get some basic stuff done so anyone can offer changes and advice from there.

We’ll see what happens… lol!

Dave

Posted: Wednesday Jun 20th, 2012 at 9:02 am #17014
David Welch
Username: dwbiz05

Customer Support Form Is Here:
Support / Docs -> Private Contact

Here is a link:
http://www.s2member.com/contact/

:)

Dave

Posted: Wednesday Jun 20th, 2012 at 8:55 am #17012
David Welch
Username: dwbiz05

I haven’t searched for other threads to see if you’ve listed what exactly your looking for, but I’d be willing to take a look at what it would take to do it.

If you want, send me an idea of how you want it to work. I’ll see if I can put something together in my spare time. :)

My contact is in my forum profile or you can just post your requirements here or if they are in another post, link to that one.

I know this has been a pain for a lot of s2member users. S2 has some good integration options but not everything works for everyone.

Dave

Posted: Wednesday Jun 20th, 2012 at 8:42 am #17005
David Welch
Username: dwbiz05

Yeah I was considering the hook idea, but I just decided to save myself the time and trouble and collect it after the payment is processed.. lol

Thanks!

Dave

Posted: Monday Jun 18th, 2012 at 10:36 pm #16817
David Welch
Username: dwbiz05

I believe you want to hook into the s2member registration hook(s).

Maybe this one?

<?php
add_action('ws_plugin__s2member_after_configure_user_registration','automatic_group_membership');

function automatic_group_membership($vars=array()){

	//print_r($vars); //uncomment this line to see a print out of all the available variables to use in the code below.
	
	if( !$user_id ){
		return false;
	}
	else {
		$roles = get_user_field (“s2member_access_role”, $user_id);
		
		if ($roles != ‘s2member_level2′) {
			groups_accept_invite( $user_id, 2 );
		}
		else {
			groups_accept_invite( $user_id, 3 );
		}
	}
	
	exit();
}
?>

Hope that helps,

Dave

Posted: Monday Jun 18th, 2012 at 10:28 pm #16816
David Welch
Username: dwbiz05

Auto EOT is designed to give the user access for the full time they have paid for, then cancel their access. So if you want to cut them off early, you would either have to manually remove/demote them or use a custom script to process this removal/demotion on cancelation of the payments.

So, yes it is possible, but you will need to have your own code and hook into the cancelation return notifications.

Hope that helps,
Dave

Posted: Sunday Jun 17th, 2012 at 9:21 pm #16749
David Welch
Username: dwbiz05

import / export is a pro feature I believe.

Dave

Posted: Saturday Jun 16th, 2012 at 1:33 am #16641
David Welch
Username: dwbiz05

I did it quickly so if it doesn’t work, let me know.

Dave

Posted: Saturday Jun 16th, 2012 at 12:21 am #16639
David Welch
Username: dwbiz05

Well, there are a couple of ways you can do this.

1. Create a separate custom menu for each.
2. Load the correct menu in your template file using the wp_nav_menu function like this:

<?php
//functions.php in your theme
add_action( 'init', 'register_my_menus' );

function register_my_menus() {

  register_nav_menus(

    array( 'public-menu' => __( 'Public Menu' ), 
    		'member-menu-1' => __( 'Member Menu 1' ),  
    		'member-menu-2' => __( 'Member Menu 2' ), 
    		'member-menu-3' => __( 'Member Menu 3' ))
  );

}
?>

Place something like this in your theme where the menu goes:

<?php 
if(current_user_can("access_s2member_level2")){
	wp_nav_menu(array('theme_location' => 'member-menu-2'));
}
else if(current_user_can("access_s2member_level1")){
	wp_nav_menu(array('theme_location' => 'member-menu-1'));
}
else {
	wp_nav_menu( array( 'theme_location' => 'public-menu' ) );
}
?>

Another option would be to use the wp_nav_menu_objects filter to add items to an existing menu like this in your functions.php file in your theme:

<?php
add_filter( 'wp_nav_menu_objects', 'add_menu_items', 10, 2 );

function add_menu_items( $sorted_menu_items, $args )
{
    $link1 = array (
        'title'            => 'Extra Page 1',
        'menu_item_parent' => 0,
        'ID'               => '',
        'db_id'            => '',
        'url'              => site_url('extra-page-1'); //basic site_url() with page or post slug
    );
    
    $link2 = array (
        'title'            => 'Extra Page 2',
        'menu_item_parent' => 0,
        'ID'               => '',
        'db_id'            => '',
        'url'              => site_url('extra-page-2'); //basic site_url() with page or post slug
    );

  	if(current_user_can("access_s2member_level1")){
		$sorted_menu_items[] = (object) $link1;
	}
	if(current_user_can("access_s2member_level2")){
		$sorted_menu_items[] = (object) $link2;
	}

	return $sorted_menu_items;
}
?>

Hope that helps,

Dave

Posted: Friday Jun 15th, 2012 at 2:25 pm #16600
David Welch
Username: dwbiz05

The Pro version has some export options.

The only limit I can think of is going to be how much your server can handle from a size, ram and cpu standpoint.

I don’t think wordpress really cares how many users there are as long as the server can handle it.

Hope that helps,

Dave

Posted: Friday Jun 15th, 2012 at 11:02 am #16595
David Welch
Username: dwbiz05

Those are short codes, so you can use them to wrap any content in any of your posts or pages.

So, you would just put them inside your actual post or page content with the content inside… for example:

[s2If current_user_is(s2member_level1)]
    Some premium content for Level 1 Members. blah blah blah
[/s2If]
[s2If !current_user_is(s2member_level1)]
    Everyone else see's this. click here to get this premium content... blah blah blah
[/s2If]

EDIT: Check out this part of your s2member install for more options and ideas: s2member -> API / Scripting -> Simple / Shortcode Conditionals

Hope that helps,

Dave

  • This reply was modified 4 years, 6 months ago by  David Welch.
Posted: Friday Jun 15th, 2012 at 9:30 am #16589
David Welch
Username: dwbiz05

Yep!

Just wrap your content (products) with one of these tags and only that level membership can access it.

[s2If current_user_is(s2member_level4)]
    Some premium content for Level 4 Members.
[/s2If]

[s2If current_user_is(s2member_level3)]
    Some premium content for Level 3 Members.
[/s2If]

[s2If current_user_is(s2member_level2)]
    Some premium content for Level 2 Members.
[/s2If]

[s2If current_user_is(s2member_level1)]
    Some premium content for Level 1 Members.
[/s2If]

[s2If current_user_is(s2member_level0)]
    Some content for Free Subscribers.
[/s2If]

[s2If !is_user_logged_in()]
    Some public content.
[/s2If]

I think you could also do this using custom capabilities and just one actual user level. Just create registration forms for the following level / custom capabilities.

Level 1 – CC: Product1
Level 1 – CC: Product2
etc.

You may need to also make CC purchase buttons if you want them to “upgrade” in the future.

Then for each page / post that is only for product 1 you add the custom capability Product1 and only those Level 1 members who have Product1 cc will be able to view it.

It’s more about preference in how you want to display content, etc.

Hope that helps,

Dave

Posted: Thursday Jun 14th, 2012 at 4:22 pm #16507
David Welch
Username: dwbiz05

No problem, wish I would have caught that error the first time… lol!

Dave

Posted: Thursday Jun 14th, 2012 at 3:04 pm #16501
David Welch
Username: dwbiz05

I found the issue. It helps when you type the correct words in your code!

Try This:

add_shortcode('dw-post-more','dw_post_more');

function dw_post_more($atts,$content){
	extract(shortcode_atts(array("level" => 0),$atts));
	
	if(current_user_can("access_s2member_level".$level)){
		return do_shortcode($content);
	}
	else {
		return '<a href="'.S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL.'">Get Access To More Of This Content</a>';
	}
}

explode should be extract…. argh…

Hope that helps,

Dave

Posted: Thursday Jun 14th, 2012 at 11:38 am #16485
David Welch
Username: dwbiz05

try this…

add_shortcode('dw-post-more','dw_post_more');

function dw_post_more($atts,$content){
	explode(shortcode_atts(array("level" => 0),$atts));
	
	if(current_user_can("access_s2member_level".$level)){
		return do_shortcode($content);
	}
	else {
		return '<a href="'.S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL.'">Get Access To More Of This Content</a>';
	}
}

You are correct, the admin should be able to see it since he/she has access to everything s2member_level1 users do.
Dave

Viewing 25 replies - 101 through 125 (of 407 total)

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.