diff --git a/lib/cache.php b/lib/cache.php index ef469891dd..a92e159d79 100644 --- a/lib/cache.php +++ b/lib/cache.php @@ -3,16 +3,20 @@ final class cache { - const TYPE_OTHERTYPE = 1; - const TYPE_TRADITIONAL = 2; - const TYPE_MULTICACHE = 3; - const TYPE_VIRTUAL = 4; - const TYPE_WEBCAM = 5; - const TYPE_EVENT = 6; - const TYPE_QUIZ = 7; - const TYPE_MOVING = 8; - const TYPE_GEOPATHFINAL = 9; - const TYPE_OWNCACHE = 10; + const TYPE_OTHERTYPE = 1; + const TYPE_TRADITIONAL = 2; + const TYPE_MULTICACHE = 3; + const TYPE_VIRTUAL = 4; + const TYPE_WEBCAM = 5; + const TYPE_EVENT = 6; + const TYPE_QUIZ = 7; + const TYPE_MOVING = 20; + const TYPE_GEOPATHFINAL = 21; + const TYPE_OWNCACHE = 22; + const TYPE_GUESTBOOK = 23; + const TYPE_BITCACHE = 24; + const TYPE_BENCHMARK = 25; + const TYPE_CHALLENGE = 26; const SIZE_MICRO = 2; const SIZE_SMALL = 3; @@ -59,27 +63,27 @@ final class cache self::TYPE_OTHERTYPE => array( 'name' => 'other', 'icon' => 'unknown.png', - 'translation' => 'cacheType_5' + 'translation' => 'cacheType_1' ), self::TYPE_TRADITIONAL => array( 'name' => 'traditional', 'icon' => 'traditional.png', - 'translation' => 'cacheType_1' + 'translation' => 'cacheType_2' ), self::TYPE_MULTICACHE => array( 'name' => 'multicache', 'icon' => 'multi.png', - 'translation' => 'cacheType_2', + 'translation' => 'cacheType_3', ), self::TYPE_VIRTUAL => array( 'name' => 'virtual', 'icon' => 'virtual.png', - 'translation' => 'cacheType_8' + 'translation' => 'cacheType_4' ), self::TYPE_WEBCAM => array( 'name' => 'webcam', 'icon' => 'webcam.png', - 'translation' => 'cacheType_7' + 'translation' => 'cacheType_5' ), self::TYPE_EVENT => array( 'name' => 'event', @@ -89,22 +93,43 @@ final class cache self::TYPE_QUIZ => array( 'name' => 'quiz', 'icon' => 'quiz.png', - 'translation' => 'cacheType_3' + 'translation' => 'cacheType_7' ), self::TYPE_MOVING => array( 'name' => 'moving', 'icon' => 'moving.png', - 'translation' => 'cacheType_4' + 'translation' => 'cacheType_20' ), self::TYPE_GEOPATHFINAL => array( 'name' => 'podcast', 'icon' => 'podcache.png', - 'translation' => 'cacheType_9' + 'translation' => 'cacheType_21' ), self::TYPE_OWNCACHE => array( 'name' => 'own-cache', 'icon' => 'owncache.png', - 'translation' => 'cacheType_10', + 'translation' => 'cacheType_22', + ), + + self::TYPE_GUESTBOOK => array( + 'name' => 'guestbook', + 'icon' => 'guestbook.png', + 'translation' => 'cacheType_23', + ), + self::TYPE_BITCACHE => array( + 'name' => 'bit-cache', + 'icon' => 'bitcache.png', + 'translation' => 'cacheType_24', + ), + self::TYPE_BENCHMARK => array( + 'name' => 'benchmark', + 'icon' => 'benchmark.png', + 'translation' => 'cacheType_25', + ), + self::TYPE_CHALLENGE => array( + 'name' => 'challenge', + 'icon' => 'challenge.png', + 'translation' => 'cacheType_26', ), ); private static $iconPath = 'images/cache/'; diff --git a/lib/languages/en.php b/lib/languages/en.php index dc53e6c13a..335c1bbb4e 100644 --- a/lib/languages/en.php +++ b/lib/languages/en.php @@ -42,6 +42,7 @@ 'map_excludeOwned' => 'Owned', 'sort_by' => 'Sort by', 'map_excludeCachesByType' => 'Hide caches by type', + 'unknown_type' => 'Other type', 'traditional' => 'Traditional', 'multicache' => 'Multicache', @@ -64,6 +65,7 @@ 'map_exWithoutRecomendation' => 'Without recommendation', 'map_biggerSizeThan' => 'only bigger than', 'map_sizeAny' => 'any size', + 'map_otherType' => 'Other type', 'map_traditionalType' => 'Traditional', 'map_multicacheType' => 'Multicache', @@ -73,6 +75,11 @@ 'map_quizType' => 'Puzzle', 'map_movingType' => 'Moving', 'map_owncacheType' => 'Owncache', + 'map_guestbookType' => 'Guestbook', + 'map_bitcacheType' => 'BIT cache', + 'map_benchmarkType' => 'Benchmark', + 'map_challengeType' => 'Challenge', + 'map_incorectMapParams' => 'Incorrect map params - default map is presented!', 'map_circle150mMode' => 'Circle with radius 150m for given location', 'map_searchResultsMode' => 'Map presents only the results of geocaches search query', @@ -1868,16 +1875,21 @@ 'region_04' => 'Region found by Google Maps', 'region_mapQuest' => 'Region found by MapQuest API', - 'cacheType_1' => 'Traditional', - 'cacheType_2' => 'Multicache', - 'cacheType_3' => 'Puzzle', - 'cacheType_4' => 'Moving', - 'cacheType_5' => 'Other type', + 'cacheType_1' => 'Other type', + 'cacheType_2' => 'Traditional', + 'cacheType_3' => 'Multicache', + 'cacheType_4' => 'Virtual', + 'cacheType_5' => 'Webcam', 'cacheType_6' => 'Event', - 'cacheType_7' => 'Webcam', - 'cacheType_8' => 'Virtual', - 'cacheType_9' => 'Podcast cache', - 'cacheType_10' => 'Own cache', + 'cacheType_7' => 'Quiz', + 'cacheType_20' => 'Moving', + 'cacheType_21' => 'GeoPath FINAL', + 'cacheType_22' => 'Own cache', + 'cacheType_23' => 'Guestbook', + 'cacheType_24' => 'BIT cache', + 'cacheType_25' => 'Benchmark', + 'cacheType_26' => 'Challenge', + 'cacheSize_nano' => 'Nano', 'cacheSize_micro' => 'Micro', 'cacheSize_small' => 'Small', diff --git a/lib/settingsDefault.inc.php b/lib/settingsDefault.inc.php index 05ed7b2f9a..f02e11a6c9 100644 --- a/lib/settingsDefault.inc.php +++ b/lib/settingsDefault.inc.php @@ -79,7 +79,11 @@ 'forbidenCacheTypes' => array( cache::TYPE_VIRTUAL, cache::TYPE_WEBCAM, - cache::TYPE_GEOPATHFINAL + cache::TYPE_GEOPATHFINAL, + cache::TYPE_GUESTBOOK, + cache::TYPE_BITCACHE, + cache::TYPE_BENCHMARK, + cache::TYPE_CHALLENGE ), /** * cache limits for user. If user is allowed to place limited nomber of specified cache type, diff --git a/src/Models/GeoCache/GeoCacheCommons.php b/src/Models/GeoCache/GeoCacheCommons.php index 51bc42da32..29d558e3a2 100644 --- a/src/Models/GeoCache/GeoCacheCommons.php +++ b/src/Models/GeoCache/GeoCacheCommons.php @@ -11,16 +11,20 @@ class GeoCacheCommons extends BaseObject { - const TYPE_OTHERTYPE = 1; - const TYPE_TRADITIONAL = 2; - const TYPE_MULTICACHE = 3; - const TYPE_VIRTUAL = 4; - const TYPE_WEBCAM = 5; - const TYPE_EVENT = 6; - const TYPE_QUIZ = 7; - const TYPE_MOVING = 8; - const TYPE_GEOPATHFINAL = 9; //TODO: old -podcast- type? - const TYPE_OWNCACHE = 10; + const TYPE_OTHERTYPE = 1; + const TYPE_TRADITIONAL = 2; + const TYPE_MULTICACHE = 3; + const TYPE_VIRTUAL = 4; + const TYPE_WEBCAM = 5; + const TYPE_EVENT = 6; + const TYPE_QUIZ = 7; + const TYPE_MOVING = 20; + const TYPE_GEOPATHFINAL = 21; //TODO: old -podcast- type? + const TYPE_OWNCACHE = 22; + const TYPE_GUESTBOOK = 23; + const TYPE_BITCACHE = 24; + const TYPE_BENCHMARK = 25; + const TYPE_CHALLENGE = 26; const STATUS_READY = 1; const STATUS_UNAVAILABLE = 2; @@ -47,16 +51,21 @@ class GeoCacheCommons extends BaseObject { const ICON_PATH = '/images/cache/'; //path to the dir with cache icons - const TYPE_TRADITIONAL_TR_KEY = 'cacheType_1'; - const TYPE_OTHERTYPE_TR_KEY = 'cacheType_5'; - const TYPE_MULTICACHE_TR_KEY = 'cacheType_2'; - const TYPE_VIRTUAL_TR_KEY = 'cacheType_8'; - const TYPE_WEBCAM_TR_KEY = 'cacheType_7'; + const TYPE_OTHERTYPE_TR_KEY = 'cacheType_1'; + const TYPE_TRADITIONAL_TR_KEY = 'cacheType_2'; + const TYPE_MULTICACHE_TR_KEY = 'cacheType_3'; + const TYPE_VIRTUAL_TR_KEY = 'cacheType_4'; + const TYPE_WEBCAM_TR_KEY = 'cacheType_5'; const TYPE_EVENT_TR_KEY = 'cacheType_6'; - const TYPE_QUIZ_TR_KEY = 'cacheType_3'; - const TYPE_MOVING_TR_KEY = 'cacheType_4'; - const TYPE_GEOPATHFINAL_TR_KEY = 'cacheType_9'; - const TYPE_OWNCACHE_TR_KEY = 'cacheType_10'; + const TYPE_QUIZ_TR_KEY = 'cacheType_7'; + const TYPE_MOVING_TR_KEY = 'cacheType_20'; + const TYPE_GEOPATHFINAL_TR_KEY = 'cacheType_21'; + const TYPE_OWNCACHE_TR_KEY = 'cacheType_22'; + + const TYPE_GUESTBOOK_TR_KEY = 'cacheType_23'; + const TYPE_BITCACHE_TR_KEY = 'cacheType_24'; + const TYPE_BENCHMARK_TR_KEY = 'cacheType_25'; + const TYPE_CHALLENGE_TR_KEY = 'cacheType_26'; const STATUS_READY_TR_KEY = 'cacheStatus_1'; const STATUS_UNAVAILABLE_TR_KEY = 'cacheStatus_2'; @@ -83,8 +92,8 @@ public static function CacheTypeTranslationKey($type) { switch ($type) { - case self::TYPE_TRADITIONAL: return self::TYPE_TRADITIONAL_TR_KEY; case self::TYPE_OTHERTYPE: return self::TYPE_OTHERTYPE_TR_KEY; + case self::TYPE_TRADITIONAL: return self::TYPE_TRADITIONAL_TR_KEY; case self::TYPE_MULTICACHE: return self::TYPE_MULTICACHE_TR_KEY; case self::TYPE_VIRTUAL: return self::TYPE_VIRTUAL_TR_KEY; case self::TYPE_WEBCAM: return self::TYPE_WEBCAM_TR_KEY; @@ -93,6 +102,10 @@ public static function CacheTypeTranslationKey($type) case self::TYPE_MOVING: return self::TYPE_MOVING_TR_KEY; case self::TYPE_GEOPATHFINAL: return self::TYPE_GEOPATHFINAL_TR_KEY; case self::TYPE_OWNCACHE: return self::TYPE_OWNCACHE_TR_KEY; + case self::TYPE_GUESTBOOK: return self::TYPE_GUESTBOOK_TR_KEY; + case self::TYPE_BITCACHE: return self::TYPE_BITCACHE_TR_KEY; + case self::TYPE_BENCHMARK: return self::TYPE_BENCHMARK_TR_KEY; + case self::TYPE_CHALLENGE: return self::TYPE_CHALLENGE_TR_KEY; } } @@ -177,6 +190,8 @@ public static function CacheStatusArray() public static function CacheTypeIdFromOkapi($okapiType) { switch ($okapiType) { + case 'Other': + return self::TYPE_OTHERTYPE; case 'Traditional': return self::TYPE_TRADITIONAL; case 'Multi': @@ -191,10 +206,18 @@ public static function CacheTypeIdFromOkapi($okapiType) return self::TYPE_QUIZ; case 'Moving': return self::TYPE_MOVING; + case 'GeoPath FINAL': + return self::TYPE_GEOPATHFINAL; case 'Own': return self::TYPE_OWNCACHE; - case 'Other': - return self::TYPE_OTHERTYPE; + case 'Guestbook': + return self::TYPE_GUESTBOOK; + case 'BIT Cache': + return self::TYPE_BITCACHE; + case 'Benchmark': + return self::TYPE_BENCHMARK; + case 'Challenge': + return self::TYPE_CHALLENGE; default: Debug::errorLog('Unknown cache type from OKAPI: ' . $okapiType); return self::TYPE_TRADITIONAL; @@ -340,6 +363,23 @@ public static function CacheIconByType( case self::TYPE_OWNCACHE: $typePart = 'owncache'; break; + + case self::TYPE_GUESTBOOK: + $typePart = 'guestbook'; + break; + + case self::TYPE_BITCACHE: + $typePart = 'bitcache'; + break; + + case self::TYPE_BENCHMARK: + $typePart = 'benchmark'; + break; + + case self::TYPE_CHALLENGE: + $typePart = 'challenge'; + break; + } if ($fileNameOnly) { diff --git a/src/Views/mainMap/mainMapFilters.tpl.php b/src/Views/mainMap/mainMapFilters.tpl.php index 46c80afc6d..29160d8363 100644 --- a/src/Views/mainMap/mainMapFilters.tpl.php +++ b/src/Views/mainMap/mainMapFilters.tpl.php @@ -30,6 +30,22 @@ alt=""> +
+ + +
+
+ + +
@@ -56,6 +72,14 @@ alt="">
+
+ + +
@@ -74,6 +98,14 @@ alt="">
+
+ + +