Community Support Forums — WordPress® ( Users Helping Users ) — 2011-05-04T01:34:39-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=6249 2011-05-04T01:34:39-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6249&p=14073#p14073 <![CDATA[Re: S2Member Pro User Registration Form]]>
I used
Code:
unset($_POST["s2member_pro_paypal_registration"]["nonce"]);
which seems to work fine.

Pete..

Statistics: Posted by peterhuk — May 4th, 2011, 1:34 am


]]>
2011-05-03T21:11:48-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6249&p=14020#p14020 <![CDATA[Re: S2Member Pro User Registration Form]]> Hi Pete.
I just finished reading over this thread.

Yes, it sounds like a good solution to me.
unset($_POST["s2member_pro_paypal_checkout"]["nonce"]);

In the mean time, we ARE working to add some Hooks/Filters into the Pro Module.

Statistics: Posted by Jason Caldwell — May 3rd, 2011, 9:11 pm


]]>
2011-05-01T18:21:10-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6249&p=13916#p13916 <![CDATA[Re: S2Member Pro User Registration Form]]>
I thnik I've got it, paypal-hooks.inc.php has the following action.

Code:
add_action ("init", "c_ws_plugin__s2member_pro_paypal_registration::paypal_registration");


As this runs at default priority 10 I have added an action which runs at priorty 9. using a similar
wp_verify_nonce check I was able to lock unto this action and simply unset the global post nonce
when a function generates and error.

Once the nonce is cleared the action will not be activated.

Does that sound correct?

Pete..

Statistics: Posted by peterhuk — May 1st, 2011, 6:21 pm


]]>
2011-05-01T12:56:19-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6249&p=13910#p13910 <![CDATA[Re: S2Member Pro User Registration Form]]>
Do you know what filter loads the

Code:
c_ws_plugin__s2member_pro_paypal_registration::paypal_registration


Class, in paypal-registration.inc.php. This one is buggin me, this appears to be the
class that processes the $_POST data for the registration form.

if I can intrercept this filter before it loads then when my function generates an
error It can suppress the above class otherwise if no errors are generated by my
function then the above can run normally.

Many thanks

Pete..

Statistics: Posted by peterhuk — May 1st, 2011, 12:56 pm


]]>
2011-05-01T04:05:10-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6249&p=13899#p13899 <![CDATA[Re: S2Member Pro User Registration Form]]>

I emailed Jason about your question earlier already, so he may come and comment at some point.

Statistics: Posted by Cristián Lávaque — May 1st, 2011, 4:05 am


]]>
2011-05-01T04:02:49-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6249&p=13898#p13898 <![CDATA[Re: S2Member Pro User Registration Form]]>
Just a quick update.

Code:
unset($_POST["s2member_pro_paypal_registration"]);


I found that applying the above earlier in the process, provides the desired
result in this work around.


Pete..

Statistics: Posted by peterhuk — May 1st, 2011, 4:02 am


]]>
2011-04-30T17:39:01-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6249&p=13893#p13893 <![CDATA[Re: S2Member Pro User Registration Form]]>
O.k, this is where we are at the present. First my shortcode runs to check
If there are any issues.

In either case I run the s2Member-Pro-PayPal-Form register="1" etc shortcode.
The entire form is loaded into a var via the ws_plugin__s2member_pro_sc_paypal_form
filter.

I add my input variables to the end of the form with a cheeky
Code:
$form = str_replace(“</form>”,“my input vars</form>”,$form)

If my shortcode brings up any errors I insert my error code between the
id="s2member-pro-paypal-registration-form-response-div" div
(using strpos to locate the id position and some other cmd’s to find the
position of the end of the tag '>') then use substr_replace
to insert my error code into the response code div section.

All good so far. If my shortcode generates an error I would like to
suppress any S2 Pro errors (else two response div’s looks ugly).

To prevent this I have used
Code:
unset($_POST["s2member_pro_paypal_registration"]);

to suppress the display of S2 Pro user input.

This removes user inputs from the fields but S2 still seems to be
able to produce it’s own errors. Even with cookies disabled S2 Pro
can still generate an error i.e if using an email address that is already
in use (this is fine but I don’t want want it to show whilst my short code
is displaying an error).

This is where I could use your help. What $GLOBALl variable do I need
to unset or alter in order to halt S2 Pro whilst my shortcode has
determined an error?

Ultimately what I would like is if my shortcode determines an error on a
submitted page I would like S2 Pro to treat the page as a non $_POST
(accessed via click) page (if that makes any sense).

Many thanks

Peter..

Statistics: Posted by peterhuk — April 30th, 2011, 5:39 pm


]]>
2011-04-30T11:18:15-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6249&p=13873#p13873 <![CDATA[Re: S2Member Pro User Registration Form]]>

Statistics: Posted by Cristián Lávaque — April 30th, 2011, 11:18 am


]]>
2011-04-30T06:19:04-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6249&p=13857#p13857 <![CDATA[Re: S2Member Pro User Registration Form]]>
Many thanks for your suggestion. My biggest concern about altering
program files is that months later an update is implemented and
changes are overwriten then things stop working.

I learned that the hard way and I'm a bit reluctant to make changes
to application files.

I am working on a workaround. If it work I'll let you know.

Pete..

Statistics: Posted by peterhuk — April 30th, 2011, 6:19 am


]]>
2011-04-29T21:48:16-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6249&p=13851#p13851 <![CDATA[Re: S2Member Pro User Registration Form]]> Statistics: Posted by Cristián Lávaque — April 29th, 2011, 9:48 pm


]]>
2011-04-29T21:21:54-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6249&p=13848#p13848 <![CDATA[Re: S2Member Pro User Registration Form]]>
Many thanks for your suggestion. I have already had a look, there
are no filters to return data to S2 so the only option seems to be a
phyical hack to the file.

This would be an easy solution until the next S2 Pro update then
will have to remember where all the changes were.

There is an other approach which is to pull the full complete form
data in form the ws_plugin__s2member_pro_sc_paypal_form and
do the odd regex and str_replace.

Will let you know if I have any success.

Many thanks

Pete..

Statistics: Posted by peterhuk — April 29th, 2011, 9:21 pm


]]>
2011-04-29T20:52:58-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6249&p=13843#p13843 <![CDATA[Re: S2Member Pro User Registration Form]]> wp-content/plugins/s2member-pro/includes/classes/gateways/paypal/paypal-registration-in.inc.php

Statistics: Posted by Cristián Lávaque — April 29th, 2011, 8:52 pm


]]>
2011-04-29T15:36:22-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6249&p=13797#p13797 <![CDATA[S2Member Pro User Registration Form]]>
I recently implemented the S2Member Pro registration form.
The form blends in with the theme really well and looks great.

The only problem is I previously created a function for the WP
registration form to dynamically insert Input fields into the form.
The field names and values are generated randomly so I cannot use the
S2 Pro ‘Custom Registration Fields’.

In addition some of the randomly generated keys and values
are temporary values so they would not be suitable
for use in the ‘Custom Registration Fields’ configuration.
Whilst other inputs are hidden and auto completed at point
of page access.

My function also requires some of the key, value pairs to
generates errors in certain conditions halting the registration
process and display an error.

I have not been able to find a similar modification route with
the S2Member registration form.

Any ideas?

Pete..

Statistics: Posted by peterhuk — April 29th, 2011, 3:36 pm


]]>