Resizing the map to fit Tiny Portal
Not really a block code snippet, but how to get the mod to work with TP. The size of the map is contolled from the database so changing the size of the map itself has no effect.
If you want to do it before you install you can edit the install.php file and add it to the mod zip file.
Find
// insert the maps
db_query("INSERT INTO {$db_prefix}mm_maps VALUES (1, 'World.gif', 'World', 0, 6000, 0, 3044, 0.13, 1)", __FILE__, __LINE__);
replace with
// insert the maps
db_query("INSERT INTO {$db_prefix}mm_maps VALUES (1, 'World.gif', 'World', 0, 6000, 0, 3044, 0.115, 1)", __FILE__, __LINE__);
The changed value scales the map image, 0.13 matches the world.gif width of 780px, changing it to 0.115 will reduce the displayed width to 690px which fits nicely with one sidebar of 180px. If you then wish you can resize the map and reduce the file size.
To do it manually find [$db_prefix]mm_maps and edit the scale field
Adding Flags
If you want to add more flags you can also do that by editing the install.php file
All countries listed are added to the database with lines like this:
db_query("INSERT INTO {$db_prefix}location_country VALUES ('us', 'United States', 10)", __FILE__, __LINE__);
Modify the VALUES('us', 'United States',
The 'us' is the file name of the flag file i.e. us.png (all png files) must be 2 letters has to be unique.
The 'United States' is the country name to be displayed, change it to whatever you want, maximum 42 characters.
The number following the country name I believe is a map reference number, so put the same one as the nearest country i.e. if you want to add Texas, use the same as 'United States', 10.
Create your flag, size 25px x 15px and put it with the rest of the flags in the default/images/flags folder.
how can i make like this?
http://www.tinyportals.com/main/index.php?PHPSESSID=e9adfd9be2de085aae9a942776bf9535&action=googlemap
I think that is something that can only be answered on Tiny Portals.
confused...
where is the mod in the 1st place??
The Location Mod is an SMF mod. It was not designed to be used with Tiny Portal sidebars. My code snippet above is to alter the display size for Tiny Portal with a sidebar.
Tiny Portals is website, there is a link to it in the links block in the sidebar.