Location Mod

Started by Gobalopper, November 19, 2004, 01:43:12 AM

Previous topic - Next topic

fun4us

#900
i tried to install this mod on a fresh and clean installed 1.1 rc.2

first i got errors that the mod cannot be installed correct

7.     Execute Modification     smf1.1.x/install.xml     Modification parse error
8.    Execute Modification    -    Modification parse error

After doing all by hand installing the tables changing all the files by hand, the button apears, the admin panel is working but when i click on the member_map button the following error is shown

Unknown column 'p.country' in 'on clause'
File: /www/.../htdocs/smf/Sources/MemberMap.php
Line: 101

mysql version is 5.0.18

Theme is default, language is english

Whats wrong?

Stefan



fun4us

#901
If done some tests and have found there is a problem with this sql statement

MemberMap.php

// get all the pins
$request = db_query("
SELECT p.ID_MAP, p.ID_MEMBER, p.xPin, p.yPin, p.country, p.city, mem.gender, mem.realName, c.name
FROM {$db_prefix}mm_pins AS p, {$db_prefix}members AS mem
LEFT JOIN {$db_prefix}location_country AS c ON c.c2code = p.country
WHERE (p.xPin BETWEEN {$context['maps'][$ID_MAP]['xStart']} AND {$context['maps'][$ID_MAP]['xEnd']})
AND (p.yPin BETWEEN {$context['maps'][$ID_MAP]['yStart']} AND {$context['maps'][$ID_MAP]['yEnd']})
AND p.ID_MEMBER = mem.ID_MEMBER
ORDER BY c.name, mem.realName", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))


when i change some parts of the SQL the map is shown. Seems to be incompatible or something else.
But i have no solution for the problem, it was only a test.

Stefan

fun4us

after a little try and error, this seems to work

// get all the pins
$request = db_query("
SELECT p.ID_MAP, p.ID_MEMBER, p.xPin, p.yPin, p.country, p.city, mem.gender, mem.realName, c.name
FROM {$db_prefix}mm_pins, {$db_prefix}members AS mem
LEFT JOIN ({$db_prefix}location_country AS c, {$db_prefix}mm_pins AS p) ON (c.c2code = p.country)
WHERE (p.xPin BETWEEN {$context['maps'][$ID_MAP]['xStart']} AND {$context['maps'][$ID_MAP]['xEnd']})
AND (p.yPin BETWEEN {$context['maps'][$ID_MAP]['yStart']} AND {$context['maps'][$ID_MAP]['yEnd']})
AND p.ID_MEMBER = mem.ID_MEMBER
ORDER BY c.name, mem.realName", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))

Gobalopper

Thanks fun4us, I've been meaning to get a server where I could test with MySQL 5 but haven't been able to. I will try to get a new version out shortly with that fix.

fun4us

#904
Yeah it works now  :D

Very nice mod, but i have to install it step by step because the installation would'nt work. Don't know why because it was a fresh install ...

but it works  - *smile* :D :D

How can an Admin change the users pins (move / delete /add)?

Stefan

beemer

Quote from: fun4us on March 28, 2006, 11:02:38 AM
Yeah it works now  :D

Very nice mod, but i have to install it step by step because the installation would'nt work. Don't know why because it was a fresh install ...

but it works  - *smile* :D :D

How can an Admin change the users pins (move / delete /add)?

Stefan

Not easily, would be a nice feature

You have to edit in phpmyadmin
http://www.bmw7resource.co.uk
SMF 1.1 RC1
MKP 1.1 RC1
Helios Multi RC1
-------------------------------------------------------
http://www.thefishsheadnhorsesarse.co.uk
SMF 1.1 RC2
TinyPortal 0.8.6

Cocoon

Does the Location Mod work with the latest version (1.0.7)?

I have a clean install of 1.0.7, and when I try to install the mod through PacMan, it comes up with

Install Actions for archive gobalopper.locationmod.zip:
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.


Then, when I am taken back to the Package manager install page, I am only presented with the option of 'List Files' (this works, and all the files in the package are there) and 'Delete' - no 'Install/Uninstall' option.

Install worked under 1.0.6 on same server with same settings.
Cocooned in Code from dusk 'til dawn.

Browse safe, Browse Happy

beemer

Absolutely no reason why it shouldnt work on 1.07

But you will need to edit package-info.xml and add 1.07 to it
http://www.bmw7resource.co.uk
SMF 1.1 RC1
MKP 1.1 RC1
Helios Multi RC1
-------------------------------------------------------
http://www.thefishsheadnhorsesarse.co.uk
SMF 1.1 RC2
TinyPortal 0.8.6

perplexed

Quote from: Bigguy on February 15, 2006, 04:32:08 PM
I have install all of this just minutes ago on smf 1.1rc2 and it works awesome but I can`t place a pin, Is there a simple fix ???

EDIT: got it. Sorry bout that. I had to edit the script file.

hi bigguy
I think I have the same problem now I have joomla.  I cant place a pin as it doesnt display the map anymore (it used to work perfectly before the bridge)

Would you pls be able to tell me what you did exactly to fix the problem

~thanks very much

Bigguy

i found that the google map wont really work with Joomla so I uninstalled it and moved it to Joomla as they also offer a google member map.

Gobalopper

Most likely its a javascript problem. Make sure you have the pin placement code in your javascript files.

amoebae

Quote from: fun4us on March 28, 2006, 05:55:12 AM
Unknown column 'p.country' in 'on clause'
File: /www/mineralienatlas/htdocs/smf/Sources/MemberMap.php
Line: 101

I get the same error, but without any errors during the installation of the mod. I use 1.1 RC2. I suppose there's a line missing in the installation, which doesn't add this column to a table. Are you sure, that the column is called "p.country" and not simply "country" in mm_pins?

Gobalopper

I think the problem is related to MySQL 5. Is that what you are running?

Niteblade

Error : Unknown column 'p.country' in 'on clause'


I googled "phpinfo.zip" and this is what it revealed ...

PHP Version 5.1.2

mysql
MySQL Support enabled
Active Persistent Links  0 
Active Links  0 
Client API version  5.0.16 
MYSQL_MODULE_TYPE  external 
MYSQL_SOCKET  /var/run/mysqld/mysqld.sock 
MYSQL_INCLUDE  -I/usr/include/mysql 
MYSQL_LIBS  -L/usr/lib -lmysqlclient 
affiliate blog

Gobalopper

Ok there is a new version of locationmod.zip posted, give that a try for those of you with MySQL 5.

Gobalopper

Ok disregard my last post. :)

I've finally gotten a server to test with MySQL 5 and the version I've just posted should work.

If you already have the mod installed then you can look for this:
FROM {$db_prefix}mm_pins AS p, {$db_prefix}members AS mem
LEFT JOIN {$db_prefix}location_country AS c ON c.c2code = p.country


and replace it with this:
FROM {$db_prefix}members AS mem
LEFT JOIN ({$db_prefix}location_country AS c, {$db_prefix}mm_pins AS p) ON (c.c2code = p.country)

blazin6543

great little mod i like it :) im just wondering how do i use the "who flags" part of the mod??? i cant see the flag when i am online isnt that what it does?? ???

DemonicInfluence

You have to look in action=who..

TheAmazingRando

Quote from: perplexed on April 02, 2006, 10:06:38 AM
Quote from: Bigguy on February 15, 2006, 04:32:08 PM
I have install all of this just minutes ago on smf 1.1rc2 and it works awesome but I can`t place a pin, Is there a simple fix ???

EDIT: got it. Sorry bout that. I had to edit the script file.

hi bigguy
I think I have the same problem now I have joomla.  I cant place a pin as it doesnt display the map anymore (it used to work perfectly before the bridge)

Would you pls be able to tell me what you did exactly to fix the problem

~thanks very much

I'm having this problem too.  Does anyone know how to fix this?  Bigguy, do you know what script we need to edit?  Thanks!

Bigguy

This could be the problem

Quote from: Gobalopper on April 02, 2006, 04:51:02 PM
Most likely its a javascript problem. Make sure you have the pin placement code in your javascript files.

Advertisement: