Unofficial modifications
nieoficjalne modyfikacje for?w phpBB by Przemo

Pomoc dla modyfikacji - problem z mapa google

T@rsch - Nie 13 Sie, 2006
Temat postu: problem z mapa google
pokazuje mi si? taki b??d
Kod
Error occured while importing user data.

DEBUG MODE

SQL Error : 1054 Nieznana kolumna 'user_long' w field list

SELECT user_long, user_lat, user_id, username, user_level, user_from, user_session_time FROM phpbb1_users WHERE user_long <> '' and user_lat <> ''

Line : 66
File : functions_map.php

INIM - Nie 13 Sie, 2006

Kod
Line : 66
File : functions_map.php


Pokaz 66 linike pliku functions_map.php

T@rsch - Nie 13 Sie, 2006

choc samnie wiem czemu jest b?ad skoro podmieni?emtylko pliki. niestety nie wiem kt?a to linia 66 bo jamamtlyko notatnik a tu mi nie pokazuje
wiec daje
Kod
<?php
/***************************************************************************
*
* title: Mapa Google
* file: functions_map.php
* authors: qbs
* paszczak
* web: beatsfactory.pl/qbs/
* paszczak.thecamels.org
*
* --- Based on --------------------
*
* MOD : GMap Mod
* file : functions_map.php
* copyright : (C) 2005 L?viathan
*
***************************************************************************/

/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/

function unpolish( $txt )
{
$txt = str_replace( '±', 'a', $txt );
$txt = str_replace( '?', 'A', $txt );
$txt = str_replace( '?', 'c', $txt );
$txt = str_replace( '?', 'C', $txt );
$txt = str_replace( '?', 'e', $txt );
$txt = str_replace( '?', 'E', $txt );
$txt = str_replace( '?', 'l', $txt );
$txt = str_replace( '?', 'L', $txt );
$txt = str_replace( '?', 'n', $txt );
$txt = str_replace( '?', 'N', $txt );
$txt = str_replace( '?', 'o', $txt );
$txt = str_replace( '?', 'O', $txt );
$txt = str_replace( '¶', 's', $txt );
$txt = str_replace( '¦', 'S', $txt );
$txt = str_replace( '?', 'z', $txt );
$txt = str_replace( '¬', 'Z', $txt );
$txt = str_replace( '?', 'z', $txt );
$txt = str_replace( '?', 'Z', $txt );

return $txt;
}

$file_xml = $phpbb_root_path . "markers.xml";

$id_file = @fopen($file_xml, "w+") or die('Blad zapisu do pliku markers.xml. Ustaw chmod 777');

$file_text = "<markers>\n\n";

$sql_select = "";
$sql = " SELECT user_long, user_lat, user_id, username, user_level, user_from, user_session_time
FROM " . USERS_TABLE . "
WHERE user_long <> '' and
user_lat <> ''";

if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Error occured while importing user data.", "", __LINE__, __FILE__, $sql);
}

while ( $users_rows = $db->sql_fetchrow($result) )
{
$time_exp = time() - $users_rows['user_session_time'];
$type = ( $time_exp <= 300 && $users_rows['user_level'] == 1 ) ? 'green' : $type;
$type = ( $time_exp <= 300 && $users_rows['user_level'] == 2 ) ? 'yellow' : $type;
$type = ( $time_exp > 300 && $users_rows['user_level'] ) ? 'red' : $type;
$type = ( $time_exp <= 300 && !$users_rows['user_level'] ) ? 'white' : $type;
$type = ( $time_exp > 300 && !$users_rows['user_level'] ) ? 'gray' : $type;
$file_text .= '<marker lng="' . $users_rows['user_long'] . '" lat="' . $users_rows['user_lat'] . '" title="' . unpolish($users_rows['username']) . '" text="' . unpolish($users_rows['user_from']) . '" type="' . $type . '" />' . "\r\n";
}

$file_text .= "\n</markers>";


$verify = @fwrite($id_file,$file_text) or die('File Error #2');

$verify = @fclose($id_file) or die('File Error #3');

?>


[ Dodano: Nie 13 Sie, 2006 ]
i jeszcze w PA nie dzia?? mi mapka

INIM - Nie 13 Sie, 2006

Ja tez nie mam zadnego programu do sprawdzenia ktora linika, ale jesli dobrze policzylem to ta linika jest 66 :)

message_die(GENERAL_ERROR, "Error occured while importing user data.", "", __LINE__, __FILE__, $sql);

T@rsch - Nie 13 Sie, 2006

to gdzietu jest b?ad?
KnofeL - Nie 13 Sie, 2006

Jak ci ma to dzia?a? skoro przekopiwoa??? tylko pliki :?

Pisze przeciez ?e nieznana kolumna, wiec napewno nie wykona?e? zapytania SQL

T@rsch - Nie 13 Sie, 2006

noracja.;(

a jak je wykonac bo ja nie mam zielonego pojecia?

i dlaczego w pa nei widac mapki?

KnofeL - Nie 13 Sie, 2006

Dlatego ?e nie wykona?e? wszystkiego jak trzeba, a zapytanie wykonuje si? w PA -> SQL (O ile dobrze pamietam) lub przez PHPMyAdmina... Ale wystarszy u?y? opcji szukaj i napewno ju? o tym by?o
T@rsch - Nie 13 Sie, 2006

a jakie to sa zapytania ? bo nie moge znelsc i jeszcze net mimuli. sorki bardzo
ciaastek - Pon 14 Sie, 2006

instrukcja....
T@rsch - Pon 14 Sie, 2006

i teraz to nawet rejestrowac si? nei mo?na:(((

to jest to?
Kod

#
#-----[ SQL ]------------------------------------------
#


ALTER TABLE `phpbb_users` ADD `user_long` FLOAT( 6 ) NOT NULL , ADD `user_lat` FLOAT( 6 ) NOT NULL;
INSERT INTO `phpbb_config` ( `config_name` , `config_value` ) VALUES ('googlemap_start_long', '19');
INSERT INTO `phpbb_config` ( `config_name` , `config_value` ) VALUES ('googlemap_start_lat', '52');
INSERT INTO `phpbb_config` ( `config_name` , `config_value` ) VALUES ('googlemap_start_zoom', '14');
INSERT INTO `phpbb_config` ( `config_name` , `config_value` ) VALUES ('googlemap_width', '700');
INSERT INTO `phpbb_config` ( `config_name` , `config_value` ) VALUES ('googlemap_height', '490');
INSERT INTO `phpbb_config` ( `config_name` , `config_value` ) VALUES ('googlemap_start_map_type', '1');
INSERT INTO `phpbb_config` ( `config_name` , `config_value` ) VALUES ('googlemap_google_api_key', '');
INSERT INTO `phpbb_config` ( `config_name` , `config_value` ) VALUES ('googlemap_google_api_key_admin', '');
INSERT INTO `phpbb_config` ( `config_name` , `config_value` ) VALUES ('googlemap_show_stats', '1');

KnofeL - Pon 14 Sie, 2006

tak
T@rsch - Pon 14 Sie, 2006

wiem ze ejstem ciemny aleajk to wklei?em to pisze ze nei mozna wykonac zapytania
Kod
ALTER TABLE `phpbb_users` ADD `user_long` FLOAT( 6 ) NOT NULL , ADD `user_lat` FLOAT( 6 ) NOT NULL;

KnofeL - Pon 14 Sie, 2006

Mo?e masz prefiks inny ni? PHPBB :?:
T@rsch - Pon 14 Sie, 2006

tak phpbb1_ tak imam. to co mamzrobic?? bede ci wdzieczny jak to si? uda.
KnofeL - Pon 14 Sie, 2006

zamiast phpbb_ da? phpbb1_ :roll:
T@rsch - Pon 14 Sie, 2006

dzieki to pomog?o.

a teraz druga srpawa dlaczego mapa w PA jest bia?a? nic na niej nie widac.


Powered by phpBB modified by Przemo © 2003 phpBB Group