Default startside..
Discussion in "Map Me Support" started by gab Jan 7, 2008.
Mon Jan 07 2008, 09:17 pm
Hi,
I like your plugin, mapme... but can I configure it to show my country when
new user enter it for the first time?
/g
I like your plugin, mapme... but can I configure it to show my country when
new user enter it for the first time?
/g
Mon Jan 07 2008, 09:38 pm
Hi Gab,
do this way.. open file "mapconfig.php"
look for this code..
make the changes on default lat lng.. that all... get the lat long for your country from any google map...
give feedback..
do this way.. open file "mapconfig.php"
look for this code..
else{ $sql-> mySQLresult = @mysql_query("SELECT * FROM ".MPREFIX."gmarkers WHERE user_id='".USERID."';"); $rows = $sql-> db_Rows(); if($rows){ $row = $sql-> db_Fetch(); $lat = $row['lat']; $lng = $row['lng']; $zoom = 6; } else { //This is the default lat long $lat = 0; $lng = 0; //change to the lat long of your country.. $zoom = 1; //also change the zoom to somewhere around 2 or 3 to get a better view.. }
make the changes on default lat lng.. that all... get the lat long for your country from any google map...
give feedback..
Mon Jan 07 2008, 10:04 pm
} else {
//This is the default lat long
$lat = 0;
$lng = 0;
//change to the lat long of your country..
$zoom = 1;
//also change the zoom to somewhere around 2 or 3 to get a better view..
}[/code]
make the changes on default lat lng.. that all... get the lat long for your country from any google map...
give feedback..Ajay
It dosen't work... I checked tables in mysql, it contains 0.000000 when empty.. :-)
/g
Mon Jan 07 2008, 11:53 pm
you are not getting my point..
make these changes
after above.. code.. by default marker will be on sweden.. if user has not marked any location on map. User has to change the location once..
But if you want that whenever use register.. the default location is somewhere in Sweden but not specific then..
you need to open plugin.php and edit the tables as..
and reinstall the plugin again..
make these changes
$lat = 59.00; $lng = 15.00; $zoom = 4;
after above.. code.. by default marker will be on sweden.. if user has not marked any location on map. User has to change the location once..
But if you want that whenever use register.. the default location is somewhere in Sweden but not specific then..
you need to open plugin.php and edit the tables as..
$eplug_tables = array(" CREATE TABLE ".MPREFIX."gmarkers ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , user_id varchar( 20 ) NOT NULL default '', loc varchar ( 50 ) NOT NULL default '', lat float( 10, 6 ) NOT NULL default 59.00, lng float( 10, 6 ) NOT NULL default 15.00, ) ENGINE = MYISAM ;");
and reinstall the plugin again..
Powered by e107 Forum System