diff --git a/CHANGELOG b/CHANGELOG index 033f383..8649fea 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,9 +1,12 @@ +<<<<<<< HEAD +======= Changes from v2.8.d to v2.9.a - Added "Select Place" functionality to batchmanagement - Allow more SSL geo providers - Fix logitude column - Update language, thanks to the contributors +>>>>>>> refs/remotes/Piwigo/master Changes from v2.8.c to v2.8.d - Fix PHP syntax diff --git a/admin/admin_config.php b/admin/admin_config.php index 1057105..f4305a8 100644 --- a/admin/admin_config.php +++ b/admin/admin_config.php @@ -119,6 +119,15 @@ '2' => l10n('NEVER'), ); +// TF, 20160102: give choice where to show clicked picture +// Available popup click targets +$available_popup_click_target = array( + '0' => l10n('BLANK'), + '1' => l10n('TOP'), +// '2' => l10n('SELF'), +// '3' => l10n('PARENT'), +); + // Available layout value $available_layout = array( '1' => 'osm-map.tpl', @@ -167,6 +176,7 @@ 'popupinfo_link' => isset($_POST['osm_left_popupinfo_link']), 'popupinfo_comment' => isset($_POST['osm_left_popupinfo_comment']), 'popupinfo_author' => isset($_POST['osm_left_popupinfo_author']), + 'popup_click_target'=> $_POST['osm_left_popup_click_target'], 'zoom' => $_POST['osm_left_zoom'], 'center' => $osm_left_center, 'autocenter' => get_boolean($_POST['osm_left_autocenter']), @@ -177,6 +187,10 @@ 'height' => $_POST['osm_cat_height'], 'width' => $_POST['osm_cat_width'], 'index' => $_POST['osm_cat_index'], +// TF, 20160102: improve performance by hiding gpx tracks of sub-categories + 'nogpxforsubcat' => get_boolean($_POST['osm_nogpxforsubcat']), +// TF, 20160102: improve performance by only showing firsat image of sub-categories + 'firstimageforsubcat' => get_boolean($_POST['osm_firstimageforsubcat']), ), 'main_menu' => array( 'enabled' => get_boolean($_POST['osm_main_menu']), @@ -199,7 +213,11 @@ 'attrimagery' => get_boolean($_POST['osm_attrimagery']), 'attrplugin' => get_boolean($_POST['osm_attrplugin']), 'mapquestapi' => $_POST['osm_mapquestapi'], +<<<<<<< HEAD + ), +======= ), +>>>>>>> refs/remotes/Piwigo/master 'pin' => array( 'pin' => $_POST['osm_pin'], 'pinpath' => $_POST['osm_pinpath'], @@ -229,6 +247,7 @@ 'AVAILABLE_BASELAYER' => $available_baselayer, 'AVAILABLE_PIN' => $available_pin, 'AVAILABLE_POPUP' => $available_popup, + 'AVAILABLE_POPUP_CLICK_TARGET' => $available_popup_click_target, 'AVAILABLE_LAYOUT' => $available_layout, 'NB_GEOTAGGED' => $nb_geotagged, 'OSM_PATH' => OSM_PATH, diff --git a/admin/admin_config.tpl b/admin/admin_config.tpl index 0707a1f..f49b70d 100644 --- a/admin/admin_config.tpl +++ b/admin/admin_config.tpl @@ -115,6 +115,16 @@ Refer to the {'No'|@translate}
{'The map will be automatically centered and zoomed to contain all infos.'|@translate} +<<<<<<< HEAD +
  • + + +
    {'LEFTPOPUPCLICKTARGET_DESC'|@translate} +
  • +======= +>>>>>>> refs/remotes/Piwigo/master
  • {'Yes'|@translate} + +
    {'NOGPXFORSUBCAT_DESC'|@translate} +
  • +
  • + + + +
    {'FIRSTIMAGEFORSUBCAT_DESC'|@translate} +
  • diff --git a/category.inc.php b/category.inc.php index cda6117..38b2ee6 100644 --- a/category.inc.php +++ b/category.inc.php @@ -44,7 +44,8 @@ function osm_render_category() osm_load_language(); load_language('plugin.lang', OSM_PATH); - $js_data = osm_get_items($page); + // TF, 20160102: pass config as parameter + $js_data = osm_get_items($conf, $page); if ($js_data != array()) { $local_conf = array(); @@ -56,7 +57,12 @@ function osm_render_category() $local_conf['center_lng'] = 0; $local_conf['zoom'] = 2; $local_conf['autocenter'] = 1; +<<<<<<< HEAD + // TF, 20160102: pass config as parameter + $local_conf['paths'] = osm_get_gps($conf, $page); +======= $local_conf['paths'] = osm_get_gps($page); +>>>>>>> refs/remotes/Piwigo/master $height = isset($conf['osm_conf']['category_description']['height']) ? $conf['osm_conf']['category_description']['height'] : '200'; $width = isset($conf['osm_conf']['category_description']['width']) ? $conf['osm_conf']['category_description']['width'] : 'auto'; $js = osm_get_js($conf, $local_conf, $js_data); diff --git a/gpx.inc.php b/gpx.inc.php index 2ce6e44..9bf472a 100644 --- a/gpx.inc.php +++ b/gpx.inc.php @@ -26,7 +26,8 @@ if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); // Add GPX support file extensions -array_push($conf['file_ext'], 'gpx'); +// TF, 22.10.2015: handle kml as well! +array_push($conf['file_ext'], 'gpx', 'kml'); // Hook on to an event to display videos as standard images add_event_handler('render_element_content', 'osm_render_media', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); @@ -41,9 +42,10 @@ function osm_render_media($content, $picture) { return $content; } - // If not a GPX file + // If not a GPX or KML file if ( (array_key_exists('path', @$picture['current'])) - && strpos($picture['current']['path'],".gpx") === false) + && (strpos($picture['current']['path'],".gpx") === false + && strpos($picture['current']['path'],".kml") === false)) { return $content; } @@ -67,10 +69,17 @@ function osm_render_media($content, $picture) $js = osm_get_js($conf, $local_conf, $js_data); // Select the template - $template->set_filenames( - array('osm_content' => dirname(__FILE__)."/template/osm-gpx.tpl") - ); - + // TF, 22.10.2015: handle kml as well! + if (strpos($picture['current']['path'],".gpx") === false) + { + $template->set_filenames( + array('osm_content' => dirname(__FILE__)."/template/osm-kml.tpl") + ); + } else { + $template->set_filenames( + array('osm_content' => dirname(__FILE__)."/template/osm-gpx.tpl") + ); + } // Assign the template variables $template->assign( array( @@ -91,7 +100,8 @@ function osm_render_media($content, $picture) add_event_handler('get_mimetype_location', 'osm_get_mimetype_icon'); function osm_get_mimetype_icon($location, $element_info) { - if ($element_info == 'gpx') + // TF, 22.10.2015: handle kml as well! + if ($element_info == 'gpx' || $element_info == 'kml') { $location = 'plugins/' . basename(dirname(__FILE__)) diff --git a/include/functions_map.php b/include/functions_map.php index 7e92665..7a0a297 100644 --- a/include/functions_map.php +++ b/include/functions_map.php @@ -52,13 +52,81 @@ function osmcopyright($attrleaflet, $attrimagery, $attrmodule, $bl, $custombasel return $return; } -function osm_get_gps($page) +function osm_get_gps($conf, $page) { - // Limit search by category, by tag, by smartalbum - $LIMIT_SEARCH=""; - $INNER_JOIN=""; - if (isset($page['section'])) + // Load parameter, fallback to default if unset + $nogpxforsubcat = isset($conf['osm_conf']['category_description']['nogpxforsubcat']) ? $conf['osm_conf']['category_description']['nogpxforsubcat'] : 'false'; + + $gpx_list = array(); + + // TF, 20160102 + // check if any items (= pictures) are on that page and show gpx tracks only IF items>0 OR nogpxforsubcat=FALSE + if (!($nogpxforsubcat) or (isset($page['items']) and isset($page['items'][0]))) { +<<<<<<< HEAD + // Limit search by category, by tag, by smartalbum + $LIMIT_SEARCH=""; + $INNER_JOIN=""; + if (isset($page['section'])) + { + if ($page['section'] === 'categories' and isset($page['category']) and isset($page['category']['id']) ) + { + $LIMIT_SEARCH = "FIND_IN_SET(".$page['category']['id'].", c.uppercats) AND "; + $INNER_JOIN = "INNER JOIN ".CATEGORIES_TABLE." AS c ON ic.category_id = c.id"; + } + if ($page['section'] === 'tags' and isset($page['tags']) and isset($page['tags'][0]['id']) ) + { + $items = get_image_ids_for_tags( array($page['tags'][0]['id']) ); + if ( !empty($items) ) + { + $LIMIT_SEARCH = "ic.image_id IN (".implode(',', $items).") AND "; + } + } + if ($page['section'] === 'tags' and isset($page['category']) and isset($page['category']['id']) ) + { + $LIMIT_SEARCH = "FIND_IN_SET(".$page['category']['id'].", c.uppercats) AND "; + $INNER_JOIN = "INNER JOIN ".CATEGORIES_TABLE." AS c ON ic.category_id = c.id"; + } + } + + $forbidden = get_sql_condition_FandF( + array + ( + 'forbidden_categories' => 'ic.category_id', + 'visible_categories' => 'ic.category_id', + 'visible_images' => 'i.id' + ), + "\n AND" + ); + + /* Get all GPX tracks */ + $query="SELECT i.path FROM ".IMAGES_TABLE." AS i + INNER JOIN (".IMAGE_CATEGORY_TABLE." AS ic ".$INNER_JOIN.") ON i.id = ic.image_id + WHERE ".$LIMIT_SEARCH." `path` LIKE '%.gpx' ".$forbidden." "; + + $gpx_list = array_from_query($query, 'path'); + } + + return $gpx_list; + if ($page['section'] === 'categories' and isset($page['category']) and isset($page['category']['id']) ) + { + $LIMIT_SEARCH = "FIND_IN_SET(".$page['category']['id'].", c.uppercats) AND "; + $INNER_JOIN = "INNER JOIN ".CATEGORIES_TABLE." AS c ON ic.category_id = c.id"; + } + if ($page['section'] === 'tags' and isset($page['tags']) and isset($page['tags'][0]['id']) ) + { + $items = get_image_ids_for_tags( array($page['tags'][0]['id']) ); + if ( !empty($items) ) + { + $LIMIT_SEARCH = "ic.image_id IN (".implode(',', $items).") AND "; + } + } + if ($page['section'] === 'tags' and isset($page['category']) and isset($page['category']['id']) ) + { + $LIMIT_SEARCH = "FIND_IN_SET(".$page['category']['id'].", c.uppercats) AND "; + $INNER_JOIN = "INNER JOIN ".CATEGORIES_TABLE." AS c ON ic.category_id = c.id"; + } +======= if ($page['section'] === 'categories' and isset($page['category']) and isset($page['category']['id']) ) { $LIMIT_SEARCH = "FIND_IN_SET(".$page['category']['id'].", c.uppercats) AND "; @@ -78,6 +146,7 @@ function osm_get_gps($page) $INNER_JOIN = "INNER JOIN ".CATEGORIES_TABLE." AS c ON ic.category_id = c.id"; } } +>>>>>>> refs/remotes/Piwigo/master $forbidden = get_sql_condition_FandF( array @@ -97,8 +166,11 @@ function osm_get_gps($page) return array_from_query($query, 'path'); } -function osm_get_items($page) +function osm_get_items($conf, $page) { + // Load parameter, fallback to default if unset + $firstimageforsubcat = isset($conf['osm_conf']['category_description']['firstimageforsubcat']) ? $conf['osm_conf']['category_description']['firstimageforsubcat'] : 'false'; + // Limit search by category, by tag, by smartalbum $LIMIT_SEARCH=""; $INNER_JOIN=""; @@ -140,10 +212,17 @@ function osm_get_items($page) $LIMIT_SEARCH=""; $INNER_JOIN=""; +<<<<<<< HEAD + foreach (array('min_lat', 'min_lng', 'max_lat', 'max_lng') as $get_key) + { + check_input_parameter($get_key, $_GET, false, '/^\d+(\.\d+)?$/'); + } +======= foreach (array('min_lat', 'min_lng', 'max_lat', 'max_lng') as $get_key) { check_input_parameter($get_key, $_GET, false, '/^-?\d+(\.\d+)?$/'); } +>>>>>>> refs/remotes/Piwigo/master /* Delete all previous album */ $query="SELECT `id` FROM ".CATEGORIES_TABLE." WHERE `name` = 'Locations' AND `comment` LIKE '%OSM plugin%';"; @@ -191,7 +270,36 @@ function osm_get_items($page) // SUBSTRING_INDEX(TRIM(LEADING '.' FROM `path`), '.', 1) full path without filename extension // SUBSTRING_INDEX(TRIM(LEADING '.' FROM `path`), '.', -1) full path with only filename extension - +<<<<<<< HEAD + // TF, 20160102 + // check if any items (= pictures) are on that page + // if not => has only sub galleries but no pictures => show only first picture IF flag $firstimageforsubcat is set accordingly + if (!($firstimageforsubcat) or isset($page['items']) and isset($page['items'][0])) + { + $only_first_item = false; + } + else + { + $only_first_item = true; + } + + // TF, 20160102 + // if we show only the first picture then we want to link to the category + if ($only_first_item) + { + $concat_for_url = "'category/', IFNULL(ic.category_id, '')"; + } + else + { + // Fix for issue #74: i.storage_category_id might be in the list of $forbidden categories, use ic.category_id instead + $concat_for_url = "i.id, '/category/', IFNULL(ic.category_id, '')"; + } + + // TF, 20160102 + // add ORDER BY to always show the first image in a category +======= + +>>>>>>> refs/remotes/Piwigo/master if (isset($page['image_id'])) $LIMIT_SEARCH .= 'i.id = ' . $page['image_id'] . ' AND '; $query="SELECT i.latitude, i.longitude, @@ -206,31 +314,59 @@ function osm_get_items($page) ) ) ) +<<<<<<< HEAD + ) + ) AS `pathurl`, + TRIM(TRAILING '/' FROM CONCAT( ".$concat_for_url." ) ) AS `imgurl`, +======= )) AS `pathurl`, TRIM(TRAILING '/' FROM CONCAT( i.id, '/category/', IFNULL(ic.category_id, '') ) ) AS `imgurl`, +>>>>>>> refs/remotes/Piwigo/master IFNULL(i.comment, '') AS `comment`, IFNULL(i.author, '') AS `author`, - i.width + i.width, + ic.category_id AS imgcategory FROM ".IMAGES_TABLE." AS i INNER JOIN (".IMAGE_CATEGORY_TABLE." AS ic ".$INNER_JOIN.") ON i.id = ic.image_id - WHERE ".$LIMIT_SEARCH." i.latitude IS NOT NULL AND i.longitude IS NOT NULL ".$forbidden." GROUP BY i.id;"; + WHERE ".$LIMIT_SEARCH." i.latitude IS NOT NULL AND i.longitude IS NOT NULL ".$forbidden." GROUP BY i.id + ORDER BY ic.category_id, ic.rank"; //echo $query; + $php_data = array_from_query($query); //print_r($php_data); + $js_data = array(); + $cur_category = ""; foreach($php_data as $array) { // MySQL did all the job //print_r($array); - $js_data[] = array((double)$array['latitude'], - (double)$array['longitude'], - $array['name'], - get_absolute_root_url() ."i.php?".$array['pathurl'], - get_absolute_root_url() ."picture.php?/".$array['imgurl'], - $array['comment'], - $array['author'], - (int)$array['width'] - ); + // echo '
    '; + if (!$only_first_item || $array['imgcategory'] != $cur_category) + { + // TF, 20160102 + // if we show only the first picture then we want to link to the category + if ($only_first_item) + { + $linkurl = get_absolute_root_url() ."index.php?/".$array['imgurl']; + } + else + { + $linkurl = get_absolute_root_url() ."picture.php?/".$array['imgurl']; + } + + $js_data[] = array((double)$array['latitude'], + (double)$array['longitude'], + $array['name'], + get_absolute_root_url() ."i.php?".$array['pathurl'], + $linkurl, + $array['comment'], + $array['author'], + (int)$array['width'] + ); + + $cur_category = $array['imgcategory']; + } } /* START Debug generate dummy data $js_data = array(); @@ -268,6 +404,7 @@ function osm_get_js($conf, $local_conf, $js_data) $popupinfo_link = isset($conf['osm_conf']['left_menu']['popupinfo_link']) ? $conf['osm_conf']['left_menu']['popupinfo_link'] : 0; $popupinfo_comment = isset($conf['osm_conf']['left_menu']['popupinfo_comment']) ? $conf['osm_conf']['left_menu']['popupinfo_comment'] : 0; $popupinfo_author = isset($conf['osm_conf']['left_menu']['popupinfo_author']) ? $conf['osm_conf']['left_menu']['popupinfo_author'] : 0; + $popup_click_target = isset($conf['osm_conf']['left_menu']['popup_click_target']) ? $conf['osm_conf']['left_menu']['popup_click_target'] : 0; $baselayer = isset($conf['osm_conf']['map']['baselayer']) ? $conf['osm_conf']['map']['baselayer'] : 'mapnik'; $custombaselayer = isset($conf['osm_conf']['map']['custombaselayer']) ? $conf['osm_conf']['map']['custombaselayer'] : ''; $custombaselayerurl = isset($conf['osm_conf']['map']['custombaselayerurl']) ? $conf['osm_conf']['map']['custombaselayerurl'] : ''; @@ -304,13 +441,26 @@ function osm_get_js($conf, $local_conf, $js_data) $autocenter = isset($local_conf['autocenter']) ? $local_conf['autocenter'] : 0; +<<<<<<< HEAD +======= // When gallery is SSL and when switching to SSL baselayerURL is possible, use $httpx $httpx = ((!empty($_SERVER['HTTPS'])) and (strtolower($_SERVER['HTTPS']) !== 'off')) ? 'https' : 'http'; +>>>>>>> refs/remotes/Piwigo/master // Load baselayerURL if ($baselayer == 'mapnik') $baselayerurl = $httpx.'://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'; else if($baselayer == 'mapquest') $baselayerurl = 'http://otile1.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png'; +<<<<<<< HEAD + else if($baselayer == 'mapnikde') $baselayerurl = 'http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png'; + else if($baselayer == 'mapnikfr') $baselayerurl = 'http://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png'; + else if($baselayer == 'blackandwhite') $baselayerurl = 'http://{s}.www.toolserver.org/tiles/bw-mapnik/{z}/{x}/{y}.png'; + else if($baselayer == 'mapnikhot') $baselayerurl = 'http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png'; + else if($baselayer == 'mapquestaerial') $baselayerurl = 'http://otile1.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.png'; + else if($baselayer == 'toner') $baselayerurl = 'https://stamen-tiles-{s}.a.ssl.fastly.net/toner/{z}/{x}/{y}.png'; + else if($baselayer == 'custom') $baselayerurl = $custombaselayerurl; + else if($baselayer == 'esri') $baselayerurl = 'http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}'; +======= else if($baselayer == 'mapnikde') $baselayerurl = $httpx.'://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png'; else if($baselayer == 'mapnikfr') $baselayerurl = $httpx.'://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png'; // else if($baselayer == 'blackandwhite') $baselayerurl = 'http://{s}.www.toolserver.org/tiles/bw-mapnik/{z}/{x}/{y}.png'; @@ -320,6 +470,7 @@ function osm_get_js($conf, $local_conf, $js_data) else if($baselayer == 'toner') $baselayerurl = $httpx.'://stamen-tiles-{s}.a.ssl.fastly.net/toner/{z}/{x}/{y}.png'; else if($baselayer == 'custom') $baselayerurl = $custombaselayerurl; else if($baselayer == 'esri') $baselayerurl = $httpx.'://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}'; +>>>>>>> refs/remotes/Piwigo/master $attribution = osmcopyright($attrleaflet, $attrimagery, $attrmodule, $baselayer, $custombaselayer); @@ -497,7 +648,24 @@ function osm_get_js($conf, $local_conf, $js_data) $attribute = ' target=\"_blank\"'; else $attribute = ''; - $myinfo .= "
    "; + // TF, 20160102 + // choose link target based on config setting + $linktarget = "_blank"; + switch ($popup_click_target) { + case 0: + $linktarget = "_blank"; + break; + case 1: + $linktarget = "_top"; + break; + case 2: + $linktarget = "_self"; + break; + case 3: + $linktarget = "_parent"; + break; + } + $myinfo .= "
    "; } if($popupinfo_comment) { @@ -574,6 +742,10 @@ function osm_gen_template($conf, $js, $js_data, $tmpl, $template) ); } +<<<<<<< HEAD + +======= +>>>>>>> refs/remotes/Piwigo/master $template->pparse('map'); $template->p(); } diff --git a/language/br_FR/plugin.lang.php b/language/br_FR/plugin.lang.php index 718f1e6..79e35f9 100644 --- a/language/br_FR/plugin.lang.php +++ b/language/br_FR/plugin.lang.php @@ -52,7 +52,11 @@ $lang['DISPLAY'] = 'Diskwel ar c\'hefluniadur'; $lang['ATTRPLUGIN'] = 'Diskouez notennoù an aozer'; $lang['ATTRLEAFLET'] = 'Diskouez notennoù al levraoueg'; +<<<<<<< HEAD +$lang['LEFTPOPUP_DESC'] = 'Diskouez ur brenestr dizalc\'h pa gliker war ar c\'hros'; +======= $lang['LEFTPOPUP_DESC'] = 'Diskouez ur brenestr dizalc\'h pa gliker war ar spilhenn'; +>>>>>>> refs/remotes/Piwigo/master $lang['NEVER'] = 'Prenestr dizalc\'h ebet'; $lang['PINPOPUPOFFSET'] = 'Linkad ar brenestr dizalc\'h'; $lang['CLICK'] = 'Diskouez pa vez kliket'; @@ -72,8 +76,13 @@ $lang['COPY_PASTE_URL'] = 'Eilañ ha pegañ an URL amañ dindan:'; $lang['CUSTOMBASELAYER'] = 'Giz kartenn personelaet'; $lang['CENTER_MAP_DESC'] = 'Kreizañ ar planisfer war ul lec\'h (daveennoù GPS). Ledred hag hedred distaget gant ur skej, dre ziouer eo 0,0'; +<<<<<<< HEAD +$lang['PINSIZE'] = 'Ment ar c\'hros'; +$lang['H_PIN'] = 'Kefluniadur ar c\'hros'; +======= $lang['PINSIZE'] = 'Ment ar spilhenn'; $lang['H_PIN'] = 'Kefluniadur ar spilhenn'; +>>>>>>> refs/remotes/Piwigo/master $lang['GPX_WIDTH'] = 'Ledander ar banell uheladur'; $lang['DEFAULTPIN'] = 'Leaflet glaz dre ziouer'; $lang['DEFAULTPINGREEN'] = 'Leaflet gwer dre ziouer'; @@ -90,6 +99,9 @@ $lang['PINSHADOWSIZE_DESC'] = 'Ment ar skeudenn e piksel, distaget gant \'x\'. Dre skouer: \'24x24\''; $lang['PINSIZE_DESC'] = 'Ment ar skeudenn e piksel, distaget gant \'x\'. Dre skouer: \'24x24\''; $lang['HEIGHT_DESC'] = 'e piksel'; +<<<<<<< HEAD +$lang['WIDTH_DESC'] = 'e piksel pe emgefreek'; +======= $lang['WIDTH_DESC'] = 'e piksel pe emgefreek'; $lang['LAYOUT_MAP_DESC'] = 'Dibabit giz planisfer e kavit ar gwellañ.'; $lang['LAYOUT_MAP'] = 'Aozadur ar planisfer'; @@ -147,4 +159,5 @@ $lang['OSM_ADD_PLACE'] = 'Ouzhpennañ ul lec\'h'; $lang['OSM_NEW_PLACE'] = 'Lec\'h nevez'; $lang['OSM_PLACES'] = 'Lec\'hioù'; -$lang['PLACE_SELECTION'] = 'Diuz al lec\'h'; \ No newline at end of file +$lang['PLACE_SELECTION'] = 'Diuz al lec\'h'; +>>>>>>> refs/remotes/Piwigo/master diff --git a/language/en_UK/plugin.lang.php b/language/en_UK/plugin.lang.php index 36d7b6c..26cdf25 100644 --- a/language/en_UK/plugin.lang.php +++ b/language/en_UK/plugin.lang.php @@ -32,11 +32,19 @@ $lang['POPUPLINK'] = "Add a link to image"; $lang['POPUPCOMMENT'] = "Comment of the image"; $lang['POPUPAUTHOR'] = "Author of the image"; +$lang['TOP'] = "Same window"; +$lang['BLANK'] = "New window"; +$lang['LEFTPOPUPCLICKTARGET'] = "Where should page with image open"; +$lang['LEFTPOPUPCLICKTARGET_DESC'] = "Select target for image page when clicking on a popup. Default is new window."; $lang['C_MAP'] = "Category's description"; $lang['SHOWCMAP'] = "Add a map in category's description"; $lang['SHOWCMAP_DESC'] = 'Show a world map menu on category\'s description, will display all the images in the gallery.'; $lang['WIDTH'] = 'Map width'; $lang['WIDTH_DESC'] = 'in px or auto'; +$lang['NOGPXFORSUBCAT'] = 'Hide gpx tracks of sub-categories'; +$lang['NOGPXFORSUBCAT_DESC'] = "Should gpx tracks of sub-categories be hidden in a category's map? Default is no."; +$lang['FIRSTIMAGEFORSUBCAT'] = 'Show only first image of sub-categories'; +$lang['FIRSTIMAGEFORSUBCAT_DESC'] = "Should only the first image of sub-categories be shown in a category's map? Default is no."; $lang['M_MAP'] = "Main menu"; $lang['SHOWMMAP'] = "Add a map in main menu"; $lang['SHOWMMAP_DESC'] = 'Show a world map menu on main menu, will display all the images in the gallery.'; diff --git a/language/nl_NL/plugin.lang.php b/language/nl_NL/plugin.lang.php index af008f5..02e7951 100644 --- a/language/nl_NL/plugin.lang.php +++ b/language/nl_NL/plugin.lang.php @@ -141,10 +141,14 @@ $lang['LAYOUT_MAP'] = 'Vormgeving van de wereldkaart'; $lang['CENTER_MAP_DESC'] = 'Centreer de wereldkaart op een specifieke locatie (GPS). Scheid lengte- en breedtegraad van elkaar door een komma. De standaard instelling is 0,0.'; $lang['POSITION_INDEX_CMAP'] = 'Toon de kaart op'; +<<<<<<< HEAD +$lang['POSITION_INDEX_CMAP_DESC'] = 'Toont de kaart op de gespecificeerde index'; +======= $lang['POSITION_INDEX_CMAP_DESC'] = 'Toont de kaart op de gespecificeerde index'; $lang['DELETE_PLACES'] = 'Verwijder geselecteerde plaatsen'; $lang['EDIT_PLACES'] = 'Bewerk geselecteerde plaatsen'; $lang['OSM_ADD_PLACE'] = 'Voeg een plaats toe'; $lang['OSM_NEW_PLACE'] = 'Nieuwe plaats'; $lang['OSM_PLACES'] = 'Plaatsen'; -$lang['PLACE_SELECTION'] = 'Plaats kiezen'; \ No newline at end of file +$lang['PLACE_SELECTION'] = 'Plaats kiezen'; +>>>>>>> refs/remotes/Piwigo/master diff --git a/language/pl_PL/plugin.lang.php b/language/pl_PL/plugin.lang.php index d00b7fa..330d23c 100644 --- a/language/pl_PL/plugin.lang.php +++ b/language/pl_PL/plugin.lang.php @@ -52,8 +52,13 @@ $lang['PINSHADOWSIZE_DESC'] = 'Wymiary obrazka w pixelach. Znakiem podziału jest \'x\'. Np: \'24x24\''; $lang['PINSIZE'] = 'Rozmiar pinezki'; $lang['PINSIZE_DESC'] = 'Wymiary obrazka w pixelach. Znakiem podziału jest \'x\'. Np: \'24x24\''; +<<<<<<< HEAD +$lang['PIN_DESC'] = 'Wybierz ostatnią opcję jeśli chcesz używać własnej.'; +$lang['PLUGINBY'] = 'Wtyczka'; +======= $lang['PIN_DESC'] = 'Wybierz ikoną pinezki, podgląd pojawi się po prawej stronie'; $lang['PLUGINBY'] = 'Wtyczka utworzona przez'; +>>>>>>> refs/remotes/Piwigo/master $lang['POPUPAUTHOR'] = 'Autor obrazka'; $lang['ATTRPLUGIN'] = 'Pokaż adnotację od autora'; $lang['DEFAULTPIN'] = 'Domyślny niebieski \'Leaflet\''; @@ -79,8 +84,13 @@ $lang['ATTRIMAGERY'] = 'Pokaż styl mapy'; $lang['ATTRIMAGERY_DESC'] = 'Pokazuje użyty styl mapy'; $lang['ATTRLEAFLET'] = 'Pokaż \'Powered by Leaflet\''; +<<<<<<< HEAD +$lang['ATTRLEAFLET_DESC'] = 'Pokazuje a'; +$lang['ATTRPLUGIN_DESC'] = 'Ja stworzylem tą wtyczkę. :)'; +======= $lang['ATTRLEAFLET_DESC'] = 'Pokazuje, że użyto biblioteki JavaScript \'Leaflet\''; $lang['ATTRPLUGIN_DESC'] = 'Ja stworzyłem tę wtyczkę. :)'; +>>>>>>> refs/remotes/Piwigo/master $lang['BASELAYER'] = 'Styl mapy'; $lang['BASELAYER_DESC'] = 'Mapnik jest domyślnym stylem OpenStreetMap'; $lang['CLICK'] = 'pokaż po kliknięciu'; @@ -106,9 +116,15 @@ $lang['ZOOM_IN'] = 'Zoom +'; $lang['ZOOM_OUT'] = 'Zoom -'; $lang['BROWSER_JAVASCRIPT'] = 'Twoja przeglądarka musi obsługiwać JavaScript'; +<<<<<<< HEAD +$lang['CENTER_MAP'] = 'Wyśrodkuj mapę tutaj'; +$lang['CLICKED_MAP'] = 'Klinknąłeś mapę na'; +$lang['COPY_PASTE_URL'] = 'Skopiuj i wklej poniższy adres'; +======= $lang['CENTER_MAP'] = 'Wyśrodkuj mapę na: '; $lang['CLICKED_MAP'] = 'Klinknąłeś mapę na'; $lang['COPY_PASTE_URL'] = 'Skopiuj i wklej poniższy adres:'; +>>>>>>> refs/remotes/Piwigo/master $lang['C_MAP'] = 'Opis kategorii'; $lang['FIND_POSITION'] = 'Znajdź moją pozycję'; $lang['IMAGE'] = 'Użyj kwadratowej miniaturki zdjęcia'; @@ -118,6 +134,9 @@ $lang['PIWIGO_GALLERY'] = 'Idź do galerii Piwigo'; $lang['SEARCH_MY_POSITION'] = 'Znajdź moją pozycję na mapie'; $lang['SHOWCMAP'] = 'Dodaj mapę w opisie kategorii'; +<<<<<<< HEAD +$lang['SHOWMMAP'] = 'Dodaj mapę w menu głównym'; +======= $lang['SHOWMMAP'] = 'Dodaj mapę w menu głównym'; $lang['SHARE'] = 'Udostępnij ten widok'; $lang['SHOWCMAP_DESC'] = 'Pokazuje mapę świata w opisie kategorii, wyświetli wszystkie zdjęcia z galerii.'; @@ -147,4 +166,5 @@ $lang['OSM_NEW_PLACE'] = 'Nowe miejsce'; $lang['OSM_PLACES'] = 'Miejsca'; $lang['OSWORLDMAP'] = 'OS - Mapa Świata'; -$lang['PLACE_SELECTION'] = 'Wybór miejsca'; \ No newline at end of file +$lang['PLACE_SELECTION'] = 'Wybór miejsca'; +>>>>>>> refs/remotes/Piwigo/master diff --git a/leaflet/icons/Thumbs.db b/leaflet/icons/Thumbs.db new file mode 100644 index 0000000..30b01f4 Binary files /dev/null and b/leaflet/icons/Thumbs.db differ diff --git a/leaflet/images/Thumbs.db b/leaflet/images/Thumbs.db new file mode 100644 index 0000000..23848f6 Binary files /dev/null and b/leaflet/images/Thumbs.db differ diff --git a/leaflet/kml.js b/leaflet/kml.js new file mode 100644 index 0000000..63bf0f8 --- /dev/null +++ b/leaflet/kml.js @@ -0,0 +1,512 @@ +/** + * Copyright (c) 2011-2015, Pavel Shramov, Bruno Bergot + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + + /* + * Thanks to Pavel Shramov who provided the initial implementation and Leaflet + * integration. Original code was at https://github.com/shramov/leaflet-plugins. + */ + + L.KML = L.FeatureGroup.extend({ + options: { + async: true + }, + + initialize: function(kml, options) { + L.Util.setOptions(this, options); + this._kml = kml; + this._layers = {}; + + if (kml) { + this.addKML(kml, options, this.options.async); + } + }, + + loadXML: function(url, cb, options, async) { + if (async === undefined) async = this.options.async; + if (options === undefined) options = this.options; + + var req = new window.XMLHttpRequest(); + + // Check for IE8 and IE9 Fix Cors for those browsers + if (req.withCredentials === undefined && typeof window.XDomainRequest !== 'undefined') { + var xdr = new window.XDomainRequest(); + xdr.open('GET', url, async); + xdr.onprogress = function () { }; + xdr.ontimeout = function () { }; + xdr.onerror = function () { }; + xdr.onload = function () { + if (xdr.responseText) { + var xml = new window.ActiveXObject('Microsoft.XMLDOM'); + xml.loadXML(xdr.responseText); + cb(xml, options); + } + }; + setTimeout(function () { xdr.send(); }, 0); + } else { + req.open('GET', url, async); + try { + req.overrideMimeType('text/xml'); // unsupported by IE + } catch (e) { } + req.onreadystatechange = function () { + if (req.readyState !== 4) return; + if (req.status === 200) cb(req.responseXML, options); + }; + req.send(null); + } + }, + + addKML: function(url, options, async) { + var _this = this; + var cb = function(gpx, options) { _this._addKML(gpx, options); }; + this.loadXML(url, cb, options, async); + }, + + _addKML: function(xml, options) { + var layers = L.KML.parseKML(xml); + if (!layers || !layers.length) return; + for (var i = 0; i < layers.length; i++) { + this.fire('addlayer', { + layer: layers[i] + }); + this.addLayer(layers[i]); + } + this.latLngs = L.KML.getLatLngs(xml); + this.fire('loaded'); + }, + + latLngs: [] +}); + +L.Util.extend(L.KML, { + + parseKML: function (xml) { + var style = this.parseStyles(xml); + this.parseStyleMap(xml, style); + var el = xml.getElementsByTagName('Folder'); + var layers = [], l; + for (var i = 0; i < el.length; i++) { + if (!this._check_folder(el[i])) { continue; } + l = this.parseFolder(el[i], style); + if (l) { layers.push(l); } + } + el = xml.getElementsByTagName('Placemark'); + for (var j = 0; j < el.length; j++) { + if (!this._check_folder(el[j])) { continue; } + l = this.parsePlacemark(el[j], xml, style); + if (l) { layers.push(l); } + } + el = xml.getElementsByTagName('GroundOverlay'); + for (var k = 0; k < el.length; k++) { + l = this.parseGroundOverlay(el[k]); + if (l) { layers.push(l); } + } + return layers; + }, + + // Return false if e's first parent Folder is not [folder] + // - returns true if no parent Folders + _check_folder: function (e, folder) { + e = e.parentNode; + while (e && e.tagName !== 'Folder') + { + e = e.parentNode; + } + return !e || e === folder; + }, + + parseStyles: function(xml) { + var styles = {}; + var sl = xml.getElementsByTagName('Style'); + for (var i=0, len=sl.length; i 1) { + layer = new L.FeatureGroup(layers); + } + + var name, descr = ''; + el = place.getElementsByTagName('name'); + if (el.length && el[0].childNodes.length) { + name = el[0].childNodes[0].nodeValue; + } + el = place.getElementsByTagName('description'); + for (i = 0; i < el.length; i++) { + for (j = 0; j < el[i].childNodes.length; j++) { + descr = descr + el[i].childNodes[j].nodeValue; + } + } + + if (name) { + layer.on('add', function(e) { + layer.bindPopup('

    ' + name + '

    ' + descr); + }); + } + + return layer; + }, + + parseCoords: function (xml) { + var el = xml.getElementsByTagName('coordinates'); + return this._read_coords(el[0]); + }, + + parseLineString: function (line, xml, options) { + var coords = this.parseCoords(line); + if (!coords.length) { return; } + return new L.Polyline(coords, options); + }, + + parseTrack: function (line, xml, options) { + var el = xml.getElementsByTagName('gx:coord'); + if (el.length === 0) { el = xml.getElementsByTagName('coord'); } + var coords = []; + for (var j = 0; j < el.length; j++) { + coords = coords.concat(this._read_gxcoords(el[j])); + } + if (!coords.length) { return; } + return new L.Polyline(coords, options); + }, + + parsePoint: function (line, xml, options) { + var el = line.getElementsByTagName('coordinates'); + if (!el.length) { + return; + } + var ll = el[0].childNodes[0].nodeValue.split(','); + return new L.KMLMarker(new L.LatLng(ll[1], ll[0]), options); + }, + + parsePolygon: function (line, xml, options) { + var el, polys = [], inner = [], i, coords; + el = line.getElementsByTagName('outerBoundaryIs'); + for (i = 0; i < el.length; i++) { + coords = this.parseCoords(el[i]); + if (coords) { + polys.push(coords); + } + } + el = line.getElementsByTagName('innerBoundaryIs'); + for (i = 0; i < el.length; i++) { + coords = this.parseCoords(el[i]); + if (coords) { + inner.push(coords); + } + } + if (!polys.length) { + return; + } + if (options.fillColor) { + options.fill = true; + } + if (polys.length === 1) { + return new L.Polygon(polys.concat(inner), options); + } + return new L.MultiPolygon(polys, options); + }, + + getLatLngs: function (xml) { + var el = xml.getElementsByTagName('coordinates'); + var coords = []; + for (var j = 0; j < el.length; j++) { + // text might span many childNodes + coords = coords.concat(this._read_coords(el[j])); + } + return coords; + }, + + _read_coords: function (el) { + var text = '', coords = [], i; + for (i = 0; i < el.childNodes.length; i++) { + text = text + el.childNodes[i].nodeValue; + } + text = text.split(/[\s\n]+/); + for (i = 0; i < text.length; i++) { + var ll = text[i].split(','); + if (ll.length < 2) { + continue; + } + coords.push(new L.LatLng(ll[1], ll[0])); + } + return coords; + }, + + _read_gxcoords: function (el) { + var text = '', coords = []; + text = el.firstChild.nodeValue.split(' '); + coords.push(new L.LatLng(text[1], text[0])); + return coords; + }, + + parseGroundOverlay: function (xml) { + var latlonbox = xml.getElementsByTagName('LatLonBox')[0]; + var bounds = new L.LatLngBounds( + [ + latlonbox.getElementsByTagName('south')[0].childNodes[0].nodeValue, + latlonbox.getElementsByTagName('west')[0].childNodes[0].nodeValue + ], + [ + latlonbox.getElementsByTagName('north')[0].childNodes[0].nodeValue, + latlonbox.getElementsByTagName('east')[0].childNodes[0].nodeValue + ] + ); + var attributes = {Icon: true, href: true, color: true}; + function _parse(xml) { + var options = {}, ioptions = {}; + for (var i = 0; i < xml.childNodes.length; i++) { + var e = xml.childNodes[i]; + var key = e.tagName; + if (!attributes[key]) { continue; } + var value = e.childNodes[0].nodeValue; + if (key === 'Icon') { + ioptions = _parse(e); + if (ioptions.href) { options.href = ioptions.href; } + } else if (key === 'href') { + options.href = value; + } else if (key === 'color') { + options.opacity = parseInt(value.substring(0, 2), 16) / 255.0; + options.color = '#' + value.substring(6, 8) + value.substring(4, 6) + value.substring(2, 4); + } + } + return options; + } + var options = {}; + options = _parse(xml); + if (latlonbox.getElementsByTagName('rotation')[0] !== undefined) { + var rotation = latlonbox.getElementsByTagName('rotation')[0].childNodes[0].nodeValue; + options.rotation = parseFloat(rotation); + } + return new L.RotatedImageOverlay(options.href, bounds, {opacity: options.opacity, angle: options.rotation}); + } + +}); + +L.KMLIcon = L.Icon.extend({ + _setIconStyles: function (img, name) { + L.Icon.prototype._setIconStyles.apply(this, [img, name]); + var options = this.options; + this.options.popupAnchor = [0,(-0.83*img.height)]; + if (options.anchorType.x === 'fraction') + img.style.marginLeft = (-options.anchorRef.x * img.width) + 'px'; + if (options.anchorType.y === 'fraction') + img.style.marginTop = ((-(1 - options.anchorRef.y) * img.height) + 1) + 'px'; + if (options.anchorType.x === 'pixels') + img.style.marginLeft = (-options.anchorRef.x) + 'px'; + if (options.anchorType.y === 'pixels') + img.style.marginTop = (options.anchorRef.y - img.height + 1) + 'px'; + } +}); + + +L.KMLMarker = L.Marker.extend({ + options: { + icon: new L.KMLIcon.Default() + } +}); + +// Inspired by https://github.com/bbecquet/Leaflet.PolylineDecorator/tree/master/src +L.RotatedImageOverlay = L.ImageOverlay.extend({ + options: { + angle: 0 + }, + _reset: function () { + L.ImageOverlay.prototype._reset.call(this); + this._rotate(); + }, + _animateZoom: function (e) { + L.ImageOverlay.prototype._animateZoom.call(this, e); + this._rotate(); + }, + _rotate: function () { + if (L.DomUtil.TRANSFORM) { + // use the CSS transform rule if available + this._image.style[L.DomUtil.TRANSFORM] += ' rotate(' + this.options.angle + 'deg)'; + } else if(L.Browser.ie) { + // fallback for IE6, IE7, IE8 + var rad = this.options.angle * (Math.PI / 180), + costheta = Math.cos(rad), + sintheta = Math.sin(rad); + this._image.style.filter += ' progid:DXImageTransform.Microsoft.Matrix(sizingMethod=\'auto expand\', M11=' + + costheta + ', M12=' + (-sintheta) + ', M21=' + sintheta + ', M22=' + costheta + ')'; + } + }, + getBounds: function() { + return this._bounds; + } +}); + diff --git a/main.inc.php b/main.inc.php index 5d88376..7fa46cd 100644 --- a/main.inc.php +++ b/main.inc.php @@ -1,7 +1,11 @@ >>>>>> refs/remotes/Piwigo/master Description: OpenStreetMap integration for piwigo Plugin URI: http://piwigo.org/ext/extension_view.php?eid=701 Author: xbmgsharp diff --git a/maintain.inc.php b/maintain.inc.php index 69582f5..f29ea79 100644 --- a/maintain.inc.php +++ b/maintain.inc.php @@ -128,7 +128,11 @@ function plugin_install() $q = 'CREATE TABLE IF NOT EXISTS `'.osm_place_table.'` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, `latitude` double(8,6) NOT NULL, +<<<<<<< HEAD + `longitude` double(8,6) NOT NULL, +======= `longitude` double(9,6) NOT NULL, +>>>>>>> refs/remotes/Piwigo/master `name` varchar(255) DEFAULT NULL, `parentId` mediumint(8), PRIMARY KEY (id) @@ -136,6 +140,8 @@ function plugin_install() ;'; pwg_query($q); +<<<<<<< HEAD +======= // Increase size of longitude column from double(8,6) to double(9,6). GH#153. foreach(pwg_query('DESCRIBE '.osm_place_table) as $col_info) { @@ -153,6 +159,7 @@ function plugin_install() } } +>>>>>>> refs/remotes/Piwigo/master // Create world map link $dir_name = basename( dirname(__FILE__) ); $c = <<set_template_dir(dirname(__FILE__).'/template/'); diff --git a/mimetypes/Thumbs.db b/mimetypes/Thumbs.db new file mode 100644 index 0000000..b4ede43 Binary files /dev/null and b/mimetypes/Thumbs.db differ diff --git a/mimetypes/kml.png b/mimetypes/kml.png new file mode 100644 index 0000000..ee57ad2 Binary files /dev/null and b/mimetypes/kml.png differ diff --git a/osmmap.php b/osmmap.php index 696c05f..67d3744 100644 --- a/osmmap.php +++ b/osmmap.php @@ -85,10 +85,12 @@ $local_conf['contextmenu'] = 'false'; $local_conf['control'] = true; $local_conf['img_popup'] = false; -$local_conf['paths'] = osm_get_gps($page); +// TF, 20160102: pass config as parameter +$local_conf['paths'] = osm_get_gps($conf, $page); $local_conf = $local_conf + $conf['osm_conf']['map'] + $conf['osm_conf']['left_menu']; -$js_data = osm_get_items($page); +// TF, 20160102: pass config as parameter +$js_data = osm_get_items($conf, $page); $js = osm_get_js($conf, $local_conf, $js_data); osm_gen_template($conf, $js, $js_data, 'osm-map.tpl', $template); ?> diff --git a/osmmap2.php b/osmmap2.php index 5148fe3..115d06e 100644 --- a/osmmap2.php +++ b/osmmap2.php @@ -86,10 +86,12 @@ $local_conf['contextmenu'] = 'true'; $local_conf['control'] = true; $local_conf['img_popup'] = false; -$local_conf['paths'] = osm_get_gps($page); +// TF, 20160102: pass config as parameter +$local_conf['paths'] = osm_get_gps($conf, $page); $local_conf = $local_conf + $conf['osm_conf']['map'] + $conf['osm_conf']['left_menu']; -$js_data = osm_get_items($page); +// TF, 20160102: pass config as parameter +$js_data = osm_get_items($conf, $page); $js = osm_get_js($conf, $local_conf, $js_data); osm_gen_template($conf, $js, $js_data, 'osm-map2.tpl', $template); ?> diff --git a/osmmap3.php b/osmmap3.php index 50e8ef2..8f235b4 100644 --- a/osmmap3.php +++ b/osmmap3.php @@ -86,10 +86,12 @@ $local_conf['contextmenu'] = 'true'; $local_conf['control'] = true; $local_conf['img_popup'] = false; -$local_conf['paths'] = osm_get_gps($page); +// TF, 20160102: pass config as parameter +$local_conf['paths'] = osm_get_gps($conf, $page); $local_conf = $local_conf + $conf['osm_conf']['map'] + $conf['osm_conf']['left_menu']; -$js_data = osm_get_items($page); +// TF, 20160102: pass config as parameter +$js_data = osm_get_items($conf, $page); $js = osm_get_js($conf, $local_conf, $js_data); osm_gen_template($conf, $js, $js_data, 'osm-map3.tpl', $template); ?> diff --git a/pem_metadata.txt b/pem_metadata.txt new file mode 100644 index 0000000..9dc0a40 --- /dev/null +++ b/pem_metadata.txt @@ -0,0 +1,4 @@ +File automatically created from SVN or Git repository. + +URL: https://github.com/xbgmsharp/piwigo-openstreetmap +Revision: 0347d04cb896f82cb969880ca723036714addbf5 (Sun Nov 13 17:33:53 2016 +0000) \ No newline at end of file diff --git a/template/osm-kml.tpl b/template/osm-kml.tpl new file mode 100644 index 0000000..e4955bc --- /dev/null +++ b/template/osm-kml.tpl @@ -0,0 +1,45 @@ +{html_head} + + + + + + +{/html_head} + +{html_style} +{literal} +#mapgpx { + height: {/literal}{$HEIGHT}{literal}px; + width: 90%; + max-width: 1280px; + margin: 0px auto; +} +{/literal} +{/html_style} + +
    +