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™

Seperators no longer work since update

s2Member Plugin. A Membership plugin for WordPress®.

Seperators no longer work since update

Postby Rosie-L » December 23rd, 2011, 9:52 pm

S2Member: Version: 111220; Stable tag: 111220; Framework: WS-P-110523
WordPress: 3.3
Thesis: 1.8

Hi.

The block of code below used to work fine on one of my Wordpress/Thesis sites, but after one of your updates it now displays this:

1 User Online
Users: Administrator%GUESTS_SEPERATOR%%BOTS_SEPERATOR%
1 User Browsing This Page.
Users: Administrator%GUESTS_SEPERATOR%%BOTS_SEPERATOR%
Most Users Ever Online:
19 On November 6, 2011 @ 2:44 AM


Yes, the page actually shows the text:
%GUESTS_SEPERATOR%%BOTS_SEPERATOR%

The code below is and always has been placed in Thesis OpenHook, Before Sidebars:

Code: Select all
<!-- ---------------- -->
<DIV style="font-family:Arial; font-size:18px; text-align:center; font-weight:bold;">
   <br>
      <p style="padding-bottom:8px;">Current Website Activity</p>
</DIV>

<DIV style="font-family: Arial; font-size: 14px; margin-left:40px;">
<?php if (function_exists('users_online')): ?>
   <p><div id="useronline-count"><?php users_online(); ?></div></p>
<?php endif; ?>

<?php if (function_exists('get_users_browsing_site')): ?>
   <div id="useronline-browsing-site">
      <?php echo get_users_browsing_site(); ?>
   </div>
<?php endif; ?>

<hr style="margin-right:40px;">

<?php if (function_exists('get_users_browsing_page')): ?>
   <div id="useronline-browsing-page">
      <?php echo get_users_browsing_page(); ?>
   </div>
<?php endif; ?>

<hr style="margin-right:40px;">

<?php if (function_exists('get_most_users_online')): ?>
   <p style="margin-left:0px; font-weight:bold;">Most Users Ever Online:</p>
   <p style="text-align:center;"><?php echo get_most_users_online(); ?> On <?php echo get_most_users_online_date(); ?></p>
<?php endif; ?>

<hr style="margin-right:40px;">

</DIV>
<!-- ---------------- -->
User avatar
Rosie-L
Registered User
Registered User
 
Posts: 9
Joined: February 2, 2011

Re: Seperators no longer work since update

Postby Raam Dev » December 24th, 2011, 12:09 am

Hi Rosie,

I'm looking into this and will get back to you. Was there anything else you updated recently? Did you update Thesis recently?
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: Seperators no longer work since update

Postby Rosie-L » December 24th, 2011, 12:51 am

I always keep Thesis updated, but this problem with S2Member became evident a little while back, possibly more than a week ago, and I seem to recall I had done an S2Member update just before that.

I've had so much on lately that I kept forgetting to look into it until now.
User avatar
Rosie-L
Registered User
Registered User
 
Posts: 9
Joined: February 2, 2011

Re: Seperators no longer work since update

Postby Raam Dev » December 24th, 2011, 9:55 am

Hi Rosie-L,

The problem is with the parsing of those tags. Since you're using this code in Thesis OpenHook, my first suspicion would be that a change in the way WordPress/Thesis handles code in that section.

The only way to figure out exactly what's causing this is to try switching the theme to the default and to try disabling all your plugins (except s2Member) to see if any of those are causing a conflict.

Can you try that?
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: Seperators no longer work since update

Postby Rosie-L » December 29th, 2011, 10:00 pm

Well, that's a lot of trouble for me to go to, especially when I can't see how the fault can lie with Thesis or a plug-in when S2Member gets it partly right and partly wrong.

It gets my name right, and "Most Users Ever Online" looks pretty reasonable. Is also appears to get the number of users online/browsing this page correct.

The call to "get_users_browsing_site()" is returning my current login name (Administrator). If I logout as Administrator and login as an ordinary user it still gets that part right. Same with "get_users_browsing_page()".

It's just not returning valid values for %GUESTS_SEPERATOR% and %BOTS_SEPERATOR%.

The HTML which I quoted in my opening post is clearly simple enough.

It looks very much like the functions aren't returning what they're supposed to return, and I'm sceptical that a plug-in can cause the result of a function to be partly right and partly wrong.
User avatar
Rosie-L
Registered User
Registered User
 
Posts: 9
Joined: February 2, 2011

Re: Seperators no longer work since update

Postby Cristián Lávaque » December 30th, 2011, 3:50 am

Rosie, I don't understand how this is related to s2Member. There's nothing in that code that has to do with s2Member.

Now, reading your code I wonder if <hr style="margin-right:40px;"> is where the parsing is going odd. Try removing those lines and see if that gets rid fo the %GUESTS_SEPERATOR%%BOTS_SEPERATOR%.

I hope that helps. :)
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: Seperators no longer work since update

Postby Rosie-L » December 31st, 2011, 12:16 am

Cristián Lávaque wrote:There's nothing in that code that has to do with s2Member.

Oh dear! My apologies.

At first I thought "nothing to do with S2Member". What's he talking about? Then it dawned on me: WRONG $%#@% PLUGIN!

I had just assumed that anything to do with users browsing, users online, etc was related to S2Member.

When you woke me up I went to doublecheck and discovered that the plug-in I should have been querying is WP-UserOnline.

Found the solution and all is well again.

Thanks for your patience.
User avatar
Rosie-L
Registered User
Registered User
 
Posts: 9
Joined: February 2, 2011

Re: Seperators no longer work since update

Postby Cristián Lávaque » December 31st, 2011, 7:04 am

Awesome. Glad you solved it! :)
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: No registered users and 1 guest

cron