Community Support Forums — WordPress® ( Users Helping Users ) — 2011-02-18T20:59:14-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=2220 2011-02-18T20:59:14-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2220&p=6886#p6886 <![CDATA[Re: php problem when adding to the level of user]]>
There is only one sort of quote on a keyboard (on mine its shift + the key next to the enter key)

I'm guessing you were typing the code into microsoft word or some other program while you were going through the tutorials? and then copy/pasting it into wordpress? because microsoft word "autocorrects" the quote marks to the 66 and 99 sort.

If you were typing it into MS word, use notepad instead or hateml - they wont change any of your carefully entered text.

Cheers

Kym

Statistics: Posted by stowe39 — February 18th, 2011, 8:59 pm


]]>
2011-02-18T07:40:50-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2220&p=6869#p6869 <![CDATA[Re: php problem when adding to the level of user]]> This works fine , again thank you. I am going to check out the two links you have given me here. Regarding the inverted commas this is all I have on my keyboard , how would I get around that ?

Statistics: Posted by Dawn123 — February 18th, 2011, 7:40 am


]]>
2011-02-17T20:07:55-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2220&p=6853#p6853 <![CDATA[Re: php problem when adding to the level of user]]>
This code should work (it does on my test site - using the PHP Execution plugin)

Code:
<?php if(current_user_can("access_s2member_level1")) { ?>
Would you like to upgrade? (checkout here)
<strong>Premium Membership 6 months</strong>. General
symptoms,treatment of listed conditions plus complimentary recommendations.
&#163;27.00 per month one payment &#163;162.00 w/&#163;31.00 monthly
renewal<strong>*</strong>  [s2Member-PayPal-Button level="2" ccaps=""
desc="Premium Membership 6 months GBP 27.00 per month one payment GBP
162.00 w/GBP 31.00 monthly renewal" ps="paypal" cc="GBP" ns="1" custom="www.painfree-drugfree-selfhelp.com"
ta="162.00" tp="6" tt="M" ra="31.00" rp="1" rt="M" rr="1" modify="1"
image="default" output="button" /]
<?php } ?>

<?php if (current_user_can("access_s2member_level1")) { ?>
    Would you like to cancel? <br>
    [s2Member-PayPal-Button cancel="1" image="default" output="anchor" /]
<?php } ?>


I only made a few adjustments to your code. It needed the access_ bit infront of where it has s2member_level in the conditional bit.

Also the inverted commas around the conditional were the 66 and 99 sort (which I wouldn't have noticed except I use hateml http://www.migajek.com/?c=hateml for my coding and it didn't make the code pink like it does for php stuff that's in quotes)

I also used &#163; for the html code for the pound sign (coz my webserver couldn't display it) Here's a good list for html codes for special characters http://www.degraeve.com/reference/specialcharacters.php in case you ever need some.

Cheers

Kym

Statistics: Posted by stowe39 — February 17th, 2011, 8:07 pm


]]>
2011-02-17T00:54:27-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2220&p=6815#p6815 <![CDATA[Re: php problem when adding to the level of user]]>
Sandbox mode is a great idea - it lets you iron out the bugs without it costing you money :)

I just tried creating a button using the options you chose on my test site. It worked when I took the pound sign (£) out of the description field - but didn't work at all with the pound sign in the description.

Cheers

Kym

Statistics: Posted by stowe39 — February 17th, 2011, 12:54 am


]]>
2011-02-16T21:04:45-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2220&p=6810#p6810 <![CDATA[Re: php problem when adding to the level of user]]> Will wait to hear your views on the post above.
Thanks :)

Statistics: Posted by Dawn123 — February 16th, 2011, 9:04 pm


]]>
2011-02-16T20:56:26-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2220&p=6809#p6809 <![CDATA[Re: php problem when adding to the level of user]]> thanks for replying ,I am using s2member 3.3.2 the same as yourself , but in the s2member tutorial API/Scripting-->Using advanced Conditionals. It mentions before you start the process to download the Exec-PhP not the one you mentioned should I deactive this Plugin and keep yours?.

I am working in sandbox mode maybe this is not a good idea, the only email address that is valid is the one to get into the sandbox test area . The user and buyer emails are dummy.
this is how i have filled in the fields for the level 1
I'll offer the first 3 months@£90.00
then ,I want to charge£35.00
Monthly recurring

description : Standard Membership 3 months £30.00 per month one payment £90.00 w/£35.00 monthly renewal*

I did the same thing with level2
I'll offer the first 6 months @£162.00
then ,I want to charge£31.00
Monthly recurring

Description 6 months £27.00 per month one payment £162.00w/£31.00 monthly renewal*

I still do not understand where I am going wrong.
Dawn

Statistics: Posted by Dawn123 — February 16th, 2011, 8:56 pm


]]>
2011-02-16T20:40:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2220&p=6807#p6807 <![CDATA[Re: php problem when adding to the level of user]]>
The php plugin I posted a link to is the one recommended in S2Member --> API / Scripting --> Using Advanced Conditionals.

You only need 1 php plugin - use the one recommended by YOUR version of S2Member. (the video tutorials might be done using and earlier version)

I have Version 3.3.2 of S2Member and its the free one. What version are you using? mine doesn't show the button preview either - but it works fine.

Have you entered a valid paypal account email address in s2Member PayPal® Options --> PayPal® Account Details?

Did you put the * in the description field when generating the button? try removing it... and remove the / in the description too...

Cheers

Kym

Statistics: Posted by stowe39 — February 16th, 2011, 8:40 pm


]]>
2011-02-16T20:11:26-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2220&p=6805#p6805 <![CDATA[Re: php problem when adding to the level of user]]> I have just notice that on my s2member plugin under the PayPal buttons section after filling in the details in the centre of the page , to the left of this there is insufficient space under to show a preview of the generated button. I have no idea how to get around this problem.

I should mention that I have downloaded the plugin you suggested above , so now i have 2 php plugins , do I need them both or should I delete the one suggested by s2member tutorial ?.

Statistics: Posted by Dawn123 — February 16th, 2011, 8:11 pm


]]>
2011-02-16T09:17:22-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2220&p=6783#p6783 <![CDATA[Re: php problem when adding to the level of user]]> The only plugin I installed was the one recommended by the s2member tutorial under API/Scripting , a
plugin Exec-PHP. If I can just digress a little , I have been checking every step since making this post and have noticed that when I go to create the Paypal button, in the tutorial it shows you a preview of the button before you click generate code. When I try this there is no preview button just the generated code, I have again copied and pasted the code into the page and on viewing the page and seeing the button there, then clicked them which has taken me to PayPal where a message then says "the link you have used to enter PayPal is invalid. Please review the link and try again".
I was wondering if this is because it did not show me a preview of the button first as shown in the tutorial. and that is why the php code was not working either.I have not installed the plugin you mentioned above.Do I still need to install this plugin and is it a download.
I really appricate your help I have now been trying to get these button done for over 3 weeks and cannot move forward.
Hope to hear from you soon
Dawn

Statistics: Posted by Dawn123 — February 16th, 2011, 9:17 am


]]>
2011-02-15T20:37:11-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2220&p=6763#p6763 <![CDATA[Re: php problem when adding to the level of user]]> http://wordpress.org/extend/plugins/php-execution-plugin/ without it wordpress doesn't know what to do with the php code...

Have you got that plugin installed and activated?

Cheers

Kym

Statistics: Posted by stowe39 — February 15th, 2011, 8:37 pm


]]>
2011-02-11T09:08:42-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2220&p=6608#p6608 <![CDATA[php problem when adding to the level of user]]> I am developing a website in Wordpress with S2member standard, as I am not a programmer the tutorials are excellent but I have arrived at the API/ Scripting section, which is causing me major problems, I have the upgrade button and the cancellation button showing these are fine, until I add the php code shown below from the snapshot. Once I add this code and update and view the page I lose the unsubscribe button. When I go back to the editor in Wordpress to check the code it has then changed to the 2nd code I am showing below, but I do not understand why as I have checked this with the tutorial and the first set of code seems correct. At the moment this is not a live site.

Exec-PHP WYSIWYG Conversion Warning. Saving this article will render all contained PHP code permanently unuseful. Even if you are saving this article through the Code editor. You can turn off this warning in your user profile. Ignore this warning in case this article does not contain PHP code. Read the Exec-PHP documentation if you are unsure what to do next.
<?php if(current_user_can(“s2member_level1”)){ ?>
Would you like to upgrade? (checkout here)
6 months subscription
[s2Member-PayPal-Button level="2" ccaps="" desc="Standard Membership 6 months £27.00 per month one payment £162.00 w/£31.00 monthly renewal*" ps="paypal" cc="GBP" ns="1" custom="www.painfree-drugfree-selfhelp.com" ta="162.00" tp="6" tt="M" ra="31.00" rp="1" rt="M" rr="1" image="default" output="button" /]
<?php } ?>

<?php if(current_user_can(“s2member_level2”)){ ?>
Would you like to cancel?
[s2Member-PayPal-Button cancel="1" image="default" output="anchor" /]
<?php } ?>


2nd Code after the page has been update

<!-- p if (current_user_can(“s2member_level1”)){-->
Would you like to upgrade? (checkout here)
6 months subscription
[s2Member-PayPal-Button level="2" ccaps="" desc="Standard Membership 6 months £27.00 per month one payment £162.00 w/£31.00 monthly renewal*" ps="paypal" cc="GBP" ns="1" custom="www.painfree-drugfree-selfhelp.com" ta="162.00" tp="6" tt="M" ra="31.00" rp="1" rt="M" rr="1" image="default" output="button" /]
<!--p }-->

<!--p if(current_user_can(“access_s2member2”)){-->
Would you like to cancel?
[s2Member-PayPal-Button cancel="1" image="default" output="anchor" /]
<!- -p }-->

Hope to hear from someone soon, as all my work will be in vein if I cannot find a solution to this .I have no idea how to do code without the tutorial. I am learning everything including making the website as I go along. :)

Dawn.

Statistics: Posted by Dawn123 — February 11th, 2011, 9:08 am


]]>