preview picturs in map view; other map detail improvements and fixes
@ -121,7 +121,7 @@ List of third party components:
|
||||
URI : http://www.prototypejs.org/
|
||||
License : MIT
|
||||
|
||||
18. In his hands: Font
|
||||
18. In his hands: Font in old OC logo
|
||||
URI : http://www.fontdownloadsfree.com/fonts/1/22/inhishands_inhishan.html
|
||||
Licence : *** UNKNOWN ***
|
||||
|
||||
@ -156,9 +156,11 @@ List of third party components:
|
||||
URI : http://code.google.com/p/opencaching-pl/source/browse/#svn%2Ftrunk%2Fokapi%2Fstatic%2Ftilemap
|
||||
License : MIT
|
||||
|
||||
25. OpenIcons
|
||||
Path : htdocs/resource2/ocstyle/images/openicons/
|
||||
URI : http://openiconlibrary.sourceforge.net/
|
||||
25. OpenIcons 'system-help' and 'preferences-other'
|
||||
Path : htdocs/resource2/ocstyle/images/misc/
|
||||
htdocs/resource2/ocstyle/images/map/
|
||||
URI : http://openiconlibrary.sourceforge.net/gallery2/?./Icons/categories/system-help-3.png
|
||||
http://openiconlibrary.sourceforge.net/gallery2/?./Icons/categories/preferences-other-3.png
|
||||
License : Creative Commons BY-SA 3.0
|
||||
|
||||
26. 16x16 Icons 'flag-checker' and 'footprints'
|
||||
|
@ -496,7 +496,7 @@
|
||||
$opt['map']['maxrecords'] = 2500;
|
||||
}
|
||||
else
|
||||
$opt['map']['maxrecords'] = 250;
|
||||
$opt['map']['maxrecords'] = 200;
|
||||
// ... selectable by user:
|
||||
$opt['map']['min_maxrecords'] = 100;
|
||||
$opt['map']['max_maxrecords'] = 4000;
|
||||
|
@ -47,3 +47,4 @@ date commit ID change
|
||||
cache_logs_archived, all new tables and to triggers
|
||||
removed table listing_restored
|
||||
added index cache_logs_archived:user_id
|
||||
2013-03-10 added field 'mappreview' in pictures and pictures_modified
|
||||
|
@ -562,6 +562,7 @@ INSERT INTO `helppages` (`ocpage`, `language`, `helppage`) VALUES ('viewlogs', '
|
||||
INSERT INTO `helppages` (`ocpage`, `language`, `helppage`) VALUES ('viewprofile', 'DE', 'Benutzerprofil');
|
||||
INSERT INTO `helppages` (`ocpage`, `language`, `helppage`) VALUES ('additional_waypoints', 'DE', 'Zusätzliche Wegpunkte');
|
||||
INSERT INTO `helppages` (`ocpage`, `language`, `helppage`) VALUES ('usernote', 'DE', 'Persönliche Notiz');
|
||||
INSERT INTO `helppages` (`ocpage`, `language`, `helppage`) VALUES ('previewpics', 'DE', 'Vorschaubilder');
|
||||
|
||||
-- Table languages
|
||||
SET NAMES 'utf8';
|
||||
@ -705,6 +706,7 @@ INSERT INTO `profile_options` (`id`, `name`, `trans_id`, `internal_use`, `defaul
|
||||
INSERT INTO `profile_options` (`id`, `name`, `trans_id`, `internal_use`, `default_value`, `check_regex`, `option_order`, `option_input`, `optionset`) VALUES ('7', 'Show overview map', '1870', '1', '0', '^[0-1]$', '120', 'checkbox', '2');
|
||||
INSERT INTO `profile_options` (`id`, `name`, `trans_id`, `internal_use`, `default_value`, `check_regex`, `option_order`, `option_input`, `optionset`) VALUES ('8', 'Maximum caches on map<br />(%1-%2, 0=automatic)', '1871', '1', '0', '^[1-9][0-9]{2,3}$', '130', 'text', '2');
|
||||
INSERT INTO `profile_options` (`id`, `name`, `trans_id`, `internal_use`, `default_value`, `check_regex`, `option_order`, `option_input`, `optionset`) VALUES ('9', 'Cache icons', '1872', '1', '1', '^[1-9]$', '140', 'select:1=classic OC,', '2');
|
||||
INSERT INTO `profile_options` (`id`, `name`, `trans_id`, `internal_use`, `default_value`, `check_regex`, `option_order`, `option_input`, `optionset`) VALUES ('10', 'Show %1preview pictures</a><br />(% of map area, 0=off)', '1928', '1', '7', '^[0-5]?[0-9]$', '150', 'text', '2');
|
||||
|
||||
-- Table replication_overwritetypes
|
||||
SET NAMES 'utf8';
|
||||
@ -1680,7 +1682,7 @@ INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('789', 'Contact
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('792', 'Mark as finished', '2010-08-28 11:48:04');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('793', 'Action', '2010-08-28 11:48:04');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('794', 'Prior to reporting a cache to your Opencaching team you should try to contact the owner, to solve possible problems immediate user to user. This does not apply for caches violating the Opencaching terms of use in a way, that requires immediate action of an Opencaching administrator.', '2010-08-28 11:48:04');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('795', 'Do not display this picture (only used in HTML description)', '2010-08-28 11:48:04');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('795', 'Do not separately display this picture (used in HTML description etc.)', '2010-08-28 11:48:04');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('796', 'No information on user details found.', '2010-08-28 11:48:04');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('797', 'Coordinates', '2010-08-28 11:48:04');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('798', 'Geokrets', '2010-08-28 11:48:04');
|
||||
@ -2367,6 +2369,9 @@ INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1924', 'The cac
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1925', 'The cache has an %2additional waypoint%3.', '2013-03-03 00:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1926', 'Path', '2013-03-03 00:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1927', 'Final', '2013-03-03 00:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1928', 'Show %1preview pictures</a><br />(% of map area, 0=off)', '2013-03-03 00:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1929', 'Preview picture for map \– is shown when this cache is selected on the map. You can have only <em>one</em> preview picture per cache.', '2013-03-03 00:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1930', 'Max. %1 caches can be displayed with Microsoft Internet Explorer.', '2013-03-03 00:00:00');
|
||||
|
||||
-- Table sys_trans_ref
|
||||
SET NAMES 'utf8';
|
||||
@ -5271,7 +5276,7 @@ INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUE
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('792', 'DE', 'Als erledigt markieren', '2010-08-28 11:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('793', 'DE', 'Aktion', '2010-08-28 11:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('794', 'DE', 'Bevor du einen Cache an das Opencaching-Team meldest, solltest du versuchen, Kontakt mit dem Owner aufzunehmen, um mögliche Probleme direkt untereinander zu klären. Davon ausgenommen sind Caches, die durch ihre Beschreibung oder das Versteck eine sofortige Archivierung notwendig machen.', '2010-08-28 11:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('795', 'DE', 'Dieses Bild nicht anzeigen (Hintergrundbild in HTML Beschreibung o.ä.)', '2010-08-28 11:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('795', 'DE', 'Dieses Bild nicht separat anzeigen (Hintergrundbild in HTML-Beschreibung o.ä.)', '2010-08-28 11:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('796', 'DE', 'Es wurden keine Benutzerdetails eingegeben.', '2010-08-28 11:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('797', 'DE', 'Koordinaten', '2010-08-28 11:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('798', 'DE', 'Geokrets', '2010-08-28 11:48:07');
|
||||
@ -5956,6 +5961,9 @@ INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUE
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1925', 'DE', 'Der Cache hat einen %1zusätzlichen Wegpunkt%2.', '2012-10-11 00:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1926', 'DE', 'Pfad', '2012-10-11 00:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1927', 'DE', 'Ziel', '2012-10-11 00:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1928', 'DE', '%1Vorschaubilder</a> anzeigen<br />(% der Kartenfläche, 0=aus)', '2012-10-11 00:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1929', 'DE', 'Kartenvorschaubild \– wird angezeigt, wenn dieser Cache auf der Karte angeklickt wird. Es ist maximal <em>ein</em> Vorschaubild pro Cache wählbar.', '2012-10-11 00:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1930', 'DE', 'Mit dem Microsoft Internet Explorer werden<br />maximal %1 Caches angezeigt.', '2012-10-11 00:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1', 'EN', 'Reorder IDs \r', '2010-09-02 00:15:30');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2', 'EN', 'The database could not be reconnected.', '2010-08-28 11:48:07');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('3', 'EN', 'Testing – please do not login', '2010-08-28 11:48:07');
|
||||
@ -6733,7 +6741,7 @@ INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUE
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('792', 'EN', 'Mark as done', '2010-08-28 11:48:08');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('793', 'EN', 'Action', '2010-08-28 11:48:08');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('794', 'EN', 'Prior to reporting a cache to the Opencaching team, you should try to contact the owner and try to solve the presumed problems yourself. This does not apply for caches violating the Opencaching terms of use in a way that requires immediate action of an Opencaching administrator.', '2010-08-28 11:48:08');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('795', 'EN', 'Do not display this picture (which is only used in HTML description etc.)', '2010-08-28 11:48:08');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('795', 'EN', 'Do not separately display this picture (which is only used in HTML description etc.)', '2010-08-28 11:48:08');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('796', 'EN', 'No information on user details found.', '2010-08-28 11:48:08');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('797', 'EN', 'Coordinates', '2010-08-28 11:48:08');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('798', 'EN', 'Geokrets', '2010-08-28 11:48:08');
|
||||
@ -7420,6 +7428,9 @@ INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUE
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1925', 'EN', 'The cache has an %2additional waypoint%3.', '2012-10-11 00:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1926', 'EN', 'Path', '2012-10-11 00:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1927', 'EN', 'Final', '2012-10-11 00:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1928', 'EN', 'Show %1preview pictures</a><br />(% of map area, 0=off)', '2012-10-11 00:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1929', 'EN', 'Preview picture for map \– is shown when this cache is selected on the map. You can have only <em>one</em> preview picture per cache.', '2012-10-11 00:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1930', 'EN', 'Max. %1 caches can be displayed with Microsoft Internet Explorer.', '2012-10-11 00:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1', 'ES', 'Reordenar ID', '2010-12-09 00:17:55');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2', 'ES', 'La base de datos no se pudo conectar.', '2010-12-09 00:17:55');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('3', 'ES', 'En pruebas - por favor, no entre.', '2010-12-09 00:17:55');
|
||||
@ -11902,4 +11913,4 @@ TRUNCATE TABLE `watches_waitingtypes`;
|
||||
INSERT INTO `watches_waitingtypes` (`id`, `watchtype`) VALUES ('1', 'ownerlog');
|
||||
INSERT INTO `watches_waitingtypes` (`id`, `watchtype`) VALUES ('2', 'cache_watches');
|
||||
|
||||
INSERT INTO `sysconfig` (`name`, `value`) VALUES ('datasql_checksum', 'bdff93f2b9d8559f5a29e0d8e6bd1170') ON DUPLICATE KEY UPDATE `value`='bdff93f2b9d8559f5a29e0d8e6bd1170';
|
||||
INSERT INTO `sysconfig` (`name`, `value`) VALUES ('datasql_checksum', '92a5fe8a1694cd46efbcb9992bce66b4') ON DUPLICATE KEY UPDATE `value`='92a5fe8a1694cd46efbcb9992bce66b4';
|
@ -1012,6 +1012,7 @@
|
||||
(SELECT `status` FROM `caches` WHERE `caches`.`cache_id`=OLD.`object_id`) != 5 AND
|
||||
(NEW.`title` != OLD.`title` OR NEW.`spoiler` != OLD.`spoiler` OR NEW.`display` != OLD.`display`) THEN
|
||||
INSERT IGNORE INTO `pictures_modified` (`id`, `date_modified`, `operation`, `date_created`, `url`, `title`, `object_id`, `object_type`, `spoiler`, `unknown_format`, `display`, `restored_by`) VALUES (OLD.`id`, NOW(), 'U', OLD.`date_created`, OLD.`url`, OLD.`title`, OLD.`object_id`, OLD.`object_type`, OLD.`spoiler`, OLD.`unknown_format`, OLD.`display`, IFNULL(@restoredby,0));
|
||||
/* mappreview is not archived, can be safely set to 0 on restore */
|
||||
END IF;
|
||||
END;");
|
||||
|
||||
@ -1028,6 +1029,7 @@
|
||||
(SELECT `status` FROM `caches` WHERE `caches`.`cache_id`=OLD.`object_id`) != 5
|
||||
)) THEN
|
||||
INSERT IGNORE INTO `pictures_modified` (`id`, `date_modified`, `operation`, `date_created`, `url`, `title`, `object_id`, `object_type`, `spoiler`, `unknown_format`, `display`, `restored_by`) VALUES (OLD.`id`, NOW(), 'D', OLD.`date_created`, OLD.`url`, OLD.`title`, OLD.`object_id`, OLD.`object_type`, OLD.`spoiler`, OLD.`unknown_format`, OLD.`display`, IFNULL(@restoredby,0));
|
||||
/* mappreview is not archived, can be safely set to 0 on restore */
|
||||
END IF;
|
||||
IF OLD.`object_type`=1 THEN
|
||||
CALL sp_update_cachelog_picturestat(OLD.`object_id`, TRUE);
|
||||
|
@ -17,6 +17,7 @@ CREATE TABLE `pictures` (
|
||||
`local` tinyint(1) NOT NULL default '1',
|
||||
`unknown_format` tinyint(1) NOT NULL default '0',
|
||||
`display` tinyint(1) NOT NULL default '1',
|
||||
`mappreview` tinyint(2) NOT NULL default '7',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uuid` (`uuid`),
|
||||
KEY `last_modified` (`last_modified`),
|
||||
|
@ -7,11 +7,11 @@ CREATE TABLE `pictures_modified` (
|
||||
`date_created` datetime NOT NULL,
|
||||
`url` varchar(255) NOT NULL,
|
||||
`title` varchar(250) NOT NULL,
|
||||
`object_id` int(10) unsigned NOT NULL default '0',
|
||||
`object_type` tinyint(3) unsigned NOT NULL default '0',
|
||||
`spoiler` tinyint(1) NOT NULL default '0',
|
||||
`unknown_format` tinyint(1) NOT NULL default '0',
|
||||
`display` tinyint(1) NOT NULL default '1',
|
||||
`object_id` int(10) unsigned NOT NULL,
|
||||
`object_type` tinyint(3) unsigned NOT NULL,
|
||||
`spoiler` tinyint(1) NOT NULL,
|
||||
`unknown_format` tinyint(1) NOT NULL,
|
||||
`display` tinyint(1) NOT NULL,
|
||||
`original_id` int(10) NOT NULL,
|
||||
`restored_by` int(10) NOT NULL,
|
||||
UNIQUE KEY `id` (`id`,`operation`),
|
||||
|
@ -465,7 +465,7 @@ function mnu_EchoHelpLink($tplname)
|
||||
{
|
||||
$helplink = helppagelink($tplname);
|
||||
if ($helplink != "")
|
||||
echo $helplink . '<img src="resource2/ocstyle/images/openicons/35x35-system-help.png" /></a>';
|
||||
echo $helplink . '<img src="resource2/ocstyle/images/misc/32x32-help.png" /></a>';
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -54,6 +54,7 @@ class picture
|
||||
$this->rePicture->addInt('local', 0, false);
|
||||
$this->rePicture->addInt('unknown_format', 0, false);
|
||||
$this->rePicture->addInt('display', 1, false);
|
||||
$this->rePicture->addInt('mappreview', 0, false);
|
||||
|
||||
$this->nPictureId = $nNewPictureId+0;
|
||||
|
||||
@ -186,6 +187,14 @@ class picture
|
||||
{
|
||||
return $this->rePicture->setValue('display', $value ? 1 : 0);
|
||||
}
|
||||
function getMapPreview()
|
||||
{
|
||||
return $this->rePicture->getValue('mappreview') != 0;
|
||||
}
|
||||
function setMapPreview($value)
|
||||
{
|
||||
return $this->rePicture->setValue('mappreview', $value ? 1 : 0);
|
||||
}
|
||||
function getFilename()
|
||||
{
|
||||
global $opt;
|
||||
@ -293,7 +302,13 @@ class picture
|
||||
$bRetVal = $this->rePicture->save();
|
||||
|
||||
if ($bRetVal)
|
||||
{
|
||||
$this->nPictureId = $this->rePicture->getValue('id');
|
||||
if ($this->getObjectType() == OBJECT_CACHE && $this->getMapPreview())
|
||||
sql("UPDATE `pictures` SET `mappreview`=0 WHERE `object_type`='&1' AND `object_id`='&2' AND `id`!='&3'",
|
||||
OBJECT_CACHE, $this->getObjectId(), $this->getPictureId());
|
||||
sql_slave_exclude();
|
||||
}
|
||||
|
||||
return $bRetVal;
|
||||
}
|
||||
|
@ -15,21 +15,10 @@
|
||||
*/
|
||||
$login->verify();
|
||||
|
||||
if ($login->userid > 0)
|
||||
{
|
||||
$user_maxrecords = $maxrecords =
|
||||
sql_value("SELECT option_value FROM user_options WHERE user_id='&1' AND option_id=8",
|
||||
$opt['map']['maxrecords'] + 0, $login->userid);
|
||||
if ($maxrecords == 0)
|
||||
$maxrecords = $opt['map']['maxrecords'] + 0;
|
||||
else
|
||||
$maxrecords = min(max($maxrecords, $opt['map']['min_maxrecords']), $opt['map']['max_maxrecords']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$maxrecords = $opt['map']['maxrecords'] + 0;
|
||||
$user_maxrecords = 0;
|
||||
}
|
||||
// check for peculiar browsers
|
||||
$msie = preg_match('/MSIE [1-9]+.[0-9]+/',$_SERVER['HTTP_USER_AGENT']) &&
|
||||
!strpos($user_agent,"Opera");
|
||||
$old_msie = $msie && preg_match('/MSIE [1-6].[0-9]+/',$_SERVER['HTTP_USER_AGENT']);
|
||||
|
||||
$sMode = isset($_REQUEST['mode']) ? $_REQUEST['mode'] : '';
|
||||
if ($sMode == 'locate')
|
||||
@ -63,12 +52,10 @@
|
||||
$nLat1 = isset($_REQUEST['lat1']) ? $_REQUEST['lat1']+0 : 0;
|
||||
$nLat2 = isset($_REQUEST['lat2']) ? $_REQUEST['lat2']+0 : 0;
|
||||
$cachenames = isset($_REQUEST['cachenames']) ? $_REQUEST['cachenames']+0 : 0;
|
||||
$smallmap = isset($_REQUEST['smallmap']) ? $_REQUEST['smallmap']+0 : 0;
|
||||
|
||||
if (isset($_REQUEST['smallmap']) && $_REQUEST['smallmap'] &&
|
||||
$user_maxrecords == 0 && $maxrecords > 1000)
|
||||
$maxrecords = floor($maxrecords*0.65);
|
||||
|
||||
output_searchresult($nResultId, $compact, $nLon1, $nLon2, $nLat1, $nLat2, $cachenames);
|
||||
output_searchresult($nResultId, $compact, $nLon1, $nLon2, $nLat1, $nLat2,
|
||||
$cachenames, $smallmap);
|
||||
}
|
||||
else if ($sMode == 'fullscreen' ||
|
||||
($sMode == '' &&
|
||||
@ -95,28 +82,25 @@
|
||||
sql("INSERT INTO `user_options` (`user_id`, `option_id`, `option_visible`, `option_value`)
|
||||
VALUES ('&1', '&2', '&3', '&4')
|
||||
ON DUPLICATE KEY UPDATE `option_value`='&4'",
|
||||
$login->userid, 7, 0, isset($_REQUEST['opt_overview']) ? min(max($_REQUEST['opt_overview']+0, 0), 1) : 0);
|
||||
$login->userid, 7, 0, isset($_REQUEST['opt_overview']) ? min(max(round($_REQUEST['opt_overview']+0), 0), 1) : 0);
|
||||
sql("INSERT INTO `user_options` (`user_id`, `option_id`, `option_visible`, `option_value`)
|
||||
VALUES ('&1', '&2', '&3', '&4')
|
||||
ON DUPLICATE KEY UPDATE `option_value`='&4'",
|
||||
$login->userid, 8, 0, $_REQUEST['opt_maxcaches'] == 0 ? 0 : min(max($_REQUEST['opt_maxcaches']+0, $opt['map']['min_maxrecords']), $opt['map']['max_maxrecords']) );
|
||||
$login->userid, 8, 0, $_REQUEST['opt_maxcaches'] == 0 ? 0 : min(max(round($_REQUEST['opt_maxcaches']+0), $opt['map']['min_maxrecords']), $opt['map']['max_maxrecords']) );
|
||||
sql("INSERT INTO `user_options` (`user_id`, `option_id`, `option_visible`, `option_value`)
|
||||
VALUES ('&1', '&2', '&3', '&4')
|
||||
ON DUPLICATE KEY UPDATE `option_value`='&4'",
|
||||
$login->userid, 9, 0, min(max($_REQUEST['opt_cacheicons']+0, 1), 2) );
|
||||
sql("INSERT INTO `user_options` (`user_id`, `option_id`, `option_visible`, `option_value`)
|
||||
VALUES ('&1', '&2', '&3', '&4')
|
||||
ON DUPLICATE KEY UPDATE `option_value`='&4'",
|
||||
$login->userid, 10, 0, min(max($_REQUEST['opt_pictures']+0, 0), 50) );
|
||||
}
|
||||
|
||||
$tpl->name = 'map2';
|
||||
$tpl->menuitem = MNU_MAP;
|
||||
$tpl->nowpsearch = true;
|
||||
|
||||
// check for browser compatibility
|
||||
if (preg_match('/MSIE [1-9]+.[0-9]+/',$_SERVER['HTTP_USER_AGENT']))
|
||||
$tpl->assign('msie',true);
|
||||
if (preg_match('/MSIE [1-6].[0-9]+/',$_SERVER['HTTP_USER_AGENT']))
|
||||
$tpl->assign('old_msie',true);
|
||||
$tpl->assign('maxrecords',$maxrecords);
|
||||
|
||||
// get the correct mapkey
|
||||
$sHost = strtolower($_SERVER['HTTP_HOST']);
|
||||
if (isset($opt['lib']['google']['mapkey'][$sHost]))
|
||||
@ -241,15 +225,22 @@
|
||||
case 7: $tpl->assign('opt_overview', $r['value']); break;
|
||||
case 8: $tpl->assign('opt_maxcaches', $r['value']); break;
|
||||
case 9: $tpl->assign('opt_cacheicons', $r['value']); break;
|
||||
case 10: $tpl->assign('opt_pictures', $r['value']); break;
|
||||
}
|
||||
sql_free_result($rs);
|
||||
|
||||
$tpl->assign('maxrecords',$opt['map']['maxrecords'] + 0);
|
||||
$tpl->assign('min_maxrecords', $opt['map']['min_maxrecords']);
|
||||
$tpl->assign('max_maxrecords', $opt['map']['max_maxrecords']);
|
||||
|
||||
$tpl->assign('msie',$msie);
|
||||
$tpl->assign('old_msie',$old_msie);
|
||||
|
||||
$tpl->assign('help_oconly', helppagelink("OConly"));
|
||||
$tpl->assign('help_map', helppagelink("*map2"));
|
||||
$tpl->assign('help_wps', helppagelink("additional_waypoints"));
|
||||
$tpl->assign('help_note', helppagelink("usernote"));
|
||||
$tpl->assign('help_previewpics', helppagelink("previewpics"));
|
||||
|
||||
$tpl->display();
|
||||
|
||||
@ -299,7 +290,9 @@ function output_cachexml($sWaypoint)
|
||||
IFNULL(`stat_caches`.`toprating`, 0) AS `toprating`,
|
||||
IF(`caches`.`user_id`='&1', 1, 0) AS `owner`,
|
||||
`user`.`username`, `user`.`user_id`,
|
||||
IF(`caches_attributes`.`attrib_id` IS NULL, 0, 1) AS `oconly`
|
||||
IF(`caches_attributes`.`attrib_id` IS NULL, 0, 1) AS `oconly`,
|
||||
IFNULL(`pictures`.`url`,'') AS `picurl`,
|
||||
IFNULL(`pictures`.`title`,'') AS `pictitle`
|
||||
FROM `caches`
|
||||
INNER JOIN `cache_type` ON `caches`.`type`=`cache_type`.`id`
|
||||
INNER JOIN `cache_status` ON `caches`.`status`=`cache_status`.`id`
|
||||
@ -313,9 +306,11 @@ function output_cachexml($sWaypoint)
|
||||
LEFT JOIN `sys_trans` AS `trans_size` ON `cache_size`.`trans_id`=`trans_size`.`id` AND `cache_size`.`name`=`trans_size`.`text`
|
||||
LEFT JOIN `sys_trans_text` AS `trans_size_text` ON `trans_size`.`id`=`trans_size_text`.`trans_id` AND `trans_size_text`.`lang`='&2'
|
||||
LEFT JOIN `caches_attributes` ON `caches_attributes`.`cache_id`=`caches`.`cache_id` AND `caches_attributes`.`attrib_id`=6
|
||||
LEFT JOIN `pictures` ON `pictures`.`object_id`=`caches`.`cache_id` AND `pictures`.`object_type`='&4' AND `pictures`.`mappreview`=1
|
||||
WHERE (`caches`.`wp_oc`='&3' OR (`caches`.`wp_oc`!='&3' AND `caches`.`wp_gc`='&3') OR (`caches`.`wp_oc`!='&3' AND `caches`.`wp_nc`='&3')) AND
|
||||
(`cache_status`.`allow_user_view`=1 OR `caches`.`user_id`='&1')",
|
||||
$login->userid, $opt['template']['locale'], $sWaypoint);
|
||||
$login->userid, $opt['template']['locale'], $sWaypoint, OBJECT_CACHE);
|
||||
|
||||
$rCache = sql_fetch_assoc($rsCache);
|
||||
sql_free_result($rsCache);
|
||||
|
||||
@ -358,7 +353,9 @@ function output_cachexml($sWaypoint)
|
||||
echo 'oconly="' . xmlentities($rCache['oconly']) . '" ';
|
||||
echo 'owner="' . xmlentities($rCache['owner']) . '" ';
|
||||
echo 'username="' . xmlentities($rCache['username']) . '" ';
|
||||
echo 'userid="' . xmlentities($rCache['user_id']) . '" >' . "\n";
|
||||
echo 'userid="' . xmlentities($rCache['user_id']) . '" ';
|
||||
echo 'picurl="' . xmlentities($rCache['picurl']) . '" ';
|
||||
echo 'pictitle="' . xmlentities(trim($rCache['pictitle'])) . '" >\n';
|
||||
|
||||
foreach ($waypoints as $waypoint)
|
||||
{
|
||||
@ -407,9 +404,10 @@ function output_namesearch($sName, $nLat, $nLon, $nResultId)
|
||||
exit;
|
||||
}
|
||||
|
||||
function output_searchresult($nResultId, $compact, $nLon1, $nLon2, $nLat1, $nLat2, $cachenames)
|
||||
function output_searchresult($nResultId, $compact, $nLon1, $nLon2, $nLat1, $nLat2,
|
||||
$cachenames, $smallmap)
|
||||
{
|
||||
global $login, $opt, $maxrecords;
|
||||
global $login, $opt, $maxrecords, $msie;
|
||||
|
||||
// check if data is available and connect the right slave server
|
||||
$nSlaveId = sql_value("SELECT `slave_id` FROM `map2_result` WHERE `result_id`='&1' AND DATE_ADD(`date_created`, INTERVAL '&2' SECOND)>NOW()", -2, $nResultId, $opt['map']['maxcacheage']);
|
||||
@ -427,15 +425,32 @@ function output_searchresult($nResultId, $compact, $nLon1, $nLon2, $nLat1, $nLat
|
||||
$nRecordCount = sql_value_slave("SELECT COUNT(*) FROM `map2_data` INNER JOIN `caches` ON `map2_data`.`cache_id`=`caches`.`cache_id` WHERE `map2_data`.`result_id`='&1' AND `caches`.`longitude`>'&2' AND `caches`.`longitude`<'&3' AND `caches`.`latitude`>'&4' AND `caches`.`latitude`<'&5'", 0, $nResultId, $nLon1, $nLon2, $nLat1, $nLat2);
|
||||
// TODO: SQL_CALC_FOUND_ROWS + $nRecordCount = sql_value_slave("SELECT FOUND_ROWS()", 0);
|
||||
|
||||
$bMaxRecordReached = false;
|
||||
if ($nRecordCount > $maxrecords)
|
||||
$bMaxRecordReached = true;
|
||||
$namequery = ($cachenames ? ", `caches`.`name` AS `cachename`" : "");
|
||||
|
||||
echo '<searchresult count="' . $nRecordCount . '" available="1" maxrecordreached="' . ($bMaxRecordReached ? '1' : '0') . '">' . "\n";
|
||||
|
||||
if ($bMaxRecordReached == false)
|
||||
// determine max. number of records to send
|
||||
$maxrecords = $opt['map']['maxrecords'] + 0;
|
||||
if ($login->userid > 0)
|
||||
{
|
||||
$user_maxrecords =
|
||||
sql_value("SELECT option_value FROM user_options WHERE user_id='&1' AND option_id=8",
|
||||
$opt['map']['maxrecords'] + 0, $login->userid);
|
||||
if ($user_maxrecords > 0 && (!$msie || $user_maxrecords < $maxrecords))
|
||||
$maxrecords = min(max($user_maxrecords, $opt['map']['min_maxrecords']),
|
||||
$opt['map']['max_maxrecords']);
|
||||
}
|
||||
else
|
||||
$user_maxrecords = 0;
|
||||
|
||||
if ($smallmap && $user_maxrecords == 0 && $maxrecords > 1000)
|
||||
$maxrecords = floor($maxrecords*0.65);
|
||||
|
||||
$bMaxRecordReached = ($nRecordCount > $maxrecords);
|
||||
|
||||
// output data
|
||||
echo '<searchresult count="' . xmlentities($nRecordCount) . '" available="1"' .
|
||||
' maxrecordreached="' . ($bMaxRecordReached ? '1' : '0') . '">' . "\n";
|
||||
|
||||
if (!$bMaxRecordReached)
|
||||
{
|
||||
$namequery = ($cachenames ? ", `caches`.`name` AS `cachename`" : "");
|
||||
$rs = sql_slave("SELECT SQL_BUFFER_RESULT
|
||||
`caches`.`wp_oc`, `caches`.`longitude`, `caches`.`latitude`,
|
||||
`caches`.`type`,
|
||||
|
@ -77,6 +77,7 @@
|
||||
|
||||
$picture->setSpoiler(isset($_REQUEST['spoiler']) && $_REQUEST['spoiler']=='1');
|
||||
$picture->setDisplay((isset($_REQUEST['notdisplay']) && $_REQUEST['notdisplay']=='1') == false);
|
||||
$picture->setMapPreview(isset($_REQUEST['mappreview']) && $_REQUEST['mappreview']=='1');
|
||||
|
||||
$title = isset($_REQUEST['title']) ? $_REQUEST['title'] : '';
|
||||
if ($title == '')
|
||||
@ -164,6 +165,7 @@
|
||||
// overwrite values
|
||||
$picture->setSpoiler(isset($_REQUEST['spoiler']) && $_REQUEST['spoiler']=='1');
|
||||
$picture->setDisplay((isset($_REQUEST['notdisplay']) && $_REQUEST['notdisplay']=='1') == false);
|
||||
$picture->setMapPreview(isset($_REQUEST['mappreview']) && $_REQUEST['mappreview']=='1');
|
||||
|
||||
$title = isset($_REQUEST['title']) ? $_REQUEST['title'] : $picture->getTitle();
|
||||
if ($title == '')
|
||||
@ -212,6 +214,7 @@
|
||||
$tpl->assign('title', $picture->getTitle());
|
||||
$tpl->assign('spoilerchecked', $picture->getSpoiler());
|
||||
$tpl->assign('displaychecked', $picture->getDisplay());
|
||||
$tpl->assign('mappreviewchecked', $picture->getMapPreview());
|
||||
|
||||
$tpl->display();
|
||||
?>
|
@ -923,8 +923,8 @@ a.info:hover span{ /*the span will display just on :hover state*/
|
||||
div.tplhelp
|
||||
{
|
||||
position:absolute;
|
||||
top:135px;
|
||||
right:12px;
|
||||
top:136px;
|
||||
right:13px;
|
||||
}
|
||||
|
||||
/* lists at hompage */
|
||||
@ -1136,7 +1136,6 @@ td.mapheader_spacer {
|
||||
position:absolute;
|
||||
z-index:999;
|
||||
background-color:white;
|
||||
border:solid 1px darkblue;
|
||||
padding:10px;
|
||||
right:15px;
|
||||
opacity:0.9;
|
||||
@ -1199,6 +1198,10 @@ table.mappopup td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.mapboxframe {
|
||||
border:1px solid #777777;
|
||||
}
|
||||
|
||||
.mapboxshadow {
|
||||
box-shadow: 1px 2px 3px #555;
|
||||
-moz-box-shadow: 1px 2px 3px #555;
|
||||
@ -1260,7 +1263,6 @@ div.mapoptions {
|
||||
position:absolute;
|
||||
right:100px;
|
||||
top: 80px;
|
||||
border: 1px solid rgb(0,0,60);
|
||||
opacity: 0.9;
|
||||
background: #FFFFFF;
|
||||
padding:10px 10px 10px 10px;
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
BIN
htdocs/resource2/ocstyle/images/misc/32x32-help.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
htdocs/resource2/ocstyle/images/misc/close-smaller.png
Normal file
After Width: | Height: | Size: 336 B |
Before Width: | Height: | Size: 2.0 KiB |
@ -20,8 +20,9 @@
|
||||
<li><a href="map2.php?mode=fullscreen">Vollbildkarte</a> mit ausklappbaren Filtereinstellungen</li>
|
||||
<li><a href="http://wiki.opencaching.de/index.php/Zusätzliche_Wegpunkte" target="_blank">zusätzliche Wegpunkte</a> des gewählten Caches werden angezeigt</li>
|
||||
<li>bis zu 4000 Caches auf einer Karte</li>
|
||||
<li>alternative Cachesymbole wählbar (Opencaching.pl-Stil)</li>
|
||||
<li>Home-Button springt zu den im <a href="myprofile.php">Profil</a> eingetragenen Heimkoordinaten</li>
|
||||
<li>alternative Cachesymbole wählbar (Opencaching.pl-Stil)</li>
|
||||
<li>pro Cache ist ein <a href="http://wiki.opencaching.de/index.php?title=Vorschaubilder" target="_blank">Vorschaubild</a> einstellbar, das bei Auswahl des Caches auf der Karte erscheint</li>
|
||||
<li>Verbesserungen bei der Cacheauswahl / Filter:
|
||||
<ul>
|
||||
<li>komfortablere Auswahl von einzelnen Cachetypen oder -größen</li>
|
||||
|
@ -107,6 +107,7 @@ var mhInfoWindowHackTries = 0;
|
||||
var moWpInfoWindow = null;
|
||||
var maWpWaypoints;
|
||||
var moWaypointList = new Array();
|
||||
var mhPictureTimer = null;
|
||||
|
||||
var mnMapWidth = 770;
|
||||
var mnMapHeight = 600;
|
||||
@ -304,8 +305,8 @@ function cookieSave()
|
||||
sFilter += '/attr:' + sAttrFilter.substring(1);
|
||||
|
||||
document.cookie = msInitCookieFilterName + "=" + sFilter.substring(1);
|
||||
// "expires" not set, so that the cookie will expire when browser is closed
|
||||
// ;because the user can easily forget or overlook that filtering is acive.
|
||||
// "expires" not set, so that the cookie will expire when browser is closed,
|
||||
// because the user can easily forget or overlook that filtering is acive.
|
||||
}
|
||||
|
||||
|
||||
@ -386,7 +387,8 @@ function mapLoad()
|
||||
// is included in bounds_changed
|
||||
google.maps.event.addListener(moMap, "maptypeid_changed", function(){map_maptypechanged()});
|
||||
google.maps.event.addListener(moMap, "mousemove", function(event){map_mousemove(event)});
|
||||
google.maps.event.addListener(moMap, "click", function(event){map_clicked()});
|
||||
google.maps.event.addListener(moMap, "click", function(){map_clicked()});
|
||||
// google.maps.event.addListener(moMap, "rightclick", function(){toggle_sidebar(false)});
|
||||
|
||||
if (msInitWaypoint != "")
|
||||
show_cachepopup_wp(msInitWaypoint, true);
|
||||
@ -448,11 +450,15 @@ function map_mousemove(event)
|
||||
function map_clicked()
|
||||
{
|
||||
if (bFullscreen)
|
||||
{
|
||||
if (document.getElementById("sidebar").style.display != 'none')
|
||||
toggle_sidebar();
|
||||
}
|
||||
else
|
||||
dataload_on_filterchange();
|
||||
mapselectlist_hide(); // firefox needs this
|
||||
moInfoWindow.close();
|
||||
moWpInfoWindow.close();
|
||||
close_infowindow(false);
|
||||
permalinkbox_hide();
|
||||
}
|
||||
|
||||
@ -579,15 +585,21 @@ function xmlParse( str )
|
||||
function queue_dataload(nMs)
|
||||
{
|
||||
if (moDataLoadTimer != null)
|
||||
clearTimeout(moDataLoadTimer);
|
||||
window.clearTimeout(moDataLoadTimer);
|
||||
moDataLoadTimer = window.setTimeout('data_load()', nMs);
|
||||
}
|
||||
|
||||
function dataload_on_filterchange()
|
||||
{
|
||||
if (bFilterChanged)
|
||||
queue_dataload(100);
|
||||
}
|
||||
|
||||
function data_load()
|
||||
{
|
||||
if (bFilterChanged)
|
||||
{
|
||||
moInfoWindow.close();
|
||||
close_infowindow(true);
|
||||
clear_waypoints();
|
||||
}
|
||||
bResetFilterHeading = bFilterChanged;
|
||||
@ -811,7 +823,7 @@ function data_clear_except(wpset)
|
||||
|
||||
|
||||
/*=========================================================================
|
||||
Cache-InfoWindow popup
|
||||
InfoWindows (popups)
|
||||
=========================================================================*/
|
||||
|
||||
function show_cachepopup_wp(sWaypoint, bAllowZoomChange)
|
||||
@ -825,16 +837,23 @@ function show_cachepopup_latlon(nLat, nLon, bAllowZoomChange)
|
||||
}
|
||||
|
||||
{/literal}
|
||||
{* In some browers and zoom levels, a wrong size is calculated by GM for some infowindow
|
||||
* contents. If the caluclated size is too small, the containing div will show a scrollbar:
|
||||
{* In some browers and zoom levels (especially Chrome and MSIE at small zoom), a wrong
|
||||
* size is calculated by GM for some infowindow contents. If the caluclated size is too
|
||||
* small, the containing div will show a scrollbar:
|
||||
*
|
||||
* http://stackoverflow.com/questions/1554893/google-maps-api-v3-infowindow-not-sizing-correctly
|
||||
*
|
||||
* The only solution working under all conditions seems to be increasing the container
|
||||
* div's size (while tampering with it's overflow setting will cause other problems
|
||||
* especiallyin Chrome, with waypoints cut off at the right). This will neither affect the
|
||||
* size of our 'mapinfowindow' div nor of the infowindow, but only give our content more
|
||||
* space. We allocate as much fits into the InfoWindow borders.
|
||||
* The only solution working under all conditions seems to be changing the container
|
||||
* div's properties - either letting it overflow or increasing it's size size.
|
||||
* This will neither affect the size of our 'mapinfowindow' div nor of the infowindow, but
|
||||
* only give our content more space.
|
||||
*
|
||||
* The 'overflow solution' also prevents scrollbars if the browser zoom is changed with
|
||||
* open infowindow. It also may work better with dynamic window content (not tested yet).
|
||||
* It has the disatvantage that text will temporarily flow out at the bottom of the
|
||||
* window then zoom is increased with open infowindow in Firefox. Also, it will flow out
|
||||
* at the *right* with Firefox if the contained data is formatted with
|
||||
* max-width + white-space:nobr (which wee currently need not to do).
|
||||
*
|
||||
* Also, there is another MSIE issue regading a second inner pair of scrollbars. We get
|
||||
* rid of them by settings overflow:hidden on mapinfowindow (see style_screen.css).
|
||||
@ -846,11 +865,20 @@ function adjust_infowindow()
|
||||
if (mhInfoWindowHackTries > 0)
|
||||
try
|
||||
{
|
||||
var iw_frame = document.getElementById('mapinfowindow').parentNode;
|
||||
iw_frame.parentNode.style.overflow = "visible";
|
||||
iw_frame.style.overflow = "visible";
|
||||
// BOTH divs overflow must be set so that it works right in all browsers!
|
||||
mhInfoWindowHackTries = 0;
|
||||
|
||||
{/literal}
|
||||
{* old code version, which did it by increasing the outer container div's size:
|
||||
|
||||
var iw_frame = document.getElementById('mapinfowindow').parentNode.parentNode;
|
||||
var iw_width = parseInt(iw_frame.style.width.substr(0, iw_frame.style.width.indexOf('px')));
|
||||
var iw_height = parseInt(iw_frame.style.height.substr(0, iw_frame.style.height.indexOf('px')));
|
||||
|
||||
if (iw_width != "" && iw_height != "")
|
||||
if (iw_width > 0 && iw_height > 0)
|
||||
{
|
||||
mhInfoWindowHackTries = 0;
|
||||
// alert("Before: " + iw_frame.style.width + " / " + iw_frame.style.height);
|
||||
@ -861,10 +889,12 @@ function adjust_infowindow()
|
||||
}
|
||||
else
|
||||
mhInfoWindowHackTries -= 1;
|
||||
*} {literal}
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
// we were too fast and will try again
|
||||
mhInfoWindowHackTries -= 1;
|
||||
}
|
||||
|
||||
if (mhInfoWindowHackTries <= 0)
|
||||
@ -877,19 +907,19 @@ function hack_infowindow()
|
||||
mhInfoWindowHackTimer = window.setInterval("adjust_infowindow()",10);
|
||||
}
|
||||
|
||||
function show_infowindow(oCoords, sText, aWaypoints)
|
||||
function show_infowindow(oCoords, sText)
|
||||
{
|
||||
// close last info window, if open, and discard waypoin list
|
||||
moInfoWindow.close();
|
||||
close_infowindow(true);
|
||||
clear_waypoints();
|
||||
|
||||
// open new info window
|
||||
moInfoWindow = new google.maps.InfoWindow({ position: oCoords, content: sText });
|
||||
moInfoWindow.open( moMap, null, true );
|
||||
wid = document.getElementById('mapinfowindow');
|
||||
hack_infowindow();
|
||||
}
|
||||
|
||||
// save waypoint list and create waypoint markers and handlers
|
||||
function init_waypoint_markers(aWaypoints)
|
||||
{
|
||||
maWpWaypoints = aWaypoints;
|
||||
|
||||
for (var nWp=0; nWp<aWaypoints.length; nWp++)
|
||||
@ -946,7 +976,10 @@ function show_infowindow(oCoords, sText, aWaypoints)
|
||||
}
|
||||
}
|
||||
|
||||
moInfoWindow.close();
|
||||
// if a picture is shown, it is from the same cache, so we keep it open
|
||||
// by the 'false' param here
|
||||
close_infowindow(false);
|
||||
|
||||
moWpInfoWindow.close();
|
||||
|
||||
var imgparams = get_wp_imgparams(aWaypoints[nearestwp]);
|
||||
@ -969,11 +1002,11 @@ function show_infowindow(oCoords, sText, aWaypoints)
|
||||
typetext += typename;
|
||||
|
||||
var text = // MSIE needs max width to wrap long descriptions
|
||||
"<div id='mapinfowindow' style='max-width:350px; max-height:350px'><table class='mappopup'>" +
|
||||
"<div id='mapinfowindow' style='max-width:400px; max-height:400px'><table class='mappopup'>" +
|
||||
"<tr><td><table cellspacing='0' cellpadding='0'><tr><td>" +
|
||||
"<img src='" + image + "' width='" + imagewidth + "' height='" + imageheight + "' ></td>" +
|
||||
"<td style='font-size:1.2em'>" + typetext + " {t}for{/t}" + " </td>" +
|
||||
"<td style='font-weight:bold; font-size:1.2em'><a href='viewcache.php?wp=" + msPopupMarkerWP + "' target='_blank_'>" + msPopupMarkerWP + "</a></td>" +
|
||||
"<td style='font-size:1.15em'><span style='white-space:normal'>" + typetext + " {t}for{/t}" + "</span></td>" +
|
||||
"<td style='font-weight:bold; font-size:1.2em'> <a href='viewcache.php?wp=" + msPopupMarkerWP + "' target='_blank_'>" + msPopupMarkerWP + "</a></td>" +
|
||||
"</tr></table></td></tr>";
|
||||
if (description != "")
|
||||
text += "<tr><td style='padding:8px; max-width:350px; white-space:normal' colspan='4'>" + description + "</td></tr>";
|
||||
@ -1012,7 +1045,7 @@ function clear_waypoints()
|
||||
|
||||
function show_cachepopup_url(sURL, sWaypoint, bAllowZoomChange)
|
||||
{
|
||||
moInfoWindow.close();
|
||||
close_infowindow(true);
|
||||
moWpInfoWindow.close();
|
||||
|
||||
ajaxLoad(sURL, function(data, responseCode) {
|
||||
@ -1039,7 +1072,9 @@ function show_cachepopup_url(sURL, sWaypoint, bAllowZoomChange)
|
||||
moMap.setZoom(nDefaultZoom);
|
||||
}
|
||||
|
||||
show_infowindow(oCoords, parseXML_GetHTML(oXML), parseXML_GetWaypoints(oXML));
|
||||
show_infowindow(oCoords, parseXML_GetHTML(oXML));
|
||||
init_waypoint_markers(parseXML_GetWaypoints(oXML));
|
||||
load_cache_pic(oXML);
|
||||
});
|
||||
}
|
||||
|
||||
@ -1087,7 +1122,7 @@ function parseXML_GetHTML(xmlobject)
|
||||
// inernal rendering errors which create annoying scrollbars within the info window.
|
||||
*}{literal}
|
||||
|
||||
var sHtml = "<div id='mapinfowindow' class='mappopup'><table class='mappopup'>";
|
||||
var sHtml = "<div id='mapinfowindow' class='mappopup' style='z-index:800'><table class='mappopup'>";
|
||||
if (bStatusTNA == 1)
|
||||
sHtml += "<tr><td colspan='2'><font size='2' color='red'><b>" + xmlentities(sStatusText) + "</b></font></td></tr>";
|
||||
|
||||
@ -1154,7 +1189,6 @@ function parseXML_GetWaypoints(xmlobject)
|
||||
return aCaches[0].getElementsByTagName("wpt");
|
||||
}
|
||||
|
||||
|
||||
function parseXML_GetPoint(oXMLObject)
|
||||
{
|
||||
var oCaches = oXMLObject.documentElement.getElementsByTagName("cache");
|
||||
@ -1168,6 +1202,148 @@ function parseXML_GetPoint(oXMLObject)
|
||||
return oCoordsYX;
|
||||
}
|
||||
|
||||
function load_cache_pic(xmlobject)
|
||||
{
|
||||
{/literal}{if $opt_pictures > 0}{literal}
|
||||
var aCaches = xmlobject.documentElement.getElementsByTagName("cache");
|
||||
if (aCaches.length<1)
|
||||
return "";
|
||||
|
||||
var picurl = aCaches[0].getAttribute("picurl");
|
||||
var pictitle = aCaches[0].getAttribute("pictitle"); // "name"
|
||||
if (picurl != "")
|
||||
{
|
||||
if (pictitle != "")
|
||||
{
|
||||
document.getElementById('cachepictitle').innerHTML = pictitle;
|
||||
document.getElementById('cachepictitle').style.display = 'block';
|
||||
}
|
||||
else
|
||||
document.getElementById('cachepictitle').style.display = 'none';
|
||||
|
||||
var imagebox = document.getElementById('cachepiccontainer');
|
||||
imagebox.removeChild(document.getElementById('cachepic')) ;
|
||||
|
||||
var img = document.createElement("img");
|
||||
img.onclick = "enlarge(this)";
|
||||
img.className = "viewcache-thumbimg";
|
||||
img.id = "cachepic";
|
||||
img.onload = function() { show_picture(1000); }
|
||||
imagebox.appendChild(img);
|
||||
img.src = picurl;
|
||||
img.style.cursor = "url(resource2/ocstyle/js/enlargeit/pluscur.cur), auto";
|
||||
imagebox.href = "javascript:toggle_imagesize()";
|
||||
}
|
||||
{/literal}{/if}{literal}
|
||||
}
|
||||
|
||||
function toggle_imagesize(img)
|
||||
{
|
||||
img = document.getElementById('cachepic');
|
||||
var enlarge = img.style.cursor.indexOf('pluscur') > 0;
|
||||
if (enlarge)
|
||||
{
|
||||
img.width *= 2;
|
||||
img.height *= 2;
|
||||
img.style.cursor = "url(resource2/ocstyle/js/enlargeit/minuscur.cur), auto";
|
||||
}
|
||||
else
|
||||
{
|
||||
img.width /= 2;
|
||||
img.height /= 2;
|
||||
img.style.cursor = "url(resource2/ocstyle/js/enlargeit/pluscur.cur), auto";
|
||||
}
|
||||
set_img_title_width();
|
||||
}
|
||||
|
||||
function fade_picture(step)
|
||||
{
|
||||
{/literal}{if $opt_pictures > 0}{literal}
|
||||
if (mhPictureTimer != null)
|
||||
window.clearTimeout(mhPictureTimer);
|
||||
var next = parseFloat(document.getElementById('cachepicbox').style.opacity) + step;
|
||||
next = Math.max(0,Math.min(next,1));
|
||||
document.getElementById('cachepicbox').style.opacity = next;
|
||||
document.getElementById('oclogo').style.opacity = 1 - Math.log(10*next)/Math.LN10;
|
||||
|
||||
if (next <= 0)
|
||||
{
|
||||
var logo = document.getElementById('oclogo');
|
||||
if (logo) logo.style.display = 'block';
|
||||
}
|
||||
else if (next < 1)
|
||||
mhPictureTimer = window.setTimeout('fade_picture(' + step + ')', 20);
|
||||
{/literal}{/if}{literal}
|
||||
}
|
||||
|
||||
function show_picture(time_left)
|
||||
{
|
||||
{/literal}{if $opt_pictures > 0}{literal}
|
||||
var img = document.getElementById('cachepic');
|
||||
var mapwidth = document.getElementById('googlemap').offsetWidth;
|
||||
var mapheight = document.getElementById('googlemap').offsetHeight;
|
||||
var imgwidth = img.width;
|
||||
var imgheight = img.height;
|
||||
|
||||
// alert(mapwidth+"x"+ mapheight + " " + imgwidth+"x"+imgheight);
|
||||
if (mapwidth * mapheight * imgwidth * imgheight < 100000)
|
||||
{
|
||||
if (time_left > 0)
|
||||
{
|
||||
// MSIE may need to show the image first before size is set
|
||||
document.getElementById('cachepicbox').style.zIndex = 0;
|
||||
document.getElementById('cachepicbox').style.display = 'block';
|
||||
window.setTimeout('show_picture(' + (time_left-100) + ')', 100);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
var maximgpixels = mapwidth * mapheight * {/literal}{$opt_pictures}{literal} / 100;
|
||||
var maxmappart = 0.6;
|
||||
var scale = Math.sqrt(maximgpixels / (imgwidth * imgheight));
|
||||
if (mapwidth*maxmappart/imgwidth < scale) scale = mapwidth*maxmappart/imgwidth;
|
||||
if (mapheight*maxmappart/imgheight < scale) scale = mapheight*maxmappart/imgheight;
|
||||
|
||||
if (scale < 1)
|
||||
{
|
||||
var imgratio = imgwidth / imgheight;
|
||||
img.width *= scale;
|
||||
img.height = img.width / imgratio;
|
||||
}
|
||||
set_img_title_width();
|
||||
|
||||
// document.getElementById('cachepicbox').style.opacity = 0;
|
||||
// fade_picture(0.1);
|
||||
// fading does not work properly on all browsers.
|
||||
|
||||
if (bFullscreen) document.getElementById('oclogo').style.display = 'none';
|
||||
document.getElementById('cachepicbox').style.display = 'block';
|
||||
document.getElementById('cachepicbox').style.zIndex = 20;
|
||||
{/literal}{/if}{literal}
|
||||
}
|
||||
|
||||
function set_img_title_width()
|
||||
{
|
||||
var img = document.getElementById('cachepic');
|
||||
var imgtitle = document.getElementById('cachepictitle').style;
|
||||
imgtitle.maxWidth = (img.width - parseInt(imgtitle.paddingLeft) - parseInt(imgtitle.paddingRight)) + "px";
|
||||
}
|
||||
|
||||
function hide_picture()
|
||||
{
|
||||
// fade_picture(-0.05);
|
||||
// fading does not work properly on all browsers.
|
||||
|
||||
document.getElementById('cachepicbox').style.display = 'none';
|
||||
if (bFullscreen) document.getElementById('oclogo').style.display = 'block';
|
||||
}
|
||||
|
||||
function close_infowindow(closepic)
|
||||
{
|
||||
moInfoWindow.close();
|
||||
if (closepic) hide_picture();
|
||||
}
|
||||
|
||||
|
||||
/*=========================================================================
|
||||
Status display
|
||||
@ -1320,7 +1496,20 @@ function toggle_settings()
|
||||
if (so.style.display == 'block')
|
||||
so.style.display = 'none';
|
||||
else
|
||||
{
|
||||
{/literal}
|
||||
// set controls to config values
|
||||
document.getElementById('opt_menumap0').selected = '{$opt_menumap == 0 ? "selected" : ""}';
|
||||
document.getElementById('opt_menumap1').selected = '{$opt_menumap == 1 ? "selected" : ""}';
|
||||
document.getElementById('opt_overview').checked = '{$opt_overview == 1 ? "checked" : ""}';
|
||||
document.getElementById('opt_maxcaches').value = '{$opt_maxcaches}';
|
||||
document.getElementById('opt_cacheicons1').selected = '{$opt_cacheicons == 1 ? "selected":""}';
|
||||
document.getElementById('opt_cacheicons2').selected = '{$opt_cacheicons == 2 ? "selected":""}';
|
||||
document.getElementById('opt_pictures').value = '{$opt_pictures}';
|
||||
|
||||
so.style.display = 'block';
|
||||
{literal}
|
||||
}
|
||||
}
|
||||
|
||||
// SEARCH
|
||||
@ -1398,7 +1587,7 @@ function searchlist_openitem(nIndex)
|
||||
else
|
||||
{
|
||||
var oCoords = new google.maps.LatLng(nLat, nLon);
|
||||
show_infowindow(oCoords, xmlentities(sText), new Array());
|
||||
show_infowindow(oCoords, xmlentities(sText));
|
||||
moMap.setCenter(oCoords);
|
||||
moMap.setZoom(nDefaultZoom-1);
|
||||
|
||||
@ -1910,11 +2099,11 @@ function toggle_attribselection(bSaveCookies)
|
||||
<td rowspan="2"><a class="jslink" onclick="showPermlinkBox_click()"><img src="resource2/{$opt.template.style}/images/map/35x35-star.png" style="margin-left:3px; margin-right:1px" height="35" width="35" alt="{t}Show link to this map{/t}" title="{t}Show link to this map{/t}" /></a></td>
|
||||
|
||||
{* configure button *}
|
||||
<td rowspan="2"><a class="jslink" onclick="toggle_settings()"><img src="resource2/{$opt.template.style}/images/openicons/35x35-configure.png" class="mapbutton" style="margin-left:0px; margin-right:0px" height="35" width="35" alt="{t}Settings{/t}" title="{t}Settings{/t}" /></a></td>
|
||||
<td rowspan="2"><a class="jslink" onclick="toggle_settings()"><img src="resource2/{$opt.template.style}/images/map/35x35-configure.png" class="mapbutton" style="margin-left:0px; margin-right:2px" height="35" width="35" alt="{t}Settings{/t}" title="{t}Settings{/t}" /></a></td>
|
||||
|
||||
{* help button *}
|
||||
{if $help_map != ""}
|
||||
<td rowspan="2">{$help_map}<img src="resource2/{$opt.template.style}/images/openicons/35x35-system-help.png" class="mapbutton" style="margin-left:2px; margin-right:3px" height="35" width="35" alt="{t}Instructions{/t}" title="{t}Instructions{/t}" /></a></td>
|
||||
<td rowspan="2">{$help_map}<img src="resource2/{$opt.template.style}/images/misc/32x32-help.png" class="mapbutton" style="margin-left:2px; margin-right:4px" height="32" width="32" alt="{t}Instructions{/t}" title="{t}Instructions{/t}" /></a></td>
|
||||
{/if}
|
||||
|
||||
{* normal / full screen button *}
|
||||
@ -1941,9 +2130,9 @@ function toggle_attribselection(bSaveCookies)
|
||||
</div>
|
||||
|
||||
{* popup box for permalink *}
|
||||
<div id="permalink_box" class="mappermalink mapboxshadow" style="display:none;">
|
||||
<div id="permalink_box" class="mappermalink mapboxframe mapboxshadow" style="display:none;">
|
||||
<table>
|
||||
<tr><td><img src="resource2/ocstyle/images/viewcache/link.png" alt="" height="16" width="16" /> {t}Link to this map view{/t}:</td><td align="right"><a href="javascript:permalinkbox_hide()"><img src="resource2/ocstyle/images/misc/close-medium.png"></a></td></tr>
|
||||
<tr><td><img src="resource2/ocstyle/images/viewcache/link.png" alt="" height="16" width="16" /> {t}Link to this map view{/t}:</td><td align="right"><a href="javascript:permalinkbox_hide()"><img src="resource2/ocstyle/images/misc/close-medium.png" style="opacity:0.7" ></a></td></tr>
|
||||
<tr><td><input id="permalink_text" type="text" value="" size="55"/></td></tr>
|
||||
<tr id="permalink_addFavorites"><td align="right"><input type="button" value="{t}Add to favorites...{/t}" onclick="javascript:addFavorites_click()" /></td></tr>
|
||||
</table>
|
||||
@ -1969,27 +2158,44 @@ function toggle_attribselection(bSaveCookies)
|
||||
<div class="maploading">{t}Loading map{/t} ...</div>
|
||||
<div class="mapversion">GM Version <script type="text/javascript">document.write(google.maps.version);</script></div>
|
||||
|
||||
<div id="mapoptions" class="mapoptions mapboxshadow" style="z-index:999; display:none">
|
||||
<div id="mapoptions" class="mapoptions mapboxframe mapboxshadow" style="z-index:999; display:none">
|
||||
<form action="map2.php?mode={if $bFullscreen}full{else}normal{/if}screen" method="post" style="display:inline;">
|
||||
<input type="hidden" name="submit" value="1" />
|
||||
<table>
|
||||
<tr><td><strong>{t}Settings{/t}</strong></td><td style="text-align:right"><a href="javascript:toggle_settings()"><img src="resource2/ocstyle/images/misc/close-medium.png" /></a></tr>
|
||||
<tr><td>{t}Menu option 'Map' shows{/t}:</td><td><select name="opt_menumap"><option value="0" {if $opt_menumap==0}selected="selected"{/if}>{t}small map{/t}</option><option value="1" {if $opt_menumap==1}selected="selected"{/if}>{t}fullscreen map{/t}</option></select></td></tr>
|
||||
<tr><td>{t}Show overview map{/t}:</td><td><input type="checkbox" name="opt_overview" value="1" {if $opt_overview==1}checked="checked"{/if}/></td></tr>
|
||||
<tr><td>{t 1=$min_maxrecords 2=$max_maxrecords}Maximum caches on map<br />(%1-%2, 0=automatic){/t}:</td><td><input type="text" name="opt_maxcaches" size="6" value="{$opt_maxcaches}" /></td></tr>
|
||||
<tr><td>{t}Cache icons{/t}:</td><td><select name="opt_cacheicons"><option value="1" {if $opt_cacheicons==1}selected="selected"{/if}>{t}classic OC{/t}<option value="2" {if $opt_cacheicons==2}selected="selected"{/if}>{t}OKAPI style{/t}</option></select></td></tr>
|
||||
<tr><td><span style="font-size:1.2em; font-weight:bold">{t}Settings{/t}</strong></td><td style="text-align:right"><a href="javascript:toggle_settings()"><img src="resource2/ocstyle/images/misc/close-medium.png" style="opacity:0.7" /></a></tr>
|
||||
<tr><td>{t}Menu option 'Map' shows{/t}:</td><td><select name="opt_menumap"><option id="opt_menumap0" value="0">{t}small map{/t}</option><option id="opt_menumap1" value="1">{t}fullscreen map{/t}</option></select></td></tr>
|
||||
<tr><td>{t}Show overview map{/t}:</td><td><input type="checkbox" id="opt_overview" name="opt_overview" value="1" /></td></tr>
|
||||
<tr><td>{t 1=$min_maxrecords 2=$max_maxrecords}Maximum caches on map<br />(%1-%2, 0=automatic){/t}:</td><td><input type="text" id="opt_maxcaches" name="opt_maxcaches" size="6" /></td></tr>
|
||||
{if $msie}
|
||||
<tr><td colspan="2" style="padding-top:0; white-space:normal">
|
||||
<img src="resource2/{$opt.template.style}/images/misc/hint.gif" alt="" />
|
||||
<small>{t 1=$maxrecords}Max. %1 caches can be displayed with Microsoft Internet Explorer.{/t}
|
||||
</td></tr>
|
||||
{/if}
|
||||
<tr><td>{t}Cache icons{/t}:</td><td><select name="opt_cacheicons"><option id="opt_cacheicons1" value="1">{t}classic OC{/t}<option id="opt_cacheicons2" value="2">{t}OKAPI style{/t}</option></select></td></tr>
|
||||
<tr><td>{t 1=$help_previewpics}Show %1preview pictures</a><br />(% of map area, 0=off){/t}:</td><td><input type="text" id="opt_pictures" name="opt_pictures" size="2" maxlength="2" /></td></tr>
|
||||
<tr><td colspan="2">{if $login.userid>0}<input type="button" class="formbutton" value="{t}Cancel{/t}" onclick="toggle_settings()"/> <input type="submit" name="submitsettings" class="formbutton" value="{t}Change{/t}" onclick="submitbutton('submitsettings')" />{else}<em>{t}You must be logged in to change map settings.{/t}</em>{/if}</td></tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="cachepicbox" class="mapboxframe mapboxshadow" style="position:absolute; {if $bFullscreen}left:4px; top:7px;{else}left:0; top:0;{/if} background:#fdfdfd; display:none; z-index:60">
|
||||
<div style="position:absolute; right:-19px; top:2px; opacity:0.7">
|
||||
<img src="resource2/ocstyle/images/misc/close-smaller.png" onclick="hide_picture()" style="cursor:pointer"/>
|
||||
</div>
|
||||
<div>
|
||||
<a id="cachepiccontainer" class="nooutline"><img id="cachepic"/></a>
|
||||
</div>
|
||||
<div id="cachepictitle" style="clear:both; padding:0px 4px 0px 4px; line-height:1.3em; max-height:2.6em; overflow:hidden"></div>
|
||||
</div>
|
||||
|
||||
{* THE MAP *}
|
||||
<div id="googlemap" style="position:absolute; top:0; bottom:0; left:0; width:100%; z-index:2"></div>
|
||||
</div>
|
||||
|
||||
{if $bFullscreen}
|
||||
{* the logo *}
|
||||
<a href="index.php"><img src="resource2/ocstyle/images/head/overlay/oc_logo_alpha3.png" style="position:absolute; left:32px; top:50px; z-index:2; border:0;"></a>
|
||||
<a href="index.php"><img id="oclogo" src="resource2/ocstyle/images/head/overlay/oc_logo_alpha3.png" style="position:absolute; left:32px; top:50px; z-index:2; border:0;"></a>
|
||||
|
||||
{literal}
|
||||
<script language="javascript">
|
||||
@ -2005,8 +2211,7 @@ function toggle_attribselection(bSaveCookies)
|
||||
ele.style.display = "none";
|
||||
// img.src=showimg;
|
||||
img.style.display = "block";
|
||||
if (bFilterChanged)
|
||||
queue_dataload(100);
|
||||
dataload_on_filterchange();
|
||||
}
|
||||
else {
|
||||
ele.style.display = "block";
|
||||
@ -2022,7 +2227,7 @@ function toggle_attribselection(bSaveCookies)
|
||||
{/literal}
|
||||
|
||||
{* frame for all sidebare contents: *}
|
||||
<div class="mapboxshadow" style="position:absolute; top: 80px; right:0px; margin: 0px; padding: 4px; border:1px solid #000; background:#fff; opacity: .9; z-index:2">
|
||||
<div class="mapboxframe mapboxshadow" style="position:absolute; top: 80px; right:0px; margin: 0px; padding: 4px; background:#fff; opacity: .9; z-index:2">
|
||||
{* sidebar hidden: '<' icon to open *}
|
||||
<a class="jslink nofocus" onclick="javascript:toggle_sidebar(true);" id='sidebar-toggle' style="width: 32px; height: 32px"><img id="sidbar-toggle-img" src="resource2/{$opt.template.style}/images/map/32x32-left.png"></a>
|
||||
{* sidebar visible: filter options table & '>' icon to close *}
|
||||
|
@ -90,7 +90,11 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right"><input class="checkbox" type="checkbox" name="notdisplay" value="1" {if $displaychecked==false}checked="checked"{/if}></td>
|
||||
<td>{t}Do not display this picture (only used in HTML description){/t}</td>
|
||||
<td>{t}Do not separately display this picture (used in HTML description etc.){/t}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right"><input class="checkbox" type="checkbox" name="mappreview" value="1" {if $mappreviewchecked==true}checked="checked"{/if}></td>
|
||||
<td>{t}Preview picture for map – is shown when this cache is selected on the map. You can have only <em>one</em> preview picture per cache.{/t}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if $action=='add'}
|
||||
@ -106,11 +110,13 @@
|
||||
|
||||
<tr><td class="spacer" colspan="2"></td></tr>
|
||||
|
||||
{if $action == "add"}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{t}By submitting I accept the <a href="articles.php?page=impressum#tos" target="_blank">Opencaching.de Terms of Service</a> and the <a href="articles.php?page=impressum#datalicense" target="_blank">Opencaching.de Datalicense</a>{/t}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
<tr><td class="spacer" colspan="2"></td></tr>
|
||||
|
||||
|
@ -191,7 +191,7 @@
|
||||
{/if}
|
||||
|
||||
{if $helplink != ""}
|
||||
<div class="tplhelp">{$helplink}<img src="resource2/ocstyle/images/openicons/35x35-system-help.png" /></a></div>
|
||||
<div class="tplhelp">{$helplink}<img src="resource2/ocstyle/images/misc/32x32-help.png" /></a></div>
|
||||
{/if}
|
||||
|
||||
{* <!-- NAVIGATION --> *}
|
||||
|
@ -45,11 +45,13 @@ class ChildWp_Handler
|
||||
|
||||
public function getChildWps($cacheid, $include_usernote=false)
|
||||
{
|
||||
global $login;
|
||||
|
||||
if ($include_usernote)
|
||||
$type2 = Coordinate_Type::UserNote;
|
||||
else
|
||||
$type2 = 0;
|
||||
$rs = sql("SELECT id, cache_id, type, subtype, latitude, longitude, description FROM coordinates WHERE cache_id = &1 AND type IN (&2,&3)", $cacheid, Coordinate_Type::ChildWaypoint, $type2);
|
||||
$rs = sql("SELECT id, cache_id, type, subtype, latitude, longitude, description FROM coordinates WHERE cache_id = &1 AND type IN (&2,&3) AND (type='&2' OR (user_id='&4' and latitude!=0 and longitude!=0))", $cacheid, Coordinate_Type::ChildWaypoint, $type2, $login->userid);
|
||||
$ret = array();
|
||||
|
||||
while ($r = sql_fetch_array($rs))
|
||||
|