PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Simple conditionals don't work -- error

s2Member Plugin. A Membership plugin for WordPress®.

Simple conditionals don't work -- error

Postby openmtbmap » June 22nd, 2011, 6:19 am

See attached warnings, I'm prety sure that I did everything allright. Are simple conditionals still experimental (no video tutorial) or is there simply a problem?

(all text that is inside the conditional is not displayed to anyone and dropped - logged in or logged out).

I'ld really love to have working simple conditionals.

Warning: call_user_func() expects parameter 1 to be a valid callback, function 'is_user_loggede' not found or invalid function name in /srv/www/htdocs/wp-content/plugins/s2member/includes/classes/sc-if-conds-in.inc.php on line 125

Warning: call_user_func() expects parameter 1 to be a valid callback, function ' !is_user_loggede' not found or invalid function name in /srv/www/htdocs/wp-content/plugins/s2member/includes/classes/sc-if-conds-in.inc.php on line 125


Or
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ' current_user_can' not found or invalid function name in /srv/www/htdocs/wp-content/plugins/s2member/includes/classes/sc-if-conds-in.inc.php on line 138

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ' !current_user_can' not found or invalid function name in /srv/www/htdocs/wp-content/plugins/s2member/includes/classes/sc-if-conds-in.inc.php on line 138
User avatar
openmtbmap
Registered User
Registered User
 
Posts: 32
Joined: May 1, 2011

Re: Simple conditionals don't work -- error

Postby BobTabor » June 22nd, 2011, 1:59 pm

I have simple conditions working for me ... could you post the code you're trying to get to run? Perhaps that might shed some light on the issue.
User avatar
BobTabor
Experienced User
Experienced User
 
Posts: 84
Joined: April 28, 2011

Re: Simple conditionals don't work -- error

Postby Cristián Lávaque » June 22nd, 2011, 7:09 pm

Yes, please show us your code so we can review it.

From the errors, I can tell you that the first two show the function written wrong: "is_user_loggede" instead of "is_user_logged_in".
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Simple conditionals don't work -- error

Postby openmtbmap » June 23rd, 2011, 4:11 pm

Will do next Monday. I simply copy/pasted the functions from the s2member simple conditionals form. And I cannot see any difference between your first is_user_loggede and the instead. For me it is both identical. ???

Or is there a difference on the "". Those are really dangerous, as they are used differently according to language syntac on your system. So it's very likely a wrong one is used and not both accepted (even copy / paste can go wrong). Just like point and comma switched English/German in numbers and some other stuff.
User avatar
openmtbmap
Registered User
Registered User
 
Posts: 32
Joined: May 1, 2011

Re: Simple conditionals don't work -- error

Postby Cristián Lávaque » June 23rd, 2011, 6:26 pm

Maybe this way it'll be more noticeable:

is_user_loggede
is_user_logged_in
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Simple conditionals don't work -- error

Postby openmtbmap » June 28th, 2011, 4:14 am

Okay, I found out the problems:

1. you cannot copy from the examples in the documentation (or better you may but only with a "copy plain text" function).
2. The examples are somehow output incorrect (loggede instead of logged_in) - so one has to look into sc_if_conds_in.inc.php to find out what the real function is called

-- Overall not userfriendly at all if no unformatted and correct examples for the code exist (and tell user to use source or html view). If this is not possible in the s2member options page, then drop the examples completly or put a warning to not copy them.

P.S. if simply copying over (also copying over to source code view will break things as missing operands like </p> may crash a novice user).

P.S.S.
This is what happens when you simply copy in the expample code (of course this won't work):
<p>[/s2If]</p>
<p><br />
<code><span style="color: #000000"><span style="color:#164A61;">[s2If&nbsp;is_user_loggede()]</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;Content&nbsp;for&nbsp;anyone&nbsp;that&nbsp;is&nbsp;logged&nbsp;in,&nbsp;regardless&nbsp;of&nbsp;their&nbsp;Membership&nbsp;Level.<br />
<span style="color:#164A61;">[/s2If]</span></span></code></p>

P.S.S.S ****, I think Firefox or this forum software does not allow showing logged _ in in one word. It is ouput as loggede. I entered logged _ in (without spaces) and after submitting it, it shows as loggede instead. Therefore I also could not see any difference in the above example.
User avatar
openmtbmap
Registered User
Registered User
 
Posts: 32
Joined: May 1, 2011

Re: Simple conditionals don't work -- error

Postby Cristián Lávaque » June 28th, 2011, 2:22 pm

Got it, thanks for the update.

Note to others with this problem: If the text formatting is included when copy/pasting the code examples from the documentation to the WP editor, then go to the HTML tab of the editor and paste it there.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Simple conditionals don't work -- error

Postby openmtbmap » June 28th, 2011, 2:30 pm

Well that still does not solve the loggede problem - best provide the examples in an additional text file that is noted, then neither formatting nor logged_in displaying wrong will happen.

Chrome and Internet Explorer 8 do not show this problem for me. Just Firefox 4 and 5 (well have no more installation of Firefox 3 so cannot tell).
User avatar
openmtbmap
Registered User
Registered User
 
Posts: 32
Joined: May 1, 2011

Re: Simple conditionals don't work -- error

Postby Cristián Lávaque » June 28th, 2011, 3:06 pm

Could you show me screenshots of what you mean, please?
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Simple conditionals don't work -- error

Postby openmtbmap » June 28th, 2011, 3:21 pm

Here you go. That's how it looks for me.
Image

Image

Uploaded with ImageShack.us
User avatar
openmtbmap
Registered User
Registered User
 
Posts: 32
Joined: May 1, 2011

Re: Simple conditionals don't work -- error

Postby openmtbmap » June 28th, 2011, 3:28 pm

Ohhh, big sorry. I had a Firefox plugin run havoc and changing all _in to simple "e".
(plugin is called Binnen-I-be-gone and supposed to only delete /in as this is an Austrian incorrect writing annoyance of gendering words (e.g. ProfessorInnen instead of the correct Professoren)
User avatar
openmtbmap
Registered User
Registered User
 
Posts: 32
Joined: May 1, 2011

Re: Simple conditionals don't work -- error

Postby Cristián Lávaque » June 28th, 2011, 3:38 pm

Thanks for the udpate!

I'm glad you found the problem and you now can read loggede properly. Just kidding: logged_in. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests

cron