Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

User Tracking with Admin 1.31 Released


Druide

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

Link to comment
Share on other sites

  • Replies 570
  • Created
  • Last Reply

Top Posters In This Topic

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

Link to comment
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 ;)

Link to comment
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)

Link to comment
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

Link to comment
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 ;)

Link to comment
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

Link to comment
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?

Link to comment
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

Link to comment
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

Link to comment
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....?

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...