Community Support Forums — WordPress® ( Users Helping Users ) — 2011-12-20T09:52:34-05:00 http://www.primothemes.com/forums/feed.php?f=40&t=13315 2011-12-20T09:52:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13315&p=58080#p58080 <![CDATA[s2Member v111220 / Source Code: s2member-p...]]>
s2Member v111220
Source Code: s2member-pro\includes\menu-pages\ccbill-menu-pages-s.js
Docs updated: December 20, 2011, 9:52 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — December 20th, 2011, 9:52 am


]]>
2011-12-07T01:05:56-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13315&p=55762#p55762 <![CDATA[s2Member v111206 / Source Code: s2member-p...]]>
s2Member v111206
Source Code: s2member-pro\includes\menu-pages\ccbill-menu-pages-s.js
Docs updated: December 7, 2011, 1:06 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — December 7th, 2011, 1:05 am


]]>
2011-11-05T19:28:25-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13315&p=52135#p52135 <![CDATA[s2Member v111105 / Source Code: s2member-p...]]>
s2Member v111105
Source Code: s2member-pro\includes\menu-pages\ccbill-menu-pages-s.js
Docs updated: November 5, 2011, 8:28 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — November 5th, 2011, 7:28 pm


]]>
2011-10-29T20:38:17-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13315&p=50231#p50231 <![CDATA[s2Member v111029 / Source Code: s2member-p...]]>
s2Member v111029
Source Code: s2member-pro\includes\menu-pages\ccbill-menu-pages-s.js
Docs updated: October 29, 2011, 9:38 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 29th, 2011, 8:38 pm


]]>
2011-10-17T15:42:25-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13315&p=48027#p48027 <![CDATA[s2Member v111017 / Source Code: s2member-p...]]>
s2Member v111017
Source Code: s2member-pro\includes\menu-pages\ccbill-menu-pages-s.js
Docs updated: October 17, 2011, 1:42 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 17th, 2011, 3:42 pm


]]>
2011-10-11T14:38:19-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13315&p=46427#p46427 <![CDATA[s2Member v111011 / Source Code: s2member-p...]]>
s2Member v111011
Source Code: s2member-pro\includes\menu-pages\ccbill-menu-pages-s.js
Docs updated: October 11, 2011, 12:38 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 11th, 2011, 2:38 pm


]]>
2011-10-03T15:50:55-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13315&p=44556#p44556 <![CDATA[s2Member v111003 / Source Code: s2member-p...]]>
s2Member v111003
Source Code: s2member-pro\includes\menu-pages\ccbill-menu-pages-s.js
Docs updated: October 3, 2011, 1:50 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 3rd, 2011, 3:50 pm


]]>
2011-10-03T03:44:49-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13315&p=43263#p43263 <![CDATA[s2Member v111002 / Source Code: s2member-p...]]>
s2Member v111002
Source Code: s2member-pro\includes\menu-pages\ccbill-menu-pages-s.js
Docs updated: October 3, 2011, 1:44 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 3rd, 2011, 3:44 am


]]>
2011-09-27T05:29:08-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13315&p=41505#p41505 <![CDATA[s2Member v110927 / Source Code: s2member-p...]]>
s2Member v110927
Source Code: s2member-pro\includes\menu-pages\ccbill-menu-pages-s.js
Docs updated: September 27, 2011, 3:29 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 27th, 2011, 5:29 am


]]>
2011-09-26T21:05:39-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13315&p=40261#p40261 <![CDATA[s2Member v110926 / Source Code: s2member-p...]]>
s2Member v110926
Source Code: s2member-pro\includes\menu-pages\ccbill-menu-pages-s.js
Docs updated: September 26, 2011, 7:05 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 26th, 2011, 9:05 pm


]]>
2011-09-17T17:04:55-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13315&p=38405#p38405 <![CDATA[s2Member v110915 / Source Code: s2member-p...]]>
s2Member v110915
Source Code: s2member-pro\includes\menu-pages\ccbill-menu-pages-s.js
Docs updated: September 17, 2011, 3:05 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 17th, 2011, 5:04 pm


]]>
2011-09-14T01:30:04-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13315&p=36983#p36983 <![CDATA[s2Member v110913 / Source Code: s2member-p...]]>
s2Member v110913
Source Code: s2member-pro\includes\menu-pages\ccbill-menu-pages-s.js
Docs updated: September 13, 2011, 11:30 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 14th, 2011, 1:30 am


]]>
2011-09-13T12:05:00-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13315&p=35711#p35711 <![CDATA[s2Member v110912 / Source Code: s2member-p...]]>
s2Member v110912
Source Code: s2member-pro\includes\menu-pages\ccbill-menu-pages-s.js
Docs updated: September 13, 2011, 10:05 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 13th, 2011, 12:05 pm


]]>
2011-08-15T15:18:44-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13315&p=31819#p31819 <![CDATA[s2Member v110815 / Source Code: s2member-p...]]>
s2Member v110815
Source Code: s2member-pro\includes\menu-pages\ccbill-menu-pages-s.js
Docs updated: August 15, 2011, 4:18 pm

Open for public discussion.
(!-- s-words :: --)Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code jQuery(window).load(function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli'+location.hash).addClass('hilite'); }); jQuery(window).bind('hashchange', function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli').removeClass('hilite'); jQuery('olli'+location.hash).addClass('hilite'); }); [ full view ]s2member-pro\includes\menu-pages\ccbill-menu-pages-s.js /** * Core JavaScript routines for ccBill® menu pages. * * Copyright: © 2009-2011 * {@link http://www.websharks-inc.com/ WebSharks, Inc.} * ( coded in the USA ) * * This WordPress® plugin ( s2Member Pro ) is comprised of two parts: * * o (1) Its PHP code is licensed under the GPL license, as is WordPress®. * 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: {@link http://www.gnu.org/licenses/}. * * o (2) All other parts of ( s2Member Pro ); including, but not limited to: * the CSS code, some JavaScript code, images, and design; * are licensed according to the license purchased. * See: {@link http://www.s2member.com/prices/} * * Unless you have our prior written consent, you must NOT directly or indirectly license, * sub-license, sell, resell, or provide for free; part (2) of the s2Member Pro Module; * or make an offer to do any of these things. All of these things are strictly * prohibited with part (2) of the s2Member Pro Module. * * Your purchase of s2Member Pro includes free lifetime upgrades via s2Member.com * ( i.e. new features, bug fixes, updates, improvements ); along with full access * to our video tutorial library: {@link http://www.s2member.com/videos/} * * @package s2Member\Menu_Pages * @since 1.5 */ /* These routines are all specific to this software. */ jQuery(document).ready (function($) { var esc_attr = esc_html = function(str) /* Convert special characters. */ { return String(str).replace (/"/g, '"').replace (/\/g, '<').replace (/\/g, '>'); }; /**/ if (location.href.match (/page\=ws-plugin--s2member-pro-ccbill-ops/)) { $('select#ws-plugin--s2member-auto-eot-system-enabled').change (function() { var $this = $(this), val = $this.val (); var $viaCron = $('p#ws-plugin--s2member-auto-eot-system-enabled-via-cron'); /**/ if (val == 2) /* Display Cron instructions. */ $viaCron.show () else /* Hide instructions. */ $viaCron.hide (); }); } /**/ else if (location.href.match (/page\=ws-plugin--s2member-pro-ccbill-buttons/)) { $('div.ws-menu-page select[id]').filter (function() /* Filter all select elements with an id. */ { return this.id.match (/^ws-plugin--s2member-pro-level[1-9][0-9]*-term$/); }).change (function() { var button = this.id.replace (/^ws-plugin--s2member-pro-(.+?)-term$/g, '$1'); /**/ var trialDisabled = ($(this).val ().split ('-')[2].replace (/[^0-1]/g, '') === '0') ? 1 : 0; /**/ $('p#ws-plugin--s2member-pro-' + button + '-trial-line').css ('display', (trialDisabled ? 'none' : '')); $('span#ws-plugin--s2member-pro-' + button + '-trial-then').css ('display', (trialDisabled ? 'none' : '')); /**/ (trialDisabled) ? $('input#ws-plugin--s2member-pro-' + button + '-trial-period').val (0) : null; (trialDisabled) ? $('input#ws-plugin--s2member-pro-' + button + '-trial-amount').val ('0.00') : null; }); /**/ $('div.ws-menu-page input[id]').filter (function() /* Filter all input elements with an id. */ { return this.id.match (/^ws-plugin--s2member-pro-level[1-9][0-9]*-ccaps$/); }).keyup (function() { var value = this.value.replace (/^(-all|-al|-a|-)[;,]*/gi, ''), _all = (this.value.match (/^(-all|-al|-a|-)[;,]*/i)) ? '-all,' : ''; if (value.match (/[^a-z_0-9,]/)) /* Only if there is a problem with the actual values; because this causes interruptions. */ this.value = _all + $.trim ($.trim (value).replace (/[ \-]/g, '_').replace (/[^a-z_0-9,]/gi, '').toLowerCase ()); }); /**/ ws_plugin__s2member_pro_ccbillButtonGenerate = function(button) /* Handles ccBill® Button Generation. */ { var shortCodeTemplate = '[s2Member-Pro-ccBill-Button %%attrs%% image="default" output="anchor" /]', shortCodeTemplateAttrs = '', labels = {}; /**/ eval("?php echo c_ws_plugin__s2member_utils_strings:: esc_dq ( $vars [ 'labels' ] ) ; ?"); /**/ var shortCode = $('input#ws-plugin--s2member-pro-' + button + '-shortcode'); /**/ var level = button.replace (/^level/, ''); /* Just strip the button name to get the Level number. */ var label = labels['level' + level].replace (/"/g, ""); /* Labels may NOT contain double-quotes. */ var desc = $.trim ($('input#ws-plugin--s2member-pro-' + button + '-desc').val ().replace (/"/g, "")); /**/ var trialAmount = $('input#ws-plugin--s2member-pro-' + button + '-trial-amount').val ().replace (/[^0-9\.]/g, ''); var trialPeriod = $('input#ws-plugin--s2member-pro-' + button + '-trial-period').val ().replace (/[^0-9]/g, ''); var trialTerm = $('select#ws-plugin--s2member-pro-' + button + '-trial-term').val ().replace (/[^A-Z]/g, ''); /**/ var regAmount = $('input#ws-plugin--s2member-pro-' + button + '-amount').val ().replace (/[^0-9\.]/g, ''); var regPeriod = $('select#ws-plugin--s2member-pro-' + button + '-term').val ().split ('-')[0].replace (/[^0-9]/g, ''); var regTerm = $('select#ws-plugin--s2member-pro-' + button + '-term').val ().split ('-')[1].replace (/[^A-Z]/g, ''); var regRecur = $('select#ws-plugin--s2member-pro-' + button + '-term').val ().split ('-')[2].replace (/[^0-1]/g, ''); /**/ var currencyCode = $('select#ws-plugin--s2member-pro-' + button + '-currency').val ().replace (/[^A-Z]/g, ''); /**/ var cCaps = $.trim ($.trim ($('input#ws-plugin--s2member-pro-' + button + '-ccaps').val ()).replace (/^(-all|-al|-a|-)[;,]*/gi, '').replace (/[ \-]/g, '_').replace (/[^a-z_0-9,]/gi, '').toLowerCase ()); cCaps = ($.trim ($('input#ws-plugin--s2member-pro-' + button + '-ccaps').val ()).match (/^(-all|-al|-a|-)[;,]*/i)) ? ((cCaps) ? '-all,' : '-all') + cCaps.toLowerCase () : cCaps.toLowerCase (); /**/ trialPeriod = (!regRecur || regRecur === '0') ? '0' : trialPeriod; /* Buy Now / Non-Recurring is absolutely NOT compatible w/ Trial Periods. */ trialAmount = (!trialAmount || isNaN(trialAmount) || trialAmount 0.01 || trialPeriod = 0) ? '0' : trialAmount; /* Check Trial Amount. */ /**/ var levelCcapsPer = (!regRecur || regRecur === '0') ? level + ':' + cCaps + ':' + regPeriod + ' ' + regTerm : level + ':' + cCaps; levelCcapsPer = levelCcapsPer.replace (/\:+$/g, ''); /* Clean any trailing separators from this string. */ /**/ if (trialAmount !== '0' && (isNaN(trialAmount) || trialAmount 2.95)) { alert('— Oops, a slight problem: —\n\nWhen provided, Trial Amount must be = 2.95'); return false; } else if (trialAmount !== '0' && trialAmount 100.00) /* $100.00 maximum. */ { alert('— Oops, a slight problem: —\n\nMaximum Trial Amount is: 100.00'); return false; } else if (trialTerm === 'D' && trialPeriod 0 && trialPeriod 2) /* Min: 2. */ { alert('— Oops, a slight problem: —\n\nMinimum Trial Days is: 2.'); return false; } else if (trialTerm === 'D' && trialPeriod 365) /* Max: 365 days. */ { alert('— Oops, a slight problem: —\n\nMaximum Trial Days is: 365.'); return false; } else if (!regAmount || isNaN(regAmount) || regAmount 2.95) { alert('— Oops, a slight problem: —\n\nAmount must be = 2.95'); return false; } else if (regAmount 100.00) /* $100.00 maximum. */ { alert('— Oops, a slight problem: —\n\nMaximum Amount is: 100.00'); return false; } else if (!desc) /* Each Button should have a Description. */ { alert('— Oops, a slight problem: —\n\nPlease type a Description for this Button.'); return false; } /**/ shortCodeTemplateAttrs += 'level="' + esc_attr(level) + '" ccaps="' + esc_attr(cCaps) + '" desc="' + esc_attr(desc) + '" cc="' + esc_attr(currencyCode) + '" custom="?php echo c_ws_plugin__s2member_utils_strings:: esc_sq ( esc_attr ( $_SERVER [ "HTTP_HOST" ] ) ) ; ?"'; shortCodeTemplateAttrs += ' ta="' + esc_attr(trialAmount) + '" tp="' + esc_attr(trialPeriod) + '" tt="' + esc_attr(trialTerm) + '" ra="' + esc_attr(regAmount) + '" rp="' + esc_attr(regPeriod) + '" rt="' + esc_attr(regTerm) + '" rr="' + esc_attr(regRecur) + '"'; shortCode.val (shortCodeTemplate.replace (/%%attrs%%/, shortCodeTemplateAttrs)); /**/ alert('Your Button has been generated.\nPlease copy/paste the Shortcode Format into your Membership Options Page.'); /**/ shortCode.each (function() /* Focus and select the recommended Shortcode. */ { this.focus (), this.select (); }); /**/ return false; }; /**/ ws_plugin__s2member_pro_ccbillSpButtonGenerate = function() /* Handles ccBill® Button Generation for Specific Post/Page Access. */ { var shortCodeTemplate = '[s2Member-Pro-ccBill-Button %%attrs%% image="default" output="button" /]', shortCodeTemplateAttrs = ''; /**/ var shortCode = $('input#ws-plugin--s2member-pro-sp-shortcode'); /**/ var leading = $('select#ws-plugin--s2member-pro-sp-leading-id').val ().replace (/[^0-9]/g, ''); var additionals = $('select#ws-plugin--s2member-pro-sp-additional-ids').val () || []; var hours = $('select#ws-plugin--s2member-pro-sp-hours').val ().replace (/[^0-9]/g, ''); var regAmount = $('input#ws-plugin--s2member-pro-sp-amount').val ().replace (/[^0-9\.]/g, ''); var desc = $.trim ($('input#ws-plugin--s2member-pro-sp-desc').val ().replace (/"/g, '')); var currencyCode = $('select#ws-plugin--s2member-pro-sp-currency').val ().replace (/[^A-Z]/g, ''); /**/ if (!leading) /* Must have a Leading Post/Page ID to work with. Otherwise, Link generation will fail. */ { alert('— Oops, a slight problem: —\n\nPlease select a Leading Post/Page.\n\n*Tip* If there are no Posts/Pages in the menu, it\'s because you\'ve not configured s2Member for Specific Post/Page Access yet. See: s2Member - Restriction Options - Specific Post/Page Access.'); return false; } else if (!regAmount || isNaN(regAmount) || regAmount 2.95) { alert('— Oops, a slight problem: —\n\nAmount must be = 2.95'); return false; } else if (regAmount 100.00) /* $100.00 maximum. */ { alert('— Oops, a slight problem: —\n\nMaximum Amount is: 100.00'); return false; } else if (!desc) /* Each Button should have a Description. */ { alert('— Oops, a slight problem: —\n\nPlease type a Description for this Button.'); return false; } /**/ for (var i = 0, ids = leading; i additionals.length; i++) if (additionals[i] && additionals[i] !== leading) ids += ',' + additionals[i]; /**/ var spIdsHours = 'sp:' + ids + ':' + hours; /* Combined sp:ids:expiration hours. */ /**/ shortCodeTemplateAttrs += 'sp="1" ids="' + esc_attr(ids) + '" exp="' + esc_attr(hours) + '" desc="' + esc_attr(desc) + '" cc="' + esc_attr(currencyCode) + '"'; shortCodeTemplateAttrs += ' custom="?php echo c_ws_plugin__s2member_utils_strings:: esc_sq ( esc_attr ( $_SERVER [ "HTTP_HOST" ] ) ) ; ?" ra="' + esc_attr(regAmount) + '"'; shortCode.val (shortCodeTemplate.replace (/%%attrs%%/, shortCodeTemplateAttrs)); /**/ alert('Your Button has been generated.\nPlease copy/paste the Shortcode Format into your WordPress® Editor.'); /**/ shortCode.each (function() /* Focus and select the recommended Shortcode. */ { this.focus (), this.select (); }); /**/ return false; }; /**/ ws_plugin__s2member_pro_ccbillRegLinkGenerate = function() /* Handles ccBill® Link Generation. */ { var level = $('select#ws-plugin--s2member-pro-reg-link-level').val ().replace (/[^0-9]/g, ''); var subscrID = $.trim ($('input#ws-plugin--s2member-pro-reg-link-subscr-id').val ()); var custom = $.trim ($('input#ws-plugin--s2member-pro-reg-link-custom').val ()); var cCaps = $.trim ($.trim ($('input#ws-plugin--s2member-pro-reg-link-ccaps').val ()).replace (/[ \-]/g, '_').replace (/[^a-z_0-9,]/gi, '').toLowerCase ()); var fixedTerm = $.trim ($('input#ws-plugin--s2member-pro-reg-link-fixed-term').val ().replace (/[^A-Z 0-9]/gi, '').toUpperCase ()); var $link = $('p#ws-plugin--s2member-pro-reg-link'), $loading = $('img#ws-plugin--s2member-pro-reg-link-loading'); /**/ var levelCcapsPer = (fixedTerm && !fixedTerm.match (/L$/)) ? level + ':' + cCaps + ':' + fixedTerm : level + ':' + cCaps; levelCcapsPer = levelCcapsPer.replace (/\:+$/g, ''); /* Clean any trailing separators from this string. */ /**/ if (!subscrID) /* We must have a Paid Subscr. ID value. */ { alert('— Oops, a slight problem: —\n\nPaid Subscr. ID is a required value.'); return false; } else if (!custom || custom.indexOf ('?php echo c_ws_plugin__s2member_utils_strings:: esc_sq ( $_SERVER [ "HTTP_HOST" ] ) ; ?') !== 0) { alert('— Oops, a slight problem: —\n\nThe Custom Value MUST start with your domain name.'); return false; } else if (fixedTerm && !fixedTerm.match (/^[1-9]+ (D|W|M|Y|L)$/)) /* Check format. */ { alert('— Oops, a slight problem: —\n\nThe Fixed Term Length is not formatted properly.'); return false; } /**/ $link.hide (), $loading.show (), $.post (ajaxurl, {action: 'ws_plugin__s2member_reg_access_link_via_ajax', ws_plugin__s2member_reg_access_link_via_ajax: '?php echo c_ws_plugin__s2member_utils_strings:: esc_sq ( wp_create_nonce ( "ws-plugin--s2member-reg-access-link-via-ajax" ) ) ; ?', s2member_reg_access_link_subscr_gateway: 'ccbill', s2member_reg_access_link_subscr_id: subscrID, s2member_reg_access_link_custom: custom, s2member_reg_access_link_item_number: levelCcapsPer}, function(response) { $link.show ().html ('a href="' + esc_attr(response) + '" target="_blank" rel="external"' + esc_html(response) + '/a'), $loading.hide (); }); /**/ return false; }; /**/ ws_plugin__s2member_pro_ccbillSpLinkGenerate = function() /* Handles ccBill® Link Generation. */ { var leading = $('select#ws-plugin--s2member-pro-sp-link-leading-id').val ().replace (/[^0-9]/g, ''); var additionals = $('select#ws-plugin--s2member-pro-sp-link-additional-ids').val () || []; var hours = $('select#ws-plugin--s2member-pro-sp-link-hours').val ().replace (/[^0-9]/g, ''); var $link = $('p#ws-plugin--s2member-pro-sp-link'), $loading = $('img#ws-plugin--s2member-pro-sp-link-loading'); /**/ if (!leading) /* Must have a Leading Post/Page ID to work with. Otherwise, Link generation will fail. */ { alert('— Oops, a slight problem: —\n\nPlease select a Leading Post/Page.\n\n*Tip* If there are no Posts/Pages in the menu, it\'s because you\'ve not configured s2Member for Specific Post/Page Access yet. See: s2Member - Restriction Options - Specific Post/Page Access.'); return false; } /**/ for (var i = 0, ids = leading; i additionals.length; i++) if (additionals[i] && additionals[i] !== leading) ids += ',' + additionals[i]; /**/ $link.hide (), $loading.show (), $.post (ajaxurl, {action: 'ws_plugin__s2member_sp_access_link_via_ajax', ws_plugin__s2member_sp_access_link_via_ajax: '?php echo c_ws_plugin__s2member_utils_strings:: esc_sq ( wp_create_nonce ( "ws-plugin--s2member-sp-access-link-via-ajax" ) ) ; ?', s2member_sp_access_link_ids: ids, s2member_sp_access_link_hours: hours}, function(response) { $link.show ().html ('a href="' + esc_attr(response) + '" target="_blank" rel="external"' + esc_html(response) + '/a'), $loading.hide (); }); /**/ return false; }; } }); [ full view ]s2member-pro\includes\menu-pages\ccbill-menu-pages-s.js Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)

Statistics: Posted by System Robot — August 15th, 2011, 3:18 pm


]]>
2011-07-11T17:37:15-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13315&p=27981#p27981 <![CDATA[s2Member v110710 / Source Code: s2member-p...]]>
s2Member v110710
Source Code: s2member-pro\includes\menu-pages\ccbill-menu-pages-s.js
Docs updated: July 11, 2011, 6:37 pm

Open for public discussion.
(!-- s-words :: --)Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code jQuery(window).load(function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli'+location.hash).addClass('hilite'); }); jQuery(window).bind('hashchange', function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli').removeClass('hilite'); jQuery('olli'+location.hash).addClass('hilite'); }); [ full view ]s2member-pro\includes\menu-pages\ccbill-menu-pages-s.js /** * Core JavaScript routines for ccBill® menu pages. * * Copyright: © 2009-2011 * {@link http://www.websharks-inc.com/ WebSharks, Inc.} * ( coded in the USA ) * * This WordPress® plugin ( s2Member Pro ) is comprised of two parts: * * o (1) Its PHP code is licensed under the GPL license, as is WordPress®. * 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: {@link http://www.gnu.org/licenses/}. * * o (2) All other parts of ( s2Member Pro ); including, but not limited to: * the CSS code, some JavaScript code, images, and design; * are licensed according to the license purchased. * See: {@link http://www.s2member.com/prices/} * * Unless you have our prior written consent, you must NOT directly or indirectly license, * sub-license, sell, resell, or provide for free; part (2) of the s2Member Pro Module; * or make an offer to do any of these things. All of these things are strictly * prohibited with part (2) of the s2Member Pro Module. * * Your purchase of s2Member Pro includes free lifetime upgrades via s2Member.com * ( i.e. new features, bug fixes, updates, improvements ); along with full access * to our video tutorial library: {@link http://www.s2member.com/videos/} * * @package s2Member\Menu_Pages * @since 1.5 */ /* These routines are all specific to this software. */ jQuery(document).ready (function($) { var esc_attr = esc_html = function(str) /* Convert special characters. */ { return String(str).replace (/"/g, '"').replace (/\/g, '<').replace (/\/g, '>'); }; /**/ if (location.href.match (/page\=ws-plugin--s2member-pro-ccbill-ops/)) { $('select#ws-plugin--s2member-auto-eot-system-enabled').change (function() { var $this = $(this), val = $this.val (); var $viaCron = $('p#ws-plugin--s2member-auto-eot-system-enabled-via-cron'); /**/ if (val == 2) /* Display Cron instructions. */ $viaCron.show () else /* Hide instructions. */ $viaCron.hide (); }); } /**/ else if (location.href.match (/page\=ws-plugin--s2member-pro-ccbill-buttons/)) { $('div.ws-menu-page select[id]').filter (function() /* Filter all select elements with an id. */ { return this.id.match (/^ws-plugin--s2member-pro-level[1-9][0-9]*-term$/); }).change (function() { var button = this.id.replace (/^ws-plugin--s2member-pro-(.+?)-term$/g, '$1'); /**/ var trialDisabled = ($(this).val ().split ('-')[2].replace (/[^0-1]/g, '') === '0') ? 1 : 0; /**/ $('p#ws-plugin--s2member-pro-' + button + '-trial-line').css ('display', (trialDisabled ? 'none' : '')); $('span#ws-plugin--s2member-pro-' + button + '-trial-then').css ('display', (trialDisabled ? 'none' : '')); /**/ (trialDisabled) ? $('input#ws-plugin--s2member-pro-' + button + '-trial-period').val (0) : null; (trialDisabled) ? $('input#ws-plugin--s2member-pro-' + button + '-trial-amount').val ('0.00') : null; }); /**/ $('div.ws-menu-page input[id]').filter (function() /* Filter all input elements with an id. */ { return this.id.match (/^ws-plugin--s2member-pro-level[1-9][0-9]*-ccaps$/); }).keyup (function() { var value = this.value.replace (/^\+/, ''), plus = (this.value.match (/^\+/)) ? '+' : ''; if (value.match (/[^a-z_0-9,]/)) /* Only if there is a problem; because this causes interruptions. */ this.value = plus + $.trim ($.trim (value).replace (/[ \-]/g, '_').replace (/[^A-Z_0-9,]/gi, '').toLowerCase ()); }); /**/ ws_plugin__s2member_pro_ccbillButtonGenerate = function(button) /* Handles ccBill® Button Generation. */ { var shortCodeTemplate = '[s2Member-Pro-ccBill-Button %%attrs%% image="default" output="anchor" /]', shortCodeTemplateAttrs = '', labels = {}; /**/ eval("?php echo c_ws_plugin__s2member_utils_strings:: esc_dq ( $vars [ 'labels' ] ) ; ?"); /**/ var shortCode = $('input#ws-plugin--s2member-pro-' + button + '-shortcode'); /**/ var level = button.replace (/^level/, ''); /* Just strip the button name to get the Level number. */ var label = labels['level' + level].replace (/"/g, ""); /* Labels may NOT contain double-quotes. */ var desc = $.trim ($('input#ws-plugin--s2member-pro-' + button + '-desc').val ().replace (/"/g, "")); /**/ var trialAmount = $('input#ws-plugin--s2member-pro-' + button + '-trial-amount').val ().replace (/[^0-9\.]/g, ''); var trialPeriod = $('input#ws-plugin--s2member-pro-' + button + '-trial-period').val ().replace (/[^0-9]/g, ''); var trialTerm = $('select#ws-plugin--s2member-pro-' + button + '-trial-term').val ().replace (/[^A-Z]/g, ''); /**/ var regAmount = $('input#ws-plugin--s2member-pro-' + button + '-amount').val ().replace (/[^0-9\.]/g, ''); var regPeriod = $('select#ws-plugin--s2member-pro-' + button + '-term').val ().split ('-')[0].replace (/[^0-9]/g, ''); var regTerm = $('select#ws-plugin--s2member-pro-' + button + '-term').val ().split ('-')[1].replace (/[^A-Z]/g, ''); var regRecur = $('select#ws-plugin--s2member-pro-' + button + '-term').val ().split ('-')[2].replace (/[^0-1]/g, ''); /**/ var currencyCode = $('select#ws-plugin--s2member-pro-' + button + '-currency').val ().replace (/[^A-Z]/g, ''); var cCaps = $.trim ($.trim ($('input#ws-plugin--s2member-pro-' + button + '-ccaps').val ()).replace (/[ \-]/g, '_').replace (/[^A-Z_0-9,]/gi, '').toLowerCase ()); cCaps = ($.trim ($('input#ws-plugin--s2member-pro-' + button + '-ccaps').val ()).match (/^\+/)) ? '+' + cCaps.toLowerCase () : cCaps.toLowerCase (); /**/ trialPeriod = (!regRecur || regRecur === '0') ? '0' : trialPeriod; /* Buy Now / Non-Recurring is absolutely NOT compatible w/ Trial Periods. */ trialAmount = (!trialAmount || isNaN(trialAmount) || trialAmount 0.01 || trialPeriod = 0) ? '0' : trialAmount; /* Check Trial Amount. */ /**/ var levelCcapsPer = (!regRecur || regRecur === '0') ? level + ':' + cCaps + ':' + regPeriod + ' ' + regTerm : level + ':' + cCaps; levelCcapsPer = levelCcapsPer.replace (/\:+$/g, ''); /* Clean any trailing separators from this string. */ /**/ if (trialAmount !== '0' && (isNaN(trialAmount) || trialAmount 2.95)) { alert('— Oops, a slight problem: —\n\nWhen provided, Trial Amount must be = 2.95'); return false; } else if (trialAmount !== '0' && trialAmount 100.00) /* $100.00 maximum. */ { alert('— Oops, a slight problem: —\n\nMaximum Trial Amount is: 100.00'); return false; } else if (trialTerm === 'D' && trialPeriod 0 && trialPeriod 2) /* Min: 2. */ { alert('— Oops, a slight problem: —\n\nMinimum Trial Days is: 2.'); return false; } else if (trialTerm === 'D' && trialPeriod 365) /* Max: 365 days. */ { alert('— Oops, a slight problem: —\n\nMaximum Trial Days is: 365.'); return false; } else if (!regAmount || isNaN(regAmount) || regAmount 2.95) { alert('— Oops, a slight problem: —\n\nAmount must be = 2.95'); return false; } else if (regAmount 100.00) /* $100.00 maximum. */ { alert('— Oops, a slight problem: —\n\nMaximum Amount is: 100.00'); return false; } else if (!desc) /* Each Button should have a Description. */ { alert('— Oops, a slight problem: —\n\nPlease type a Description for this Button.'); return false; } /**/ shortCodeTemplateAttrs += 'level="' + esc_attr(level) + '" ccaps="' + esc_attr(cCaps) + '" desc="' + esc_attr(desc) + '" cc="' + esc_attr(currencyCode) + '" custom="?php echo c_ws_plugin__s2member_utils_strings:: esc_sq ( esc_attr ( $_SERVER [ "HTTP_HOST" ] ) ) ; ?"'; shortCodeTemplateAttrs += ' ta="' + esc_attr(trialAmount) + '" tp="' + esc_attr(trialPeriod) + '" tt="' + esc_attr(trialTerm) + '" ra="' + esc_attr(regAmount) + '" rp="' + esc_attr(regPeriod) + '" rt="' + esc_attr(regTerm) + '" rr="' + esc_attr(regRecur) + '"'; shortCode.val (shortCodeTemplate.replace (/%%attrs%%/, shortCodeTemplateAttrs)); /**/ alert('Your Button has been generated.\nPlease copy/paste the Shortcode Format into your Membership Options Page.'); /**/ shortCode.each (function() /* Focus and select the recommended Shortcode. */ { this.focus (), this.select (); }); /**/ return false; }; /**/ ws_plugin__s2member_pro_ccbillSpButtonGenerate = function() /* Handles ccBill® Button Generation for Specific Post/Page Access. */ { var shortCodeTemplate = '[s2Member-Pro-ccBill-Button %%attrs%% image="default" output="button" /]', shortCodeTemplateAttrs = ''; /**/ var shortCode = $('input#ws-plugin--s2member-pro-sp-shortcode'); /**/ var leading = $('select#ws-plugin--s2member-pro-sp-leading-id').val ().replace (/[^0-9]/g, ''); var additionals = $('select#ws-plugin--s2member-pro-sp-additional-ids').val () || []; var hours = $('select#ws-plugin--s2member-pro-sp-hours').val ().replace (/[^0-9]/g, ''); var regAmount = $('input#ws-plugin--s2member-pro-sp-amount').val ().replace (/[^0-9\.]/g, ''); var desc = $.trim ($('input#ws-plugin--s2member-pro-sp-desc').val ().replace (/"/g, '')); var currencyCode = $('select#ws-plugin--s2member-pro-sp-currency').val ().replace (/[^A-Z]/g, ''); /**/ if (!leading) /* Must have a Leading Post/Page ID to work with. Otherwise, Link generation will fail. */ { alert('— Oops, a slight problem: —\n\nPlease select a Leading Post/Page.\n\n*Tip* If there are no Posts/Pages in the menu, it\'s because you\'ve not configured s2Member for Specific Post/Page Access yet. See: s2Member - Restriction Options - Specific Post/Page Access.'); return false; } else if (!regAmount || isNaN(regAmount) || regAmount 2.95) { alert('— Oops, a slight problem: —\n\nAmount must be = 2.95'); return false; } else if (regAmount 100.00) /* $100.00 maximum. */ { alert('— Oops, a slight problem: —\n\nMaximum Amount is: 100.00'); return false; } else if (!desc) /* Each Button should have a Description. */ { alert('— Oops, a slight problem: —\n\nPlease type a Description for this Button.'); return false; } /**/ for (var i = 0, ids = leading; i additionals.length; i++) if (additionals[i] && additionals[i] !== leading) ids += ',' + additionals[i]; /**/ var spIdsHours = 'sp:' + ids + ':' + hours; /* Combined sp:ids:expiration hours. */ /**/ shortCodeTemplateAttrs += 'sp="1" ids="' + esc_attr(ids) + '" exp="' + esc_attr(hours) + '" desc="' + esc_attr(desc) + '" cc="' + esc_attr(currencyCode) + '"'; shortCodeTemplateAttrs += ' custom="?php echo c_ws_plugin__s2member_utils_strings:: esc_sq ( esc_attr ( $_SERVER [ "HTTP_HOST" ] ) ) ; ?" ra="' + esc_attr(regAmount) + '"'; shortCode.val (shortCodeTemplate.replace (/%%attrs%%/, shortCodeTemplateAttrs)); /**/ alert('Your Button has been generated.\nPlease copy/paste the Shortcode Format into your Membership Options Page.'); /**/ shortCode.each (function() /* Focus and select the recommended Shortcode. */ { this.focus (), this.select (); }); /**/ return false; }; /**/ ws_plugin__s2member_pro_ccbillRegLinkGenerate = function() /* Handles ccBill® Link Generation. */ { var level = $('select#ws-plugin--s2member-pro-reg-link-level').val ().replace (/[^0-9]/g, ''); var subscrID = $.trim ($('input#ws-plugin--s2member-pro-reg-link-subscr-id').val ()); var custom = $.trim ($('input#ws-plugin--s2member-pro-reg-link-custom').val ()); var cCaps = $.trim ($.trim ($('input#ws-plugin--s2member-pro-reg-link-ccaps').val ()).replace (/[ \-]/g, '_').replace (/[^A-Z_0-9,]/gi, '').toLowerCase ()); var fixedTerm = $.trim ($('input#ws-plugin--s2member-pro-reg-link-fixed-term').val ().replace (/[^A-Z 0-9]/gi, '').toUpperCase ()); var $link = $('p#ws-plugin--s2member-pro-reg-link'), $loading = $('img#ws-plugin--s2member-pro-reg-link-loading'); /**/ var levelCcapsPer = (fixedTerm && !fixedTerm.match (/L$/)) ? level + ':' + cCaps + ':' + fixedTerm : level + ':' + cCaps; levelCcapsPer = levelCcapsPer.replace (/\:+$/g, ''); /* Clean any trailing separators from this string. */ /**/ if (!subscrID) /* We must have a Paid Subscr. ID value. */ { alert('— Oops, a slight problem: —\n\nPaid Subscr. ID is a required value.'); return false; } else if (!custom || custom.indexOf ('?php echo c_ws_plugin__s2member_utils_strings:: esc_sq ( $_SERVER [ "HTTP_HOST" ] ) ; ?') !== 0) { alert('— Oops, a slight problem: —\n\nThe Custom Value MUST start with your domain name.'); return false; } else if (fixedTerm && !fixedTerm.match (/^[1-9]+ (D|W|M|Y|L)$/)) /* Check format. */ { alert('— Oops, a slight problem: —\n\nThe Fixed Term Length is not formatted properly.'); return false; } /**/ $link.hide (), $loading.show (), $.post (ajaxurl, {action: 'ws_plugin__s2member_reg_access_link_via_ajax', ws_plugin__s2member_reg_access_link_via_ajax: '?php echo c_ws_plugin__s2member_utils_strings:: esc_sq ( wp_create_nonce ( "ws-plugin--s2member-reg-access-link-via-ajax" ) ) ; ?', s2member_reg_access_link_subscr_gateway: 'ccbill', s2member_reg_access_link_subscr_id: subscrID, s2member_reg_access_link_custom: custom, s2member_reg_access_link_item_number: levelCcapsPer}, function(response) { $link.show ().html ('a href="' + esc_attr(response) + '" target="_blank" rel="external"' + esc_html(response) + '/a'), $loading.hide (); }); /**/ return false; }; /**/ ws_plugin__s2member_pro_ccbillSpLinkGenerate = function() /* Handles ccBill® Link Generation. */ { var leading = $('select#ws-plugin--s2member-pro-sp-link-leading-id').val ().replace (/[^0-9]/g, ''); var additionals = $('select#ws-plugin--s2member-pro-sp-link-additional-ids').val () || []; var hours = $('select#ws-plugin--s2member-pro-sp-link-hours').val ().replace (/[^0-9]/g, ''); var $link = $('p#ws-plugin--s2member-pro-sp-link'), $loading = $('img#ws-plugin--s2member-pro-sp-link-loading'); /**/ if (!leading) /* Must have a Leading Post/Page ID to work with. Otherwise, Link generation will fail. */ { alert('— Oops, a slight problem: —\n\nPlease select a Leading Post/Page.\n\n*Tip* If there are no Posts/Pages in the menu, it\'s because you\'ve not configured s2Member for Specific Post/Page Access yet. See: s2Member - Restriction Options - Specific Post/Page Access.'); return false; } /**/ for (var i = 0, ids = leading; i additionals.length; i++) if (additionals[i] && additionals[i] !== leading) ids += ',' + additionals[i]; /**/ $link.hide (), $loading.show (), $.post (ajaxurl, {action: 'ws_plugin__s2member_sp_access_link_via_ajax', ws_plugin__s2member_sp_access_link_via_ajax: '?php echo c_ws_plugin__s2member_utils_strings:: esc_sq ( wp_create_nonce ( "ws-plugin--s2member-sp-access-link-via-ajax" ) ) ; ?', s2member_sp_access_link_ids: ids, s2member_sp_access_link_hours: hours}, function(response) { $link.show ().html ('a href="' + esc_attr(response) + '" target="_blank" rel="external"' + esc_html(response) + '/a'), $loading.hide (); }); /**/ return false; }; } }); [ full view ]s2member-pro\includes\menu-pages\ccbill-menu-pages-s.js Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)

Statistics: Posted by System Robot — July 11th, 2011, 5:37 pm


]]>
2011-07-09T06:17:47-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13315&p=25610#p25610 <![CDATA[s2Member v111220 / Source Code: s2member-p...]]>
s2Member v111220
Source Code: s2member-pro\includes\menu-pages\ccbill-menu-pages-s.js
Docs updated: December 20, 2011, 9:52 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — July 9th, 2011, 6:17 am


]]>