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.

Jason (Lead Developer)

Staff Member

My Latest Replies (From Various Topics)

Viewing 25 replies - 1,526 through 1,550 (of 1,909 total)
Author Replies
Author Replies
Posted: Thursday Mar 29th, 2012 at 6:34 am #9444
Staff Member

We REALLY appreciate this request Kezz.

So in that regard, I have a quick question. Do you think you would consider a private area of the forum for folks who have upgraded to the Unlimited or Network licenses? The reason I ask is I’d like to share with your other customers some of the code I’ve developed for this new site, but given it shows my site’s infrastructure ideally it would be great if I could do so and yet not have the code samples totally public. Just a thought / idea of course though. :)

Our Customer Forums can be “read” by anyone in the public, but it’s not possible to post and/or reply to any topic created in our Customer Forums without being a Customer yourself. This makes our Customer Forum a great place to share information with everyone, but without needing to address future questions/concerns about your post from just anyone out there in the public.

I can certainly understand your desire to have a private area though, completely invisible to the public. I’m adding this to our list of things to discuss in the next conference call. That being said, we want to keep most information available for “read” access from the public, so adding a private forum (if not done properly) could create a problem in that regard (i.e. too many folks posting things privately, without warrant). In the mean time, if you have suggestions on how to prevent the normal flow of information from being posted into a completely private area all the time, please feel free to share. We value your feedback.

Posted: Thursday Mar 29th, 2012 at 6:13 am #9443
Staff Member

Re. the “Return to …..” link, that’s just through a standard PayPal button.

I see. You’re referring to the “cbt” field that PayPal supports optionally.

Taken from PayPal’s documentation on Standard Button Variables.
cbt Sets the text for the Return to Merchant button on the PayPal Payment Complete page. For Business accounts, the return button displays your business name in place of the word “Merchant” by default. For Donate buttons, the text reads “Return to donations coordinator” by default.
NOTE: The cbt variable takes effect only if the return variable is set.
https://merchant.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_Appx_websitestandard_htmlvariables

s2Member’s Shortcodes for PayPal Buttons do not yet support this additional “cbt” variable. If you need to use this variable, you would need to generate your Standard PayPal Buttons using PayPal’s own Button Generator, instead of with s2Member Shortcodes. I’ve provided some documentation for this here: http://www.primothemes.com/forums/viewtopic.php?f=36&t=309#p1333

Posted: Thursday Mar 29th, 2012 at 6:06 am #9442
Staff Member

So sorry for the delayed response.
~ I’m reviewing this thread again now. One moment please.

Posted: Thursday Mar 29th, 2012 at 6:01 am #9441
Staff Member

I just took a quick look at this URL: https://doc4m.com/
Seems to be working properly in: Chrome/Firefox/IE.

Posted: Thursday Mar 29th, 2012 at 5:52 am #9440
Staff Member

Hi there. Thanks for the heads up on this thread Raam.

@Jacqueline

I’m sorry, but that documentation is no longer available. However, we’ll be happy to assist you here in the forums with anything related to the s2Clean theme. I’m posting some examples for you below of s2Clean’s Easy Columns.

Two column layout example…
(be sure your last column has the additional class ‘last’, as seen below)

<div class="with-2-4ths-column-width">
	Column content.
</div>

<div class="with-2-4ths-column-width last">
	Column content.
</div>

Four column layout example…
(be sure your last column has the additional class ‘last’, as seen below)

<div class="with-1-4th-column-width">
	Column content.
</div>

<div class="with-1-4th-column-width">
	Column content.
</div>

<div class="with-1-4th-column-width">
	Column content.
</div>

<div class="with-1-4th-column-width last">
	Column content.
</div>

While the on-site documentation is no longer available, all of these CSS utility classes are available for your review inside: /s2clean/colors/default/utilities.css. I’m posting a copy below.

/*
Copyright: © 2009 WebSharks, Inc. ( coded in the USA )
<mailto:support@websharks-inc.com> <http://www.websharks-inc.com/>

Released under the terms of the GNU General Public License.
You should have received a copy of the GNU General Public License,
along with this software. In the main directory, see: /licensing/
If not, see: <http://www.gnu.org/licenses/>.
*/
/*
These CSS selectors are for: utility classes.
*/
/*
External links.
*/
a[rel ~= "external"]
	{
		padding-right: 18px;
		background: url('<?php echo $i; ?>/xlink-icon.png') no-repeat center right;
	}
li.recentcomments > a[rel ~= "external"]
	{
		padding-right: 18px !important;
	}
/*
Text styles & special coloration.
*/
.with-hilite
	{
		color: #000000;
		background-color: #FFFFCC;
	}
.with-fancy-type,
.with-fancy-type *
	{
		font-family: 'Mistral', 'Brush Script MT', 'Monotype Corsiva', 'Zapfino', 'Lucida Handwriting', 'Apple Chancery', 'URW Chancery L', cursive;
	}
.with-title-type,
.with-title-type *
	{
		font-family: 'e-Titles-Bold', 'Trebuchet MS', 'Arial', 'Helvetica', sans-serif;
	}
.with-sans-type,
.with-sans-type *
	{
		font-family: 'Trebuchet MS', 'Arial', 'Helvetica', sans-serif;
	}
.with-comic-type,
.with-comic-type *
	{
		font-family: 'Comic Sans MS', cursive;
	}
.with-mono-type,
.with-mono-type *
	{
		font-family: 'Courier New', monospace;
	}
.with-serif-type,
.with-serif-type *
	{
		font-family: 'Georgia', serif;
	}
.with-text-shadow
	{
		text-shadow: 0 2px 2px #DDDDDD;
	}
/*
Backgrounds.
*/
.with-bg,
.with-round-bg
	{
		background: #EEEEEE;
	}
.with-round-bg
	{
		-moz-border-radius: 3px;
		-webkit-border-radius: 3px;
		border-radius: 3px;
	}
/*
Border styles.
*/
.with-borders,
.with-round-borders
	{
		border: 1px solid #666666;
	}
.with-round-borders
	{
		-moz-border-radius: 3px;
		-webkit-border-radius: 3px;
		border-radius: 3px;
	}
img.with-borders,
img.with-round-borders
	{
		padding: 5px;
		background: #EEEEEE;
	}
img.with-borders.alignleft,
img.with-borders.alignright,
img.with-round-borders.alignleft,
img.with-round-borders.alignright
	{
		margin-bottom: 15px;
	}
/*
Shadow styles.
*/
.with-box-shadow
	{
		-moz-box-shadow: 1px 1px 1px #999999;
		-webkit-box-shadow: 1px 1px 1px #999999;
		box-shadow: 1px 1px 1px #999999;
	}
.with-box-shadows
	{
		-moz-box-shadow: 1px 1px 1px #999999, -1px -1px 1px #999999;
		-webkit-box-shadow: 1px 1px 1px #999999, -1px -1px 1px #999999;
		box-shadow: 1px 1px 0 #999999, -1px -1px 1px #999999;
	}
/*
Margins & padding.
*/
.with-margins,
ol.with-margins li,
ul.with-margins li,
dl.with-margins li,
dir.with-margins li,
menu.with-margins li
	{
		margin-top: 15px;
		margin-bottom: 15px;
	}
.with-padding,
table.with-padding th,
table.with-padding td
	{
		padding: 10px;
	}
.with-extra-padding,
table.with-extra-padding th,
table.with-extra-padding td
	{
		padding: 20px;
	}
table.with-padding,
table.with-extra-padding
	{
		padding: 0;
	}
/*
Indentations.
*/
.with-indentation
	{
		margin-left: 15px;
	}
.with-line-indentation
	{
		margin-left: 15px;
		padding-left: 15px;
		border-style: dashed;
		border-width: 0 0 0 1px;
	}
.with-paragraph-indentation
	{
		text-indent: 15px;
	}
.with-paragraph-reverse-indentation
	{
		text-indent: -15px;
		padding-left: 15px;
	}
.with-large-first-line
	{
		text-align: left;
	}
.with-large-first-line:first-line
	{
		font-size: 200%;
		line-height: 1.0;
	}
.with-large-first-letter:first-letter
	{
		float: left;
		display: block;
		font-size: 300%;
		line-height: 0.7;
		margin: 0 5px 0 0;
		vertical-align: top;
		text-transform: uppercase;
	}
.with-paragraph-indentation.with-large-first-letter,
.with-paragraph-reverse-indentation.with-large-first-letter
	{
		text-indent: 0;
	}
.with-paragraph-reverse-indentation.with-large-first-letter:first-letter
	{
		margin-left: -15px;
	}
.with-paragraph-indentation.with-large-first-letter:first-letter
	{
		margin-left: 15px;
	}
/*
Easy 1-3rd column widths/margins/padding.
The margin must always be a multiple of 3.
Padding can be any pixel width, does not matter.
The parent container width must be divisible by 2,3,4.
The split widths are calculated by: jquery.easycols.js.
If margins change, set $.easyCols({margin3rds}).
*/
div.with-1-3rd-column-width
	{
		width: 0;
		float: left;
		display: block;
		margin-left: 0;
		margin-right: 15px;
		border: 0 !important;
	}
div.with-1-3rd-column-width.alignright
	{
		float: right;
		margin-right: 0;
		margin-left: 15px;
	}
div.with-1-3rd-column-width.with-bg,
div.with-1-3rd-column-width.with-round-bg,
div.with-1-3rd-column-width.with-padding,
div.with-1-3rd-column-width.with-extra-padding
	{
		padding: 10px;
	}
div.with-1-3rd-column-width.last
	{
		margin-left: 0;
		margin-right: 0;
	}
div.with-1-3rd-column-width > *:first-child,
div.with-1-3rd-column-width > *.alignleft:first-child + *,
div.with-1-3rd-column-width > *.alignright:first-child + *
	{
		margin-top: 0;
	}
/*
Easy 2-3rds column widths/margins/padding.
The margin must always be a multiple of 3.
Padding can be any pixel width, does not matter.
The parent container width must be divisible by 2,3,4.
The split widths are calculated by: jquery.easycols.js.
If margins change, set $.easyCols({margin3rds}).
*/
div.with-2-3rds-column-width
	{
		width: 0;
		float: left;
		display: block;
		margin-left: 0;
		margin-right: 15px;
		border: 0 !important;
	}
div.with-2-3rds-column-width.alignright
	{
		float: right;
		margin-right: 0;
		margin-left: 15px;
	}
div.with-2-3rds-column-width.with-bg,
div.with-2-3rds-column-width.with-round-bg,
div.with-2-3rds-column-width.with-padding,
div.with-2-3rds-column-width.with-extra-padding
	{
		padding: 10px;
	}
div.with-2-3rds-column-width.last
	{
		margin-left: 0;
		margin-right: 0;
	}
div.with-2-3rds-column-width > *:first-child,
div.with-2-3rds-column-width > *.alignleft:first-child + *,
div.with-2-3rds-column-width > *.alignright:first-child + *
	{
		margin-top: 0;
	}
/*
Easy 1-4th column widths/margins/padding.
The margin must always be a multiple of 4.
Padding can be any pixel width, does not matter.
The parent container width must be divisible by 2,3,4.
The split widths are calculated by: jquery.easycols.js.
If margins change, set $.easyCols({margin4ths}).
*/
div.with-1-4th-column-width
	{
		width: 0;
		float: left;
		display: block;
		margin-left: 0;
		margin-right: 16px;
		border: 0 !important;
	}
div.with-1-4th-column-width.alignright
	{
		float: right;
		margin-right: 0;
		margin-left: 16px;
	}
div.with-1-4th-column-width.with-bg,
div.with-1-4th-column-width.with-round-bg,
div.with-1-4th-column-width.with-padding,
div.with-1-4th-column-width.with-extra-padding
	{
		padding: 10px;
	}
div.with-1-4th-column-width.last
	{
		margin-left: 0;
		margin-right: 0;
	}
div.with-1-4th-column-width > *:first-child,
div.with-1-4th-column-width > *.alignleft:first-child + *,
div.with-1-4th-column-width > *.alignright:first-child + *
	{
		margin-top: 0;
	}
/*
Easy 2-4ths column widths/margins/padding.
The margin must always be a multiple of 4.
Padding can be any pixel width, does not matter.
The parent container width must be divisible by 2,3,4.
The split widths are calculated by: jquery.easycols.js.
If margins change, set $.easyCols({margin4ths}).
*/
div.with-2-4ths-column-width
	{
		width: 0;
		float: left;
		display: block;
		margin-left: 0;
		margin-right: 16px;
		border: 0 !important;
	}
div.with-2-4ths-column-width.alignright
	{
		float: right;
		margin-right: 0;
		margin-left: 16px;
	}
div.with-2-4ths-column-width.with-bg,
div.with-2-4ths-column-width.with-round-bg,
div.with-2-4ths-column-width.with-padding,
div.with-2-4ths-column-width.with-extra-padding
	{
		padding: 10px;
	}
div.with-2-4ths-column-width.last
	{
		margin-left: 0;
		margin-right: 0;
	}
div.with-2-4ths-column-width > *:first-child,
div.with-2-4ths-column-width > *.alignleft:first-child + *,
div.with-2-4ths-column-width > *.alignright:first-child + *
	{
		margin-top: 0;
	}
/*
Easy 3-4ths column widths/margins/padding.
The margin must always be a multiple of 4.
Padding can be any pixel width, does not matter.
The parent container width must be divisible by 2,3,4.
The split widths are calculated by: jquery.easycols.js.
If margins change, set $.easyCols({margin4ths}).
*/
div.with-3-4ths-column-width
	{
		width: 0;
		float: left;
		display: block;
		margin-left: 0;
		margin-right: 16px;
		border: 0 !important;
	}
div.with-3-4ths-column-width.alignright
	{
		float: right;
		margin-right: 0;
		margin-left: 16px;
	}
div.with-3-4ths-column-width.with-bg,
div.with-3-4ths-column-width.with-round-bg,
div.with-3-4ths-column-width.with-padding,
div.with-3-4ths-column-width.with-extra-padding
	{
		padding: 10px;
	}
div.with-3-4ths-column-width.last
	{
		margin-left: 0;
		margin-right: 0;
	}
div.with-3-4ths-column-width > *:first-child,
div.with-3-4ths-column-width > *.alignleft:first-child + *,
div.with-3-4ths-column-width > *.alignright:first-child + *
	{
		margin-top: 0;
	}
/*
List styles/icons.
*/
ol.with-bullet-icons,
ul.with-bullet-icons
	{
		list-style: none;
		padding-left: 7px;
	}
ol.with-bullet-icons li,
ul.with-bullet-icons li
	{
		padding-left: 25px;
		background: url('<?php echo $i; ?>/bullet-16.png') no-repeat 0 2px;
	}
ol.with-folder-icons,
ul.with-folder-icons
	{
		list-style: none;
		padding-left: 7px;
	}
ol.with-folder-icons li,
ul.with-folder-icons li
	{
		padding-left: 25px;
		background: url('<?php echo $i; ?>/folder-16.png') no-repeat 0 2px;
	}
ol.with-text-file-icons,
ul.with-text-file-icons
	{
		list-style: none;
		padding-left: 7px;
	}
ol.with-text-file-icons li,
ul.with-text-file-icons li
	{
		padding-left: 25px;
		background: url('<?php echo $i; ?>/text-file-16.png') no-repeat 0 2px;
	}
ol.with-img-file-icons,
ul.with-img-file-icons
	{
		list-style: none;
		padding-left: 7px;
	}
ol.with-img-file-icons li,
ul.with-img-file-icons li
	{
		padding-left: 25px;
		background: url('<?php echo $i; ?>/img-file-16.png') no-repeat 0 2px;
	}
ol.with-check-mark-icons,
ul.with-check-mark-icons
	{
		list-style: none;
		padding-left: 7px;
	}
ol.with-check-mark-icons li,
ul.with-check-mark-icons li
	{
		padding-left: 25px;
		background: url('<?php echo $i; ?>/check-mark-16.png') no-repeat 0 2px;
	}
/*
Table styling.
*/
table.with-tabulation-colors
	{
		background-color: #CCCCCC;
	}
table.with-tabulation-colors tr,
table.with-tabulation-colors tr.odd
	{
		background-color: #EEEEEE;
	}
table.with-tabulation-colors tr.even
	{
		background-color: #FFFFFF;
	}
table.with-tabulation-colors th
	{
		color: #000000;
		background-color: #CCCCCC;
	}
Posted: Tuesday Mar 27th, 2012 at 10:27 am #9229
Staff Member

Hi there. Thanks for your inquiry.

What you’re describing sounds like a task for WordPress/s2Member running in a Multisite Network configuration.
See: http://codex.wordpress.org/Create_A_Network

On a Multisite Network installation, s2Member runs as a separate instance for each Child Blog that it’s activated on. So to answer your question… you can have a Main Site, and you can also have Child Blogs (aka: sub-sites). Each of these sites will run with a separate instance of s2Member.

It’s not possible to run s2Member on a Main Site and have all configuration on the Main Site automatically trickle down into sub-sites. That’s not something either WordPress or s2Member are designed to handle just yet. However, s2Member does support support for API Functions that provide a feasible work-around in some cases.

Please see this article in the s2Member Codex.
See also: http://codex.wordpress.org/Function_Reference/current_user_can_for_blog

Posted: Tuesday Mar 27th, 2012 at 10:20 am #9228
Staff Member

Hi there. Thanks for your inquiry.

First, let me start by saying that s2Member Pro makes this much easier to accomplish, because it integrates One-Time-Offers upon login, where something like this could be easily configured from the Dashboard.

However, to answer your question. This is how you would accomplish this via Hooks/Filters.

Create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
( these are MUST USE plugins, see: http://codex.wordpress.org/Must_Use_Plugins )

<?php
add_filter("ws_plugin__s2member_login_redirect", "my_custom_login_redirect", 10, 2);
function my_custom_login_redirect($redirect, $vars = array())
	{
		// If you want s2Member to perform the redirect, return true.
		// return true;
		
		// Or, if you do NOT want s2Member to perform the redirect, return false.
		// return false;
		
		// Or, if you want s2Member to redirect, but to a custom URL, return that URL.
		// return 'http://www.example.com/reset-password-please/';
		
		// Or, just return what s2Member already says about the matter.
		return $redirect;
	}
?>
Posted: Tuesday Mar 27th, 2012 at 10:13 am #9226
Staff Member

Thank you. I’ve just taken a look at your installation.

I find that you have 27 other plugins active, so this makes it somewhat difficult to troubleshoot s2Member’s functionality as it exists on your installation. If problems persist, I would suggest a test installation within a clean WordPress install, running only s2Member and the default theme for WordPress.

That being said, I found that you’re running DB caching plugins, which are known to cause problems for dynamic updates during and after checkout routines, and for other plugins that attempt frequent updates to User accounts within WordPress. I would try debugging this issue by first disabling any cache plugin that goes above and beyond normal page caching provided by Quick Cache and/or another page caching plugin, such as W3 Total Cache or WP Super Cache. These plugins are fine to run with s2Member, but please disable DB and/or Object caching.

1. I’d steer away from any DB and/or object caching functionality. Particularly object caching.
~ these are known to cause problems for membership sites.

Or, possibly exclude User updates from DB caching.
Exclude: _users|_usermeta

2. Your s2Member log files indicate that s2Member is functioning properly. So this leads me to conclude (at least for now) that another plugin is somehow introducing a conflict either during or after s2Member’s routines are processed.

Notes…
I noticed that you have what looks like some corrupted User/Member Roles. You might consider installing the User Role Editor plugin to inspect the Roles/Capabilities in your installation. s2Member also provides a tool that will allow you to reset your s2Member Roles in case they’ve been damaged by another plugin.

See: Dashboard -› s2Member® -› General Options -› Membership Levels/Labels -> Reset Roles/Capabilities
See also: http://wordpress.org/extend/plugins/user-role-editor/

Notes…
A quick search through your other existing plugins does not reveal any major conflicts. Thus, I still suspect caching is the underlying issue here.

Posted: Tuesday Mar 27th, 2012 at 9:31 am #9217
Staff Member

You could try something like this perhaps. So instead of disabling transitions, you would allow them to occur, but change where the User/Member ends up in this particular scenario.

<?php
add_action("ws_plugin__s2member_before_auto_process_list_server_removals", "my_auto_process_list_server_removal_exclusions");
function my_auto_process_list_server_removal_exclusions($vars)
	{
		if($vars&#91;"mod_new_role"&#93; === "subscriber") // Transition to a special list ID.
			{
				$my_demoted_members_list_ID = "sse4Kjseo"; // MailChimp List ID here.
				$GLOBALS&#91;"WS_PLUGIN__"&#93;&#91;"s2member"&#93;&#91;"o"&#93;&#91;"level0_mailchimp_list_ids"&#93; = $my_demoted_members_list_ID;
				// ^ Updating this configuration value temporarily during this particular scenario.
			}
	}
?>
Posted: Tuesday Mar 27th, 2012 at 9:01 am #9210
Staff Member

Thanks for the update.
I just took a quick look at your site and compared it to a working example here:
http://jason.websharks-inc.net/membership-options/

It appears that your test site has the Pro Form Shortcode wrapped inside a <p><span> tag, which is invalid XHTML. This could be the underlying cause of the issue you’re seeing in IE. I would double check your WordPress Page editor, and perhaps pop the Shortcode in with the HTML tab of your editor, just to make sure there is no extra markup in there. Please let us know if this problem persists.

Posted: Tuesday Mar 27th, 2012 at 8:05 am #9208
Staff Member

Using a BASE HREF tag in your HTML file might do the trick.
See also: http://www.primothemes.com/forums/viewtopic.php?f=4&t=14643&p=32789#p32717

Posted: Tuesday Mar 27th, 2012 at 8:02 am #9207
Staff Member

Hi Philly. Thanks for the follow-up.

I can confirm that changing the file name to s2-o.php does work as expected. The expected outcome is that s2Member’s CSS for Pro Forms is NOT loaded into the CSS file. The CSS file does still load however. It’s just that Pro Form CSS styles are excluded.

If you want to exclude ALL of s2Member’s CSS in one shot. You can simply create this hack file instead.
/wp-content/mu-plugins/s2-hacks.php

<?php
add_action("ws_plugin__s2member_during_add_css", "remove_all_s2_css"); function remove_all_s2_css()
	{
		wp_dequeue_style("ws-plugin--s2member");
	}
?>
Posted: Tuesday Mar 27th, 2012 at 7:52 am #9206
Staff Member

Untested, but you can give this a shot please.

Create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
( these are MUST USE plugins, see: http://codex.wordpress.org/Must_Use_Plugins )

<?php
add_action("ws_plugin__s2member_before_auto_process_list_server_removals", "my_auto_process_list_server_removal_exclusions");
function my_auto_process_list_server_removal_exclusions($vars)
	{
		if($vars&#91;"mod_new_role"&#93; === "subscriber") // Remove, but don't transition them.
			$GLOBALS&#91;"WS_PLUGIN__"&#93;&#91;"s2member"&#93;&#91;"o"&#93;&#91;"custom_reg_auto_opt_out_transitions"&#93; = "0";
	}
?>
Posted: Tuesday Mar 27th, 2012 at 7:41 am #9205
Staff Member

Hi Craig, thanks for your inquiry.

an auto-EOT based on their first login

s2Member Pro supports imporation of Automatic EOT Times, so yes.
Dashboard -› s2Member® -› Import/Export -› User/Member Importation
However, s2Member does NOT yet support any additional importation logic, so it’s not possible to reference the Automatic EOT Time against their first login through an importation.

Here are some possible solutions that come to mind.

1. Instead of “importing”, use s2Member’s Remote Operations API to create these accounts dynamically.
Dashboard -› s2Member® -› API / Scripting -› Remote Operations API

2. Write a custom plugin that sets the EOT Time dynamically, which might Hook into s2Member and/or WordPress in creative ways. For instance, you might do something like:

<?php
$user_id = 123;
$expire_on = strtotime("+30 days"); // 30 days from now.
update_user_option($user_id, "s2member_auto_eot_time", $expire_on);
?>

ideally recurring payments. Are either of these possible?

Sorry, it’s not possible to import a Recurring Payment Profile.

Posted: Tuesday Mar 27th, 2012 at 7:34 am #9204
Staff Member

With some purchases the user is receiving new ccaps and also having their level changed. Would you be able to let me know how to process an email in this circumstance?

Sure. Please use the instructions I posted here for the Modification Email Subject/Message.
http://www.primothemes.com/forums/viewtopic.php?f=4&t=10368&p=33365#p33365

After payment via CC through PayPal the customer is shown a link that says: “Return to ____@_____.com”

Sorry, can you please confirm for me…
You’re referring to PayPal Express Checkout through a Pro Form?, or through a Standard PayPal Button?

Posted: Tuesday Mar 27th, 2012 at 7:26 am #9203
Staff Member

Hi Kezz. Thanks for the follow-up! You’re VERY welcome :-)
~ and thanks again for the KUDOS.

Using Hooks/Filters in your theme is just fine. No problem with that. The only time an MU plugin implementation is *required*, is for s2Member’s JS/CSS Filters, as described here:
http://www.s2member.com/faqs/#s2-faqs-stop-loading-css

Posted: Tuesday Mar 27th, 2012 at 7:12 am #9199
Staff Member

Hi Peter. Thanks for your inquiry.

All Users/Members (Free Subscriber or otherwise), are automatically redirected to the configured Login Welcome Page for s2Member. As with any Post/Page on your site, the Login Welcome Page can be customized with Simple and/or Advanced Conditionals, and other API Functions or Constants made possible by s2Member.

For instance, if you wanted to show Free Subscribers a special message on their Login Welcome Page, you might do something like this in your WordPress Page editor.

[s2If current_user_is(subscriber)]
	You are a Free Subscriber, with the Username: [s2Get user_field="display_name" /]
[/s2If]

See Also: Dashboard -› s2Member® -› API / Scripting -› Simple/Shortcode Conditionals
See Also: Dashboard -› s2Member® -› API / Scripting -› PHP/API Constants

Posted: Tuesday Mar 27th, 2012 at 7:03 am #9198
Staff Member

Can I have a single login on the main page that will take each party to the proper page with the proper access? For example, once a customer becomes a regular client with their own sub-site, can they login on the homepage and be taken to their private site?

Each site in a Multisite Network operates it’s own unique instance of the s2Member plugin. So each Child Blog will have it’s own set of permissions and it’s own content that is protected by the configuration of that specific instance of s2Member, as it’s been configured for that specific Child Blog.

That being said, it is possible for a User/Member to log in from one site in your Network, and not need to log in again for each Child Blog. Edit your /wp-config.php file, and define COOKIE_DOMAIN without the leading www

define('COOKIE_DOMAIN', '.example.com'); // Recognize logged-in Users across all sub-domains.

See also: http://codex.wordpress.org/Editing_wp-config.php#Set_Cookie_Domain

I can see how you bronze, sliver, gold, etc. levels will function effectively for the Recruitment site, but how can I configure S2member so only a particular client as access to their own site?

What you’re describing is what we call a “Multisite Blog Farm”, and in order to run a Multisite Blog Farm (and request support for one), you will need our Network Support License. Please see: http://www.s2member.com/prices/#s2-terms-blog-farming

Will I need to add new levels and rename the level with the client’s name, and then be able to assign access to multiple users for that particular client?

No, not necessary. When s2Member is running a Multisite Blog Farm, new site owners that create Child Blogs in your Network will be granted administrative access to their own installation of WordPress. Only (YOU, as the Super Admin), and the original creator of the Child Blog will have administrative access. This access to the customer (i.e. the Child Blog administrator) can be revoked from your Main Site, by removing and/or changing their Role for the Child Blog in question.

Posted: Tuesday Mar 27th, 2012 at 6:43 am #9197
Staff Member

So sorry, we don’t offer custom installations and/or custom programming services here at s2Member.com. However, it sounds like s2Member’s Remote Operations API is what you need here.

If you have a developer working with you, they might be able to integrate your existing shopping cart system with s2Member, so that each new customer you process will be given a Level #1 account in your s2Member installation automatically. This can be accomplished in the following way.

1. Have your developer look at s2Member’s Remote Operations API in the Dashboard.
Dashboard -› s2Member® -› API / Scripting -› Remote Operations API

2. Ask your developer to write a custom script that creates an s2Member account for each new customer using the s2Member Remote Operations API. A call to s2Member’s Remote Operations API, to create a new User account, should occur each time you process a transaction outside of s2Member.

3. Protect your files with s2Member at Membership Level #1. New accounts created automatically through the Remote Operations API, should be created with Level #1 access.

The end result… All new customers purchasing outside of your s2Member installation, will have an s2Member account created for them automatically, with access to Membership Level #1.
Posted: Tuesday Mar 27th, 2012 at 6:30 am #9196
Staff Member

Thanks for the heads up on this thread…

Everything here is looking good. So let’s take this to the next step please.

Please submit a Dashboard login for us here so we can run diagnostics on your installation.
s2Member® » Private Contact Form

Posted: Tuesday Mar 27th, 2012 at 6:17 am #9195
Staff Member

Regarding that central IPN example file…
you might transform it a bit and do something like this.

1. Configure the top of this file (as seen below).
2. Upload this file to your server.
3. Configure your 3rd party integration to forward IPNs to this script.

Result… this script will receive IPNs being forwarded from your 3rd party integration. This script modifies important variables such as “custom” and “item_number” to a format that s2Member can understand. This script will then forward the IPN again (after having modified it a bit), over to your actual s2Member installation.

<?php
/*
---- Configuration. -------------------------------------------------------------------------------------------------------*/

/* s2Member installation domain. */
$config&#91;"custom"&#93; = "www.mydomain.com";

/* s2Member Membership Level# */
$config&#91;"item_number"&#93; = "1";

/* s2Member Proxy IPN URL handler. */
$config&#91;"proxy_ipn_handler_url"&#93; = /* You'll get this from Dashboard: `s2Member -> PayPal Options -> IPN Integration -> Proxy IPN URL`. */
"http://www.mydomain.com/?s2member_paypal_notify=1&s2member_paypal_proxy=proxy&s2member_paypal_proxy_verification=c28831a2ddfdeexXX2f8b722efa0";

/*
---- Do NOT edit anything below, unless you know what you're doing. --------------------------------------------------------*/
@ignore_user_abort(true);
header("HTTP/1.0 200 OK");
header("Content-Type: text/plain; charset=utf-8");
eval /* Clean buffers. */('while (@ob_end_clean ());');

if( /* No ``$_POST`` vars? */empty($_POST) || !is_array($_POST))
	exit /* Exit now. There is nothing to process. */();
	
$_p = (get_magic_quotes_gpc()) ? stripslashes_deep($_POST) : $_POST;
$_p = trim_deep /* Now trim this array deeply. */($_p);

$_paypal_ipn_server_ip = $_ip = /* Forge IP address to match the PayPal® IPN server here. */ "216.113.188.202";
/* See list of IPs here: <https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/howto_api_golivechecklist>. */

$_p["custom"] = $config["custom"]; $_p["item_number"] = $config["item_number"];
echo (trim(curlpsr($config["proxy_ipn_handler_url"], http_build_query($_p, null, "&"), 20, 20, array("REMOTE_ADDR: ".$_ip, "HTTP_X_FORWARDED_FOR: ".$_ip))));

unset($_paypal_ipn_server_ip, $_ip);
/*
---- Do NOT edit anything below, unless you know what you're doing. --------------------------------------------------------*/
function trim_deep($value = FALSE)
	{
		return is_array($value) ? array_map("trim_deep", $value) : trim((string)$value);
	}
function stripslashes_deep($value = FALSE)
	{
		return is_array($value) ? array_map("stripslashes_deep", $value) : stripslashes((string)$value);
	}
function curlpsr($url = FALSE, $post_vars = array(), $max_con_secs = 20, $max_stream_secs = 20, $headers = array())
	{
		if(($url = trim($url)) && ($curl = curl_init()))
			{
				if /* Because cURL can't deal with complex arrays. */(is_array($post_vars))
					$post_vars = http_build_query($post_vars);
				$follow = (!ini_get("safe_mode") && !ini_get("open_basedir"));
				curl_setopt_array($curl, array(CURLOPT_URL => $url, CURLOPT_POST => true, CURLOPT_CONNECTTIMEOUT => $max_con_secs, CURLOPT_TIMEOUT => $max_stream_secs, CURLOPT_HEADER => false, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => $headers, CURLOPT_POSTFIELDS => $post_vars, CURLOPT_FOLLOWLOCATION => $follow, CURLOPT_MAXREDIRS => (($follow) ? 5 : 0), CURLOPT_ENCODING => "", CURLOPT_VERBOSE => false, CURLOPT_FAILONERROR => true, CURLOPT_FORBID_REUSE => true, CURLOPT_SSL_VERIFYPEER => false));
				$o = trim(curl_exec($curl));
				curl_close($curl);
			}
		return (!empty($o)) ? $o : false;
	}
?>
Posted: Tuesday Mar 27th, 2012 at 5:41 am #9192
Staff Member

Thanks for bringing this to my attention.

That hack stopped working with the release of s2Member v120219.

Quick fix: change the name of your hack file, to: s2-o.php

The reason it stopped working is because of s2Member’s /s2member-o.php WordPress loader for JS/CSS files, which loads only the s2Member plugin, and excludes all others to streamline the delivery of dynamic JS/CSS files for s2Member. When /s2member-o.php loads WordPress, it only loads the s2Member plugin, and excludes all others, including all MU plugins (which will also exclude an s2-hacks.php file on purpose).

So, in short, the hack still works, but it requires a special MU plugin file name.

While s2Member does NOT load any other plugins through /s2member-o.php, it does allow for some special MU plugin file names to be used, so that in special cases, it’s still possible for developers to hack into the /s2member-o.php file. These special MU plugin files are ALWAYS loaded, even when it’s /s2member-o.php

/mu-plugins/s2member-o.php
/mu-plugins/s2member-a.php
/mu-plugins/s2-o.php
/mu-plugins/s2-a.php

I’ve updated the code sample here to include this important requirement.
http://www.s2member.com/faqs/#s2-faqs-stop-loading-css

You may create this directory and file: /wp-content/mu-plugins/s2-o.php

<?php
add_action("ws_plugin__s2member_after_loaded", "remove_s2_pro_css"); function remove_s2_pro_css()
	{
		remove_action("ws_plugin__s2member_during_css", "c_ws_plugin__s2member_pro_css_js::css");
	}
?>
Posted: Friday Mar 23rd, 2012 at 7:16 am #8898
Staff Member

Thanks for the follow-up.

Interesting. It might be worth taking a look at your custom application again, to see what fields it is actually searching through in the database. This might be the difference you’re seeing. WordPress with s2Member installed will search only through the following details for each user.

user_login
user_nicename
user_email
user_url
display_name
s2member_subscr_id
s2member_custom
s2member_custom_fields
Posted: Friday Mar 23rd, 2012 at 7:05 am #8895
Staff Member

Hi Patrice. You’re very welcome.

So sorry, that additional modification you requested would take a more in-depth approach (i.e. more than just a line or two of code). In order to accomplish this, you would need to make some further adjustments around and just below line #206 inside users-list.inc.php.

See also: s2Member® » Support Policy » Fine Lines

Posted: Friday Mar 23rd, 2012 at 6:43 am #8889
Staff Member

Hi Will. I’ve just taken a look at your site.

Interesting. I’ve not yet been able to reproduce the issue that you reported. I reviewed your log files, your existing userbase and even created a test account. Everything seems to be working properly from my end.

Your s2Member log files indicate that all customers are processing successfully, and that all Custom Capabilities are being applied properly. I also tested with username “TestWSInc”, and Custom Capability “asl_expansion”. Upon accessing the account page, I receive a link to that CEU. Upon clicking that link I am granted access.

Sorry, please let us know what we’re missing? Thanks!

Viewing 25 replies - 1,526 through 1,550 (of 1,909 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.