Jump to content
medvid

Who's Online Enhancement 1.4

Recommended Posts

Update:

I´ve found out that if i klick in the Box and AFTER it one of the pulldowns, the checked-flag remains set. Can anybody confirm this feature?

That does happen, but the settings are not saved for the next time you use WOE. When you leave the page, the settings are gone.


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites
That does happen, but the settings are not saved for the next time you use WOE. When you leave the page, the settings are gone.

 

This is by design. At present, settings are not saved if you leave WOE and return. Previous versions operated in the same way, and most of them would reset the profile display setting if you enabled refresh. This version lets you have any combination of settings, and adds the setting to hide bots.

 

I will add it to the list of feature requests.

 

--Glen

Share this post


Link to post
Share on other sites
Update:

I´ve found out that if i klick in the Box and AFTER it one of the pulldowns, the checked-flag remains set. Can anybody confirm this feature?

 

It sounds as though the page may not be refreshing when you click the checkbox. I will look into this. Please tell me what browser and operating system you are using.

 

--Glen

Share this post


Link to post
Share on other sites
Glen, we fixed problems with shopping cart info not showing in our 3.4b version - not sure about wether it works with globals - I'll check it, however you might want to have a look.

 

I looked at your changes to the shopping cart info display; they did not help with register_globals=off. Thanks for pointing it out, though. I am still investigating.

 

--Glen

Share this post


Link to post
Share on other sites
It sounds as though the page may not be refreshing when you click the checkbox. I will look into this. Please tell me what browser and operating system you are using.

 

--Glen

Hi Glen,

 

this happens only in MS IE, in FF it works fine, could be a buggy Setting in IE....

Share this post


Link to post
Share on other sites

Hello,

 

Thanks for the great contribution! I have a small problem with it, though. The carts and cart contents will show up, but only when you click on the person above or below the actual person with the cart. Also, when the cart contents are displayed it shows that everyone has a cart. When someone who does not have a cart is clicked it shows no one has a cart.

Share this post


Link to post
Share on other sites
Hello,

 

Thanks for the great contribution! I have a small problem with it, though. The carts and cart contents will show up, but only when you click on the person above or below the actual person with the cart. Also, when the cart contents are displayed it shows that everyone has a cart. When someone who does not have a cart is clicked it shows no one has a cart.

 

This is a symptom of a problem that occurs when register_globals is set to "off" in your PHP server configuration. The bug also occurred in previous versions and I am working on a solution for it. Please check your PHP configuration in the admin under Tools->Server Info. The setting of register_globals can be found in the PHP Core block.

 

--Glen

Share this post


Link to post
Share on other sites
This is a symptom of a problem that occurs when register_globals is set to "off" in your PHP server configuration. The bug also occurred in previous versions and I am working on a solution for it. Please check your PHP configuration in the admin under Tools->Server Info. The setting of register_globals can be found in the PHP Core block.

 

--Glen

The same problem is occuring with the register_globals set to ON.

Share this post


Link to post
Share on other sites
Hi Glen,

 

this happens only in MS IE, in FF it works fine, could be a buggy Setting in IE....

 

I have tested this in MSIE and got the same result. It appears to be a bug in MSIE, but I will see if there is a workaround. It appears that MSIE 7 does not honor the "onChange" attribute for checkboxes.

 

I also tested in Apple Safari for Windows and it works there.

 

 

 

--Glen

Share this post


Link to post
Share on other sites
The same problem is occuring with the register_globals set to ON.

 

It works fine on my server, but I had a similar report in v3.4 that I was unable to resolve. Because a similar problem also occurs with register_globals=off, the fix may resolve both issues. I will post an update soon that will fix the one problem; it may resolve your problem as well.

 

--Glen

Share this post


Link to post
Share on other sites
I have tested this in MSIE and got the same result. It appears to be a bug in MSIE, but I will see if there is a workaround. It appears that MSIE 7 does not honor the "onChange" attribute for checkboxes.

 

I also tested in Apple Safari for Windows and it works there.

 

 

 

--Glen

 

If you set it to checked and klick after this (while the page isn´t refreshed) to any other element with the effect that the checkbox is not the active part, it keeps set. For me it seems that in IE the checked flag is not set before you leave the box and klick on something else, e.g. a user online to see his cart....

 

If you click it and the broken line around is to see, the change has no effect, if you "remove" the broken line by clicking anywhere else, the setting is kept. Would a dropdown be a better solution?

Share this post


Link to post
Share on other sites
If you set it to checked and klick after this (while the page isn´t refreshed) to any other element with the effect that the checkbox is not the active part, it keeps set. For me it seems that in IE the checked flag is not set before you leave the box and klick on something else, e.g. a user online to see his cart....

 

If you click it and the broken line around is to see, the change has no effect, if you "remove" the broken line by clicking anywhere else, the setting is kept. Would a dropdown be a better solution?

 

Apparently, MSIE only performs the "onChange" action when the focus moves away from a checkbox, not when you click on it. This behavior is different from other major browsers (Firefox and KHTML-based browsers such as Safari).

 

Did you notice that the page reloaded when you moved away from the checkbox? The page reload is what causes the setting to change. If the refresh timer runs out while the cursor focus is still on the checkbox, the previous settings are reloaded.

 

As far as I am concerned, this is an MSIE bug. It can be worked around by using a dropdown menu, but a checkbox is clearly the correct human interface element to use for this parameter. I may change it to a dropdown for the next release, but it is a hack to fix a Microsoft bug.

 

--Glen

Share this post


Link to post
Share on other sites

I have just posted Who's Online Enhancement v3.5.1

 

Changes for this version:

Two fixes for register_globals=off compatibility:

Drop-down menus retain their values (problem in MS2; global fix exists in RC1)

Carts display correct contents when selected

 

Known issue:

MS Internet Explorer users: After clicking on the "Show Bots" check box, you must change the cursor focus; either by pressing Tab, or by clicking somewhere else on the page, for the setting to take effect. This appears to be an Internet Explorer bug.

 

Full package upload; upgraders from v3.5 need install only admin/whos_online.php

 

http://addons.oscommerce.com/info/824

 

Please let me know of any problems you experience here in the forum. I am especially interested to know if there are any remaining anomalies with cart display.

 

--Glen

Share this post


Link to post
Share on other sites

Works great!

 

1 Tip: i didn´t like the am/pm Time, so i made the following change for me: (German Version)

 

<script type="text/javascript" language="JavaScript">
				<!-- Begin
				Stamp = new Date();
				document.write('<?php echo TEXT_LAST_REFRESH. ' '; ?>');
				var Hours;
				var Mins;
				var Time;
				Hours = Stamp.getHours();
				Time = " Uhr"
				Mins = Stamp.getMinutes();
				if (Mins < 10) {
				  Mins = "0" + Mins;
				}
				document.write(' ' + Hours + ":" + Mins + Time );
				// End -->
			  </script>

Share this post


Link to post
Share on other sites

Steve

 

I was able to get the screen to refresh when you check the box by changing this line. There was no Bot on the site at the time to see if it performs like it should. The box does stay checked after the timed refresh.

echo TEXT_SHOW_BOTS . ': <input type="checkbox" name="bots" value="show" onChange="this.form.submit();"' . ($HTTP_GET_VARS['bots'] == 'show' ? ' checked="checked"': '') . '>';  ?>

to this( changed onchange to onclick )

echo TEXT_SHOW_BOTS . ': <input type="checkbox" name="bots" value="show" onclick="this.form.submit();"' . ($HTTP_GET_VARS['bots'] == 'show' ? ' checked="checked"': '') . '>';  ?>

Share this post


Link to post
Share on other sites
Steve

 

I was able to get the screen to refresh when you check the box by changing this line. There was no Bot on the site at the time to see if it performs like it should. The box does stay checked after the timed refresh.

 

Scott,

Thanks for that update. I have incorporated it into an update that I will post in a few days. I'd like to get more user feedback, to see if there are any other issues. I have also made the "Last Refresh Time" display format a configurable 12/24 setting, thanks to Claudio's suggestion.

 

--Glen

Share this post


Link to post
Share on other sites
Scott,

Thanks for that update. I have incorporated it into an update that I will post in a few days. I'd like to get more user feedback, to see if there are any other issues. I have also made the "Last Refresh Time" display format a configurable 12/24 setting, thanks to Claudio's suggestion.

 

--Glen

 

lol sorry Glen I guess I should have looked a little farther before picking your name. I have not update my live store 3.4 seemed to do fine but I think I will try it. See if it helps out supertracker any. I'm thinking it pulls from the who's online data.

Share this post


Link to post
Share on other sites
lol sorry Glen I guess I should have looked a little farther before picking your name. I have not update my live store 3.4 seemed to do fine but I think I will try it. See if it helps out supertracker any. I'm thinking it pulls from the who's online data.

 

Scott,

No problem. :-) V3.5 is a major performance improvement over v3.4 and below because it no longer does DNS lookups each time the page is refreshed. I moved the DNS lookup to the data collector portion that the visitor updates, and only refresh it if the IP address changes, so most customers only see a small delay on the first page they visit.

 

--Glen

Share this post


Link to post
Share on other sites

SteveDallas, nice work!

 

working flawlessly in my shop with register globals off.

can finally see carts without having to do the double click trick.

Share this post


Link to post
Share on other sites
Steve

 

I was able to get the screen to refresh when you check the box by changing this line. There was no Bot on the site at the time to see if it performs like it should. The box does stay checked after the timed refresh.

echo TEXT_SHOW_BOTS . ': <input type="checkbox" name="bots" value="show" onChange="this.form.submit();"' . ($HTTP_GET_VARS['bots'] == 'show' ? ' checked="checked"': '') . '>';  ?>

to this( changed onchange to onclick )

echo TEXT_SHOW_BOTS . ': <input type="checkbox" name="bots" value="show" onclick="this.form.submit();"' . ($HTTP_GET_VARS['bots'] == 'show' ? ' checked="checked"': '') . '>';  ?>

 

The onChange "bug " is a well known problem between browsers. The official workaround is to use onpropertychange which is cross browsers compatible.

Share this post


Link to post
Share on other sites
The onChange "bug " is a well known problem between browsers. The official workaround is to use onpropertychange which is cross browsers compatible.

 

So is there some where this info can be found for the ones that are still learning? I know search google, but you don't always find the best places to get the info with out spending hours. Showing up on the first page doesn't make them the best.

Share this post


Link to post
Share on other sites

Are you aware that Who's Online won't display bots when Force Cookie Use is enabled?

 

It always displays Googlebot because of the line in includes/functions/whos_online.php:

 

if (( $spider_flag ) or (strpos ($user_agent, "Googlebot") > 0 ))

But when Force Cookie Use is enabled, in application_top.php the $spider_flag variable never gets set to true because of the elseif clause:

 

elseif (SESSION_BLOCK_SPIDERS == 'True')

I have fixed this by changing the above line to:

 

if (!$session_started && SESSION_BLOCK_SPIDERS == 'True')

Seems to be working fine now. Wouldn't mind an expert second opinion though ;)

Share this post


Link to post
Share on other sites
The onChange "bug " is a well known problem between browsers. The official workaround is to use onpropertychange which is cross browsers compatible.

onpropertychange isn't working here in Mac Safari 3.1.2, nor in Mac Firefox 3.0. onclick and onchange work for both, but not onpropertychange.

Share this post


Link to post
Share on other sites
onpropertychange isn't working here in Mac Safari 3.1.2, nor in Mac Firefox 3.0. onclick and onchange work for both, but not onpropertychange.

 

In the next version that I release, I will set it to "onclick", which was previously suggested. I have tested it in the Windows versions of Firefox, MSIE, and Safari.

 

--Glen

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×