Page 1 of 1

Seperators no longer work since update

PostPosted: December 23rd, 2011, 9:52 pm
by Rosie-L
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>
<!-- ---------------- -->

Re: Seperators no longer work since update

PostPosted: December 24th, 2011, 12:09 am
by Raam Dev
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?

Re: Seperators no longer work since update

PostPosted: December 24th, 2011, 12:51 am
by Rosie-L
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.

Re: Seperators no longer work since update

PostPosted: December 24th, 2011, 9:55 am
by Raam Dev
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?

Re: Seperators no longer work since update

PostPosted: December 29th, 2011, 10:00 pm
by Rosie-L
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.

Re: Seperators no longer work since update

PostPosted: December 30th, 2011, 3:50 am
by Cristián Lávaque
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. :)

Re: Seperators no longer work since update

PostPosted: December 31st, 2011, 12:16 am
by Rosie-L
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.

Re: Seperators no longer work since update

PostPosted: December 31st, 2011, 7:04 am
by Cristián Lávaque
Awesome. Glad you solved it! :)