Jump to content
medvid

Who's Online Enhancement 1.4

Recommended Posts

BD,

 

It's written as a drop in. 1.5 has all of the necessary files you need (except for the country flags). Of course, that will overwrite any other custom work you've done prior. 1.4 changes are marked with EEM comments. 1.5 changes are marked with WOL 1.5 comments.

 

There are no "find this line and change it to this" type of directions.

 

ed


Answers to osCommerce's most persistent questions! Tips & Tricks | Configuration | Common Problems.

Seek and ye shall find Contributions.

My Contributions

My Blog

Share this post


Link to post
Share on other sites

Looking at my config file...it's

 

define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql'

 

Is it possible to change to mysql without shagging things?

 

As to the version of osc - I use the CRELoaded version 6.042...

 

Ta

 

M.

Share this post


Link to post
Share on other sites

Sheepo,

 

I'm not an expert but my guess is that if you change it, then current, on-line shoppers will get a new sessionID which will disconnect them from their carts. That's a guess but I'd wait til activity has died down and then make the switch.

 

Modding that one line should be all you need to switch the session storage. It is actually recommended as a more secure, reliable session storage. With that said, that may or may not fix the status lights :-"

 

ed

Edited by medvid

Answers to osCommerce's most persistent questions! Tips & Tricks | Configuration | Common Problems.

Seek and ye shall find Contributions.

My Contributions

My Blog

Share this post


Link to post
Share on other sites
Sheepo,

 

I'm not an expert but my guess is that if you change it, then current, on-line shoppers will get a new sessionID which will disconnect them from their carts.  That's a guess but I'd wait til activity has died down and then make the switch. 

 

Modding that one line should be all you need to switch the session storage.  It is actually recommended as a more secure, reliable session storage.  With that said, that may or may not fix the status lights  :-"

 

ed

 

OK. I'll try it on my "test" site and see how it goes. Live testing is not good for meek little sheep like me ;)

 

I'll let you know in the morning when it's quiet

 

M. the S.

Share this post


Link to post
Share on other sites
About the sessions: I remember I've changed something to the original code concering sessions to make it work with my own cart, but I didn't really understand this part so.....

 

I will try to take another look at it

 

Paul,

 

Thanks. Everything else you sent me is working great! I appreciate everything you're doing. If you do find something, post here or e-mail me directly, either is fine.

 

Thanks,

Ed


Answers to osCommerce's most persistent questions! Tips & Tricks | Configuration | Common Problems.

Seek and ye shall find Contributions.

My Contributions

My Blog

Share this post


Link to post
Share on other sites
Sheepo,

 

I'm not an expert but my guess is that if you change it, then current, on-line shoppers will get a new sessionID which will disconnect them from their carts.  That's a guess but I'd wait til activity has died down and then make the switch. 

 

Modding that one line should be all you need to switch the session storage.  It is actually recommended as a more secure, reliable session storage.  With that said, that may or may not fix the status lights  :-"

 

ed

 

That seems a bit better...just went to mysql and the colours are nice and pretty.

 

Ta.

 

M.

Share this post


Link to post
Share on other sites

So, it seems we have a known issue. In v1.5, the status lights ONLY work with sessions stored in mySQL.

 

Please post any other issues or questions as they arise.

 

Thanks.

ed

Edited by medvid

Answers to osCommerce's most persistent questions! Tips & Tricks | Configuration | Common Problems.

Seek and ye shall find Contributions.

My Contributions

My Blog

Share this post


Link to post
Share on other sites

Ok, for some reason, I can't get the icon_status_white.gif file to save into my folder.

 

Is there anyone else having that problem? Does anyone have a solution?

 

 

 

**************** NEVERMIND... PROBLEM FIXED ITSELF ****************

Edited by Fireman-911

Joel Gallant

Share this post


Link to post
Share on other sites
Tony,

 

Let me know how the colors work.  I added alt text.  Also, with Green as active and Red as inactive, and the entries sorted by last click, the Green and Blue lights should be at the top and the Yellow and Red lights should be at the bottom.  That might help differentiate.

 

ed

 

 

The colours are more than fine for me - thanks. Although my colour blindness is only mild compared to many I think most will be OK. The 'tones' are different enough for them to be easily recognized no matter what the colour looks like to someone :)

 

Thanks again.

Share this post


Link to post
Share on other sites

Question of time...

 

Currently, from what I can see, it is set up to be on EST. Now, I live in Atlantic Canada & would like to see it listed in AST. Where do I look to change that?


Joel Gallant

Share this post


Link to post
Share on other sites

Ed, Nice job.

 

Is there a way to add a font class to:

 

Active/Cart Active/NoCart

Inactive/Cart Inactive/NoCart

NoSession/Bot

 

I would like to change the appearance, I do not know PHP only some html

 

Thanks, Jimmy

 

OSC www.dvbhardware.com


I'm not a coder just a splicer.

Share this post


Link to post
Share on other sites

Jimmy,

 

Look for:

<!-- WOL 1.5 - Status Legend -->
           <td rowspan="2" align="right">

 

Change it to say:

<!-- WOL 1.5 - Status Legend -->
           <td rowspan="2" align="right" class="foo">

where foo is the name of a style in your css file. For example, setting class="dataTableContent" would make it the same style as the text entries in the table.

 

ed


Answers to osCommerce's most persistent questions! Tips & Tricks | Configuration | Common Problems.

Seek and ye shall find Contributions.

My Contributions

My Blog

Share this post


Link to post
Share on other sites
Question of time...

 

Currently, from what I can see, it is set up to be on EST. Now, I live in Atlantic Canada & would like to see it listed in AST. Where do I look to change that?

 

Joel,

 

Apparently, setting the time is a server issue, not an osC issue. I searched the forums using "local time". The best I found was this thread. Hope that helps.

 

ed


Answers to osCommerce's most persistent questions! Tips & Tricks | Configuration | Common Problems.

Seek and ye shall find Contributions.

My Contributions

My Blog

Share this post


Link to post
Share on other sites
Joel,

 

Apparently, setting the time is a server issue, not an osC issue.  I searched the forums using "local time".  The best I found was this thread.  Hope that helps.

 

ed

 

 

Thanks for the reply! I'll have to check that out!


Joel Gallant

Share this post


Link to post
Share on other sites
So, it seems we have a known issue.  In v1.5, the status lights ONLY work with sessions stored in mySQL.

 

Please post any other issues or questions as they arise.

 

Thanks.

ed

 

So, if one is using MySQL, there's not an issue... only if one is not using MySQL is there an issue. Correct? As I'm using MySQL, I (or anyone else using MySQL) wouldn't run into this issue.

 

Thanks!

BD

Share this post


Link to post
Share on other sites

I think you need to change the number 300 to 180 in a couple of places (around lines 75 and 76) to make the 3 minute refresh work right.

 

Other than that it seems to work great. Nice job!

Share this post


Link to post
Share on other sites
So, if one is using MySQL, there's not an issue... only if one is not using MySQL is there an issue. Correct? As I'm using MySQL, I (or anyone else using MySQL) wouldn't run into this issue.

 

Thanks!

BD

 

BD,

 

That appears to be the case from a few people posting here. As I use mySQL for sessions, I admit to using the code I was given and not really testing it. :blush: If someone really needs to store sessions in files and wants to use this contrib, post here and I'll work on it.

 

ed


Answers to osCommerce's most persistent questions! Tips & Tricks | Configuration | Common Problems.

Seek and ye shall find Contributions.

My Contributions

My Blog

Share this post


Link to post
Share on other sites
I think you need to change the number 300 to 180 in a couple of places (around lines 75 and 76) to make the 3 minute refresh work right.

 

Other than that it seems to work great.  Nice job!

 

Dave,

 

I knew that was there in v1.4 but I thought I fixed it in v1.5. Good catch.

 

Thanks,

ed


Answers to osCommerce's most persistent questions! Tips & Tricks | Configuration | Common Problems.

Seek and ye shall find Contributions.

My Contributions

My Blog

Share this post


Link to post
Share on other sites
Dave,

 

I knew that was there in v1.4 but I thought I fixed it in v1.5.  Good catch.

 

Thanks,

ed

BTW, I borrowed your refresh code and stuck it on the Visitor Web Stats contribution (and changed the times to 10, 20, 30, and 60 minutes). Works like a charm.

Share this post


Link to post
Share on other sites

Dave,

 

Thanks should go to earlier Whos online contributors.

 

I was looking at the Visitor Web Stats contrib. V2.0 simply has a readme file with a URL. I went to the URL and can't find the contrib. Is this some guys attempt to advertise his web services or is there really a v2.0? Which version do you use?

 

Thanks,

ed


Answers to osCommerce's most persistent questions! Tips & Tricks | Configuration | Common Problems.

Seek and ye shall find Contributions.

My Contributions

My Blog

Share this post


Link to post
Share on other sites
Dave,

 

Thanks should go to earlier Whos online contributors.

 

I was looking at the Visitor Web Stats contrib.  V2.0 simply has a readme file with a URL.  I went to the URL and can't find the contrib.  Is this some guys attempt to advertise his web services or is there really a v2.0?  Which version do you use?

 

Thanks,

ed

I'm using the old version (slightly modified). I couldn't find the new version either. I suspect that if it is there, you may need to set up an account to find it. I'm waiting to see if it gets posted in the contributions section on this site.

 

Dave

Share this post


Link to post
Share on other sites

Ok... I have a question regarding the Bots?

 

I have had google & Inktome/Yahoo spider my site; however, I've never had it come up as a bot on my admin panel. Does any one have any suggestions or know why this is?


Joel Gallant

Share this post


Link to post
Share on other sites

Hey guys,

I want to add IP's of "known" bots (it's never an exact since though). With the following code:

 

else if (strncmp($whos_online['ip_address'], "65.54.188", 9) == 0 )

 

Is that basically saying the the IP 65.54.188 and anything following that? I'm not sure what the 9 is at the end of that. What I mean is, is it kind of a wild card, like saying: 65.54.188.*? Let's say I want to add the following IP's

 

164.71.1.146

164.71.1.147

164.71.1.148

164.71.1.149

 

Would my added code look like:

 

else if (strncmp($whos_online['ip_address'], "164.71.1", 9) == 0 )

 

Will the above line take care of all of those different endings after the last period? Thanks,

BD

Share this post


Link to post
Share on other sites
Hey guys,

I want to add IP's of "known" bots (it's never an exact since though). With the following code:

 

else if (strncmp($whos_online['ip_address'], "65.54.188", 9) == 0 )

 

Is that basically saying the the IP 65.54.188 and anything following that? I'm not sure what the 9 is at the end of that. What I mean is, is it kind of a wild card, like saying: 65.54.188.*? Let's say I want to add the following IP's

 

164.71.1.146

164.71.1.147

164.71.1.148

164.71.1.149

 

Would my added code look like:

 

else if (strncmp($whos_online['ip_address'], "164.71.1", 9) == 0 )

 

Will the above line take care of all of those different endings after the last period? Thanks,

BD

 

BD,

 

strncmp does a string compare of the first n characters. The 9 is saying, compare the first 9 characters of $whos_online['ip_address'] with 65.54.188. For your example, 164.71.1 is 8 characters long so change the 9 to an 8.

 

 

 

I don't like this solution because it requires you to change the code whenever Bots change their IP addresses or new Bots get created. (Yes, I'm also the one to put this logic in Whos Online Enhancement :blush:. I did it because it worked for the short term.)

 

I've actually looked at another whos online contrib and seen how they get the agent name of the Bot when it visits the site and stores it in the whos online table. As long as the Bots advertise their names (major ones do, some minors may not), their solution will work a lot of the time. When I get it working nicely, I'll post it as v1.6. (One nice thing about Open Source is the ability to borrow code :-" )

 

ed


Answers to osCommerce's most persistent questions! Tips & Tricks | Configuration | Common Problems.

Seek and ye shall find Contributions.

My Contributions

My Blog

Share this post


Link to post
Share on other sites
Ok... I have a question regarding the Bots?

 

I have had google & Inktome/Yahoo spider my site; however, I've never had it come up as a bot on my admin panel. Does any one have any suggestions or know why this is?

 

Joel,

 

v1.4 and v1.5 have Bot IP addresses hardcoded into the code. It is possible that the Bots you are seeing have different IP addresses then the ones I hardcoded. See my other post just before this one about a possible solution I'm working on.

 

ed


Answers to osCommerce's most persistent questions! Tips & Tricks | Configuration | Common Problems.

Seek and ye shall find Contributions.

My Contributions

My Blog

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

×