ktbabe wrote:
Is there anyway of stopping it resetting every time someone edits their profile?
ehm, don't quite get what you're saying. what exactly is resetting?
What would a person do that uses other than the default phpbb_ table within his/her database? You have it hard coded to install with the default settings.
You got me. That definitely is a bug. Do the following.
Find
Code: Select all
$sql = "ALTER TABLE `phpbb_users` ADD `user_long` FLOAT( 6 ) NOT NULL ,
ADD `user_lat` FLOAT( 6 ) NOT NULL";
$db->sql_query($sql);
$sql = "INSERT INTO `phpbb_config` ( `config_name` , `config_value` )
VALUES ('atlas_start_long', '0'),
('atlas_start_lat', '0'),
('atlas_start_zoom', '11'),
('atlas_width', '600'),
('atlas_height', '450'),
('atlas_start_map_type', '0'),
('atlas_google_api_key', '" . str_replace("\'", "''", $HTTP_POST_VARS['install_key']) . "'),
('atlas_google_api_key_admin', '" . str_replace("\'", "''", $HTTP_POST_VARS['install_key_admin']) . "'),
('atlas_control_glmc', 1),
('atlas_control_gsmc', 0),
('atlas_control_gszc', 0),
('atlas_control_gmtc', 1),
('atlas_override_center_to_user', 0),
('atlas_override_automode', 0),
('atlas_distance_unit', 'km')";
$db->sql_query($sql);
and replace it with
Code: Select all
$sql = "ALTER TABLE " . USERS_TABLE . " ADD `user_long` FLOAT( 6 ) NOT NULL ,
ADD `user_lat` FLOAT( 6 ) NOT NULL";
$db->sql_query($sql);
$sql = "INSERT INTO " . CONFIG_TABLE . " ( `config_name` , `config_value` )
VALUES ('atlas_start_long', '0'),
('atlas_start_lat', '0'),
('atlas_start_zoom', '11'),
('atlas_width', '600'),
('atlas_height', '450'),
('atlas_start_map_type', '0'),
('atlas_google_api_key', '" . str_replace("\'", "''", $HTTP_POST_VARS['install_key']) . "'),
('atlas_google_api_key_admin', '" . str_replace("\'", "''", $HTTP_POST_VARS['install_key_admin']) . "'),
('atlas_control_glmc', 1),
('atlas_control_gsmc', 0),
('atlas_control_gszc', 0),
('atlas_control_gmtc', 1),
('atlas_override_center_to_user', 0),
('atlas_override_automode', 0),
('atlas_distance_unit', 'km')";
$db->sql_query($sql);
that should be it as I do not use fixed table prefixes anywhere else. If you are still experiencing problems please tell me what exactly is not working. this issue will be resolved in 0.2.1.