Jump to content
Sign in to follow this  
Druide

User Tracking with Admin 1.31 Released

Recommended Posts

did you download the GeoIP.dat file as specificed in the installation directions and place it in the correct folder?

 

it is complaining that it cannot open the file


Reading is beneficial - Searching is enlightening

find answers at wiki.oscommerce.com/top

Share this post


Link to post
Share on other sites

ok, did you change the path in the statement below to match your path:

 

Add to admin/includes/footer.php (at the bottom):

 

<?php

require('../../catalog/' . DIR_WS_FUNCTIONS . 'user_tracking.php');

 

if ( ADMIN_CONFIG_USER_TRACKING == 'true') { tep_update_user_tracking(); }

 

?>

 

NOTE: replace /catalog/ with your named directory


Reading is beneficial - Searching is enlightening

find answers at wiki.oscommerce.com/top

Share this post


Link to post
Share on other sites

i am working on a NEW version without the FLAG stuff, its nice but not where the modification originaly was written for I believe...

 

it still is a Shopping Cart, not a postnuke site or so....lol

 

it will be faster then the current one (speed is the important issue here with such queries)


Robert

 

We all need to learn it once, how hard it may seem when you look at it, also you will master it someday ;)

Share this post


Link to post
Share on other sites

well there are only 2 other things that i can possibly think of that could cause the error:

 

1) permission on the file not set correctly

2) the file is corrupt (GeoIP)


Reading is beneficial - Searching is enlightening

find answers at wiki.oscommerce.com/top

Share this post


Link to post
Share on other sites

Re checked everything and downloaded the GeoIP.dat file again but still doesn't work. Been working on this for the last 4 hours but can't find a solution. I've had enough for one day.

 

Thanks for the responses so far, any further help would be much appreciated.

 

By the way I'm working with Loaded 5 and Windows ME

Share this post


Link to post
Share on other sites

AARGHHH Win ME

 

that's buggy with PHP

 

Better check php.net for more info


Robert

 

We all need to learn it once, how hard it may seem when you look at it, also you will master it someday ;)

Share this post


Link to post
Share on other sites

the admin section is working fine and I can see all the IP's etc.

 

But i am getting this error at the bottom of my main page (i.e. catalog)

 

Fatal error: Cannot redeclare tep_update_user_tracking() (previously declared in /home/arabianb/www/www/includes/functions/user_tracking.php:18) in /home/arabianb/www/www/includes/functions/user_tracking.php on line 16

Share this post


Link to post
Share on other sites

Got it solved ,

 

it was from the other User Tracking contribution which I had.

 

Everything is working fine now under Loaded 5

Share this post


Link to post
Share on other sites

Checking the properties of GeoIP.dat I noticed that it was a filetype gz. I added this to line 23 in admin/user_tracking.php so it reads:

 

$gi = geoip_open(DIR_WS_INCLUDES .  'GeoIP.dat.gz',GEOIP_STANDARD);

 

and it worked (as far as the next problem). Can someone explain what is going on here? I realised it was not finding GeoIP.dat but what is a .gz file and how do I remove this property from the file so it is a .dat type?

 

Now I get a user tracking screen displayed but with a

 

Fatal error: error traversing database - perhaps it is corrupt? in c:phpdevwwwcatalogadminincludesgeoip.inc on line 220

 

Am I right in thinking that function _geoip_seek_country in geoip.inc (which contains line 220) is checking the IP address to work out the country?

If so could it fail because my site is still on localhost?

 

Still determined to get this working because it looks like such a useful contribution. Doubt I'll be the last to hit these problems so help please?

Share this post


Link to post
Share on other sites

From Greg:

 

"oh - .gz is a form of compression. WinZip will uncompress it. Treat it the same way you would GeoIP.zip..."

 

take the .dat file and unzip it and the .gz disappears. .gz is a unix form of zip?

 

Now I am just missing the flags, but I'm sure I will crack this tomorrow.

 

Thanks to all for help

Share this post


Link to post
Share on other sites

I've been testing this on localhost and it now works ok except I don't get a flag for any of the users (which are all me of course)

 

Is this right or should I still be able to see a flag?

Share this post


Link to post
Share on other sites

I was having probs with the images too.. it seems that the script is calling US.gif but the file is us.gif

Right click on your missing image and see if this is the case

 

Tracy


If life begins at 40..... What ends at 39????

Share this post


Link to post
Share on other sites

it may be a local issue - when i first installed the version with flags and tested it on my local machine the flags were not showing - when it uploaded it to my production server the flags showed up....?


Reading is beneficial - Searching is enlightening

find answers at wiki.oscommerce.com/top

Share this post


Link to post
Share on other sites

Hey folks,

 

Any idea why I'm not getting referers in 1.34? Only 2 out of 13 have an "Originating URL" entry, even though my apache logs show their referers.

 

Suggestions?

 

Brad Waite

Share this post


Link to post
Share on other sites

this is the problem after i installed whos_online_country_1.0 and User Tracking with Admin 1.34,

 

Snap4.gif

 

these flag pictures only can be viewed in User Tracking with Admin 1.34 , not in whos_online_country_1.0

 

anybody knows what is going on?

 

thanks

sean

Share this post


Link to post
Share on other sites

The problem most likely has to do with case sensitivity on the server you're on.

 

If you look in User Tracking, I changed the image call so that it bumps the result down to lowercase in all cases:

<?php echo tep_image(DIR_WS_FLAGS . strtolower(geoip_country_code_by_addr($gi, $ut['value']['ip_address'])) . '.gif', geoip_country_name_by_addr($gi, $ut['value']['ip_address'])); ?>

 

To do the same in whos_online.php, call the image like this:

<td class="dataTableContent" align=center><?php echo tep_image(DIR_WS_FLAGS . strtolower(geoip_country_code_by_addr($gi, $whos_online['ip_address'])) . '.gif', geoip_country_name_by_addr($gi, $whos_online['ip_address'])); ?></TD>

 

The most recent version has all of the flag images as lowercase files.

 

- Greg

Share this post


Link to post
Share on other sites

we can always count on Greg to find those small, obscure, drive you crazy types of things with nice simple solutions :D

 

way to go 8)


Reading is beneficial - Searching is enlightening

find answers at wiki.oscommerce.com/top

Share this post


Link to post
Share on other sites

hi, i copied the code and work perfectly with who's online contri , and now the flags appeared.

 

but i only see the flags but no conntry name, some of countries flags i know which is which, but some of them i don't know.

 

Is there a way to add country's name next to the flags like User Tracking with Admin 1.34?

 

 

thanks

sean

Share this post


Link to post
Share on other sites

You'll notice that the country name is set as an ALT tag for the flag images in Who's Online. If you don't recognize the flag, you can mouseover to see the country name. This works for me because I am most concerned with US and Canadian users.

 

If you want to display the name next to the flag (this caused some minor layout hiccups on my end), just change the above code to:

<td class="dataTableContent" nowrap><?php echo tep_image(DIR_WS_FLAGS . strtolower(geoip_country_code_by_addr($gi, $whos_online['ip_address'])) . '.gif', geoip_country_name_by_addr($gi, $whos_online['ip_address'])).' '. geoip_country_name_by_addr($gi, $whos_online['ip_address']); ?></TD>

 

I'll publish my changes to Who's Online in the AM.

 

- Greg

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
Sign in to follow this  

×