Skip to content
Permalink
Browse files

added 'safari cache' attributed; fixed last attrib map filter

  • Loading branch information...
following authored and following5 committed May 4, 2013
1 parent 1613007 commit f4bcbe6dfc38760dfe526859a10b8e8466993694
@@ -99,8 +99,8 @@ INSERT INTO `cache_attrib` (`id`, `name`, `icon`, `trans_id`, `group_id`, `selec
INSERT INTO `cache_attrib` (`id`, `name`, `icon`, `trans_id`, `group_id`, `selectable`, `category`, `search_default`, `default`, `icon_large`, `icon_no`, `icon_undef`, `html_desc`, `html_desc_trans_id`, `hidden`, `gc_id`, `gc_inc`, `gc_name`) VALUES ('43', 'Breeding season / protected nature', 'naturschutz', '1583', '7', '1', '0', '1', '0', 'resource2/ocstyle/images/attributes/naturschutz.png', 'resource2/ocstyle/images/attributes/naturschutz-no.png', 'resource2/ocstyle/images/attributes/naturschutz-disabled.png', 'Don’t seek this cache during animal breeding season! Please indicate in the cache description which time of year must be avoided. Also, pay attention to the local terms and signs regarding nature protection.', '1610', '0', '143', '1', 'Breeding season / protected nature');
INSERT INTO `cache_attrib` (`id`, `name`, `icon`, `trans_id`, `group_id`, `selectable`, `category`, `search_default`, `default`, `icon_large`, `icon_no`, `icon_undef`, `html_desc`, `html_desc_trans_id`, `hidden`, `gc_id`, `gc_inc`, `gc_name`) VALUES ('44', 'Snow-proof hiding place', 'snow', '1584', '7', '1', '0', '1', '0', 'resource2/ocstyle/images/attributes/snow.png', 'resource2/ocstyle/images/attributes/snow-no.png', 'resource2/ocstyle/images/attributes/snow-disabled.png', 'This cache can be found even after heavy snowing. All stages and the geocache are hidden in a snow-safe way: they will not be covered by fallen snow an not by snow-piles created by snow-clearing vehicles.', '1611', '0', '15', '1', 'Available during winter');
INSERT INTO `cache_attrib` (`id`, `name`, `icon`, `trans_id`, `group_id`, `selectable`, `category`, `search_default`, `default`, `icon_large`, `icon_no`, `icon_undef`, `html_desc`, `html_desc_trans_id`, `hidden`, `gc_id`, `gc_inc`, `gc_name`) VALUES ('46', 'Special equipment', 'tools', '1585', '9', '1', '0', '0', '0', 'resource2/ocstyle/images/attributes/tools.png', 'resource2/ocstyle/images/attributes/tools-no.png', 'resource2/ocstyle/images/attributes/tools-disabled.png', 'You will need special equipment which is not specified by other attributes, e.g. a laser pointer, walkie-talkies or a car jack.', '1612', '0', '51', '1', 'Special tool required');
INSERT INTO `cache_attrib` (`id`, `name`, `icon`, `trans_id`, `group_id`, `selectable`, `category`, `search_default`, `default`, `icon_large`, `icon_no`, `icon_undef`, `html_desc`, `html_desc_trans_id`, `hidden`, `gc_id`, `gc_inc`, `gc_name`) VALUES ('47', 'Compass', 'compass', '1586', '9', '1', '0', '0', '0', 'resource2/ocstyle/images/attributes/compass.png', 'resource2/ocstyle/images/attributes/compass-no.png', 'resource2/ocstyle/images/attributes/compass-disabled.png', 'A compass is required.', '1613', '0', '147', '1', 'Compass');
INSERT INTO `cache_attrib` (`id`, `name`, `icon`, `trans_id`, `group_id`, `selectable`, `category`, `search_default`, `default`, `icon_large`, `icon_no`, `icon_undef`, `html_desc`, `html_desc_trans_id`, `hidden`, `gc_id`, `gc_inc`, `gc_name`) VALUES ('48', 'Flashlight', 'flashlight', '1587', '9', '1', '0', '0', '0', 'resource2/ocstyle/images/attributes/flashlight.png', 'resource2/ocstyle/images/attributes/flashlight-no.png', 'resource2/ocstyle/images/attributes/flashlight-disabled.png', 'A flashlight is required for finding this cache. Don’t forget spare batteries!', '1614', '0', '44', '1', 'Flashlight required');
INSERT INTO `cache_attrib` (`id`, `name`, `icon`, `trans_id`, `group_id`, `selectable`, `category`, `search_default`, `default`, `icon_large`, `icon_no`, `icon_undef`, `html_desc`, `html_desc_trans_id`, `hidden`, `gc_id`, `gc_inc`, `gc_name`) VALUES ('47', 'Compass', 'compass', '1586', '9', '1', '0', '1', '0', 'resource2/ocstyle/images/attributes/compass.png', 'resource2/ocstyle/images/attributes/compass-no.png', 'resource2/ocstyle/images/attributes/compass-disabled.png', 'A compass is required.', '1613', '0', '147', '1', 'Compass');
INSERT INTO `cache_attrib` (`id`, `name`, `icon`, `trans_id`, `group_id`, `selectable`, `category`, `search_default`, `default`, `icon_large`, `icon_no`, `icon_undef`, `html_desc`, `html_desc_trans_id`, `hidden`, `gc_id`, `gc_inc`, `gc_name`) VALUES ('48', 'Flashlight', 'flashlight', '1587', '9', '1', '0', '1', '0', 'resource2/ocstyle/images/attributes/flashlight.png', 'resource2/ocstyle/images/attributes/flashlight-no.png', 'resource2/ocstyle/images/attributes/flashlight-disabled.png', 'A flashlight is required for finding this cache. Don’t forget spare batteries!', '1614', '0', '44', '1', 'Flashlight required');
INSERT INTO `cache_attrib` (`id`, `name`, `icon`, `trans_id`, `group_id`, `selectable`, `category`, `search_default`, `default`, `icon_large`, `icon_no`, `icon_undef`, `html_desc`, `html_desc_trans_id`, `hidden`, `gc_id`, `gc_inc`, `gc_name`) VALUES ('49', 'Climbing gear', 'rappeling', '1588', '9', '1', '0', '1', '0', 'resource2/ocstyle/images/attributes/rappeling.png', 'resource2/ocstyle/images/attributes/rappeling-no.png', 'resource2/ocstyle/images/attributes/rappeling-disabled.png', 'For this cache, you will need climbing equipment and the knowledge how to use it properly. If you are a beginner, don’t do it alone but use the support of a experienced climber or mountaineer.', '1615', '0', '3', '1', 'Climbing gear');
INSERT INTO `cache_attrib` (`id`, `name`, `icon`, `trans_id`, `group_id`, `selectable`, `category`, `search_default`, `default`, `icon_large`, `icon_no`, `icon_undef`, `html_desc`, `html_desc_trans_id`, `hidden`, `gc_id`, `gc_inc`, `gc_name`) VALUES ('50', 'Cave equipment', 'cave', '1589', '9', '1', '0', '1', '0', 'resource2/ocstyle/images/attributes/cave.png', 'resource2/ocstyle/images/attributes/cave-no.png', 'resource2/ocstyle/images/attributes/cave-disabled.png', 'This geocache is hidden in a cave, and you should use appropriate equipment to access it. Beware: Even small caves may confront you with unforeseen problems and dangers, like thunder storms (water!) or a sprained ankle. Have advice first from cave-experienced people! Also take care of protected nature; e.g. bat places must not be disturbed.', '1616', '0', '150', '1', 'Cave equipment');
INSERT INTO `cache_attrib` (`id`, `name`, `icon`, `trans_id`, `group_id`, `selectable`, `category`, `search_default`, `default`, `icon_large`, `icon_no`, `icon_undef`, `html_desc`, `html_desc_trans_id`, `hidden`, `gc_id`, `gc_inc`, `gc_name`) VALUES ('51', 'Diving equipment', 'scuba', '1590', '9', '1', '0', '1', '0', 'resource2/ocstyle/images/attributes/scuba.png', 'resource2/ocstyle/images/attributes/scuba-no.png', 'resource2/ocstyle/images/attributes/scuba-disabled.png', 'You will need diving equipment to find this geocache. The water depth of the cache location is specified in the description. Please note that secure diving requires special training. Without diving experience, you may search this cache in company of a diving teacher.', '1617', '0', '5', '1', 'Scuba gear');
@@ -113,6 +113,7 @@ INSERT INTO `cache_attrib` (`id`, `name`, `icon`, `trans_id`, `group_id`, `selec
INSERT INTO `cache_attrib` (`id`, `name`, `icon`, `trans_id`, `group_id`, `selectable`, `category`, `search_default`, `default`, `icon_large`, `icon_no`, `icon_undef`, `html_desc`, `html_desc_trans_id`, `hidden`, `gc_id`, `gc_inc`, `gc_name`) VALUES ('58', 'Ask owner for start conditions', 'ask', '1597', '10', '1', '0', '0', '0', 'resource2/ocstyle/images/attributes/ask.png', 'resource2/ocstyle/images/attributes/ask-no.png', 'resource2/ocstyle/images/attributes/ask-disabled.png', 'Before doing this cache, you must ask the owner for the starting conditions. E.g. the cache may be linked to certain events at varying dates.', '1623', '0', '158', '1', 'Ask owner for start conditions');
INSERT INTO `cache_attrib` (`id`, `name`, `icon`, `trans_id`, `group_id`, `selectable`, `category`, `search_default`, `default`, `icon_large`, `icon_no`, `icon_undef`, `html_desc`, `html_desc_trans_id`, `hidden`, `gc_id`, `gc_inc`, `gc_name`) VALUES ('59', 'Suited for children', 'kids', '1598', '11', '1', '0', '1', '0', 'resource2/ocstyle/images/attributes/kids.png', 'resource2/ocstyle/images/attributes/kids-no.png', 'resource2/ocstyle/images/attributes/kids-disabled.png', 'This geocache is created for children. All challenges can be solved by child in the age of 10 to 12 years and the terrain has no risks (like highways, abysms). There is a large geocache container with trading items inside and the challenges are interesting.', '1624', '0', '6', '1', 'Recommended for kids');
INSERT INTO `cache_attrib` (`id`, `name`, `icon`, `trans_id`, `group_id`, `selectable`, `category`, `search_default`, `default`, `icon_large`, `icon_no`, `icon_undef`, `html_desc`, `html_desc_trans_id`, `hidden`, `gc_id`, `gc_inc`, `gc_name`) VALUES ('60', 'Only available during specified seasons', 'calendar', '1799', '7', '1', '0', '0', '0', 'resource2/ocstyle/images/attributes/calendar.png', 'resource2/ocstyle/images/attributes/calendar-no.png', 'resource2/ocstyle/images/attributes/calendar-disabled.png', 'This cache can be done at certain seasons only - see the cache description for more details. For example, the cache may be placed in a corn labyrinth, which only exists from bloom to harvest season.', '1800', '0', '62', '1', 'Seasonal access');
INSERT INTO `cache_attrib` (`id`, `name`, `icon`, `trans_id`, `group_id`, `selectable`, `category`, `search_default`, `default`, `icon_large`, `icon_no`, `icon_undef`, `html_desc`, `html_desc_trans_id`, `hidden`, `gc_id`, `gc_inc`, `gc_name`) VALUES ('61', 'Safari Cache', 'safari', '2015', '4', '1', '0', '1', '0', 'resource2/ocstyle/images/attributes/safari.png', 'resource2/ocstyle/images/attributes/safari-no.png', 'resource2/ocstyle/images/attributes/safari-disabled.png', 'This geocache can be found at different places. The places to look for are explained in the cache description. They must be located \"away from home\" and exist for a considerable period of time, so that they can be re-visited later. There is no container and no logbook; instead the find must be documented by a photo and noting the coordinates.', '2016', '0', '161', '1', 'Safari Cache');

-- Table cache_report_reasons
SET NAMES 'utf8';
@@ -2453,6 +2454,9 @@ INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2011', 'without
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2012', 'with 5 logs', '2013-04-25 23:00:00');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2013', 'with 10 logs', '2013-04-25 23:00:00');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2014', 'with all logs', '2013-04-25 23:00:00');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2015', 'Safari Cache', '2013-04-25 23:00:00');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2016', 'This geocache can be found at different places. The places to look for are explained in the cache description. They must be located \"away from home\" and exist for a considerable period of time, so that they can be re-visited later. There is no container and no logbook; instead the find must be documented by a photo and noting the coordinates.', '2013-04-25 23:00:00');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2017', 'Only virtual caches can be safari caches.', '2013-04-25 23:00:00');

-- Table sys_trans_ref
SET NAMES 'utf8';
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2012', 'DE', 'mit 5 Logs', '2013-04-25 23:00:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2013', 'DE', 'mit 10 Logs', '2013-04-25 23:00:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2014', 'DE', 'mit allen Logs', '2013-04-25 23:00:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2015', 'DE', 'Safari-Cache', '2013-04-25 23:00:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2016', 'DE', 'Dieser Geocache kann an verschiedenen Orten gefunden werden. Die gesuchten Orte sind in der Cachebeschreibung erläutert. Sie müssen sich „außer Haus“ befinden und über längere Zeit Bestand haben, sodass man sie nach einiger Zeit wieder besuchen kann. Es gibt keinen Behälter und kein Logbuch, sondern der Fund ist mit einem Foto und den Koordinaten des Ortes zu dokumentieren.', '2013-04-25 23:00:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2017', 'DE', 'Das Safari-Attribut kann nur bei virtuellen Caches gesetzt werden.', '2013-04-25 23: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');
@@ -391,6 +391,7 @@ function getWaypoints($cacheid)
}
// cache-attributes
$attribs_not_ok = false;
if (isset($_POST['cache_attribs']))
{
$cache_attribs = mb_split(';', $_POST['cache_attribs']);
@@ -415,11 +416,20 @@ function getWaypoints($cacheid)
sql_free_result($rs);
}
if (in_array(ATTRIB_ID_SAFARI,$cache_attribs) && $cache_type != 4)
{
tpl_set_var('safari_message', $safari_not_allowed_message);
$error = true;
$attribs_not_ok = true;
}
else
tpl_set_var('safari_message', '');
//try to save to DB?
if (isset($_POST['submit'])) // Ocprop
{
//all validations ok?
if (!($hidden_date_not_ok || $lat_not_ok || $lon_not_ok || $name_not_ok || $time_not_ok || $way_length_not_ok || $size_not_ok || $activate_date_not_ok || $status_not_ok || $diff_not_ok))
if (!($hidden_date_not_ok || $lat_not_ok || $lon_not_ok || $name_not_ok || $time_not_ok || $way_length_not_ok || $size_not_ok || $activate_date_not_ok || $status_not_ok || $diff_not_ok || $attribs_not_ok))
{
$cache_lat = $coords_lat_h + $coords_lat_min / 60;
if ($coords_latNS == 'S') $cache_lat = -$cache_lat;
@@ -31,6 +31,7 @@
$sizemismatch_message = '&nbsp;<span class="errormsg">' . t('For virtual and webcam caches, the cache size has to be -no container-!') . '</span>';
$status_message = '&nbsp;<span class="errormsg">' . t('The cache-status does not fit to your publishing options') . '</span>';
$diff_not_ok_message = '&nbsp;<span class="errormsg">' . t('Choose both valuations!') . '</span>';
$safari_not_allowed_message = '<span class="errormsg">' . t('Only virtual caches can be safari caches.') . '</span>';
$nopictures = '<tr><td colspan="2">' . t('No pictures available') . '</td></tr>';
$pictureline = '<tr><td colspan="2"><a href="{link}">{title}</a> [<a href="picture.php?action=edit&uuid={uuid}">' . t('Edit') . '</a>] [<a href="picture.php?action=delete&uuid={uuid}">' . t('Delete') . '</a>]</td></tr>';
// Ocprop: <a href=\"http://.*?\.opencaching\.de/images/uploads/.*?\">(.*?)<\/a>.*?\[<a href=\"picture\.php\?action=[a-z]*?\&uuid=(.*?)\">
@@ -250,7 +250,7 @@ function toggleAttr(id)
</tr>
<tr><td class="spacer" colspan="2"></td></tr>
<tr>
<td colspan="2">{cache_attrib_list}</td>
<td colspan="2">{cache_attrib_list}{safari_message}</td>
</tr>
<tr><td class="spacer" colspan="2">&nbsp;</td></tr>

@@ -34,6 +34,7 @@
$size_not_ok_message = '&nbsp;<span class="errormsg">' . t('No cache-size is chosen.') . '</span>';
$diff_not_ok_message = '&nbsp;<span class="errormsg">' . t('Choose both valuations!') . '</span>';
$sizemismatch_message = '&nbsp;<span class="errormsg">' . t('For virtual and webcam caches, the cache size has to be -no container-!') . '</span>';
$safari_not_allowed_message = '<span class="errormsg">' . t('Only virtual caches can be safari caches.') . '</span>';
$cache_submitted = t('Your cache is successfully added to the database. You will be redirected to the cache page, now.');
@@ -244,7 +244,7 @@ function toggleAttr(id)
</td>
</tr>
<tr>
<td colspan="2">{cache_attrib_list}</td>
<td colspan="2">{cache_attrib_list}{safari_message}</td>
</tr>
<tr><td class="spacer" colspan="2">&nbsp;</td></tr>
<tr>
@@ -49,7 +49,7 @@ static function getAttrbutesListArrayInternal($cacheId, $bOnlySelectable, $first
{
$sAddWhereSql = '';
if ($bOnlySelectable == true)
$sAddWhereSql = ' AND `cache_attrib`.`selectable`=1';
$sAddWhereSql .= ' AND `cache_attrib`.`selectable`=1';
$rsAttr = sql("SELECT `cache_attrib`.`id`, IFNULL(`tt1`.`text`, `cache_attrib`.`name`) AS `name`,
IFNULL(`tt2`.`text`, `cache_attrib`.`html_desc`) AS `html_desc`,
@@ -40,6 +40,8 @@
define('ATTRIB_UNSELECTED', 2);
define('ATTRIB_UNDEF', 3);
define('ATTRIB_ID_SAFARI', 61);
define('OBJECT_CACHELOG', 1);
define('OBJECT_CACHE', 2);
define('OBJECT_CACHEDESC', 3);
@@ -60,6 +60,7 @@
tpl_set_var('size_message', '');
tpl_set_var('type_message', '');
tpl_set_var('diff_message', '');
tpl_set_var('safari_message', '');
$sel_type = isset($_POST['type']) ? $_POST['type'] : 0; // Ocprop
if (!isset($_POST['size']))
@@ -768,8 +769,19 @@
$diff_not_ok = true;
}
// attributes
$attribs_not_ok = false;
if (in_array(ATTRIB_ID_SAFARI,$cache_attribs) && $sel_type != 4)
{
tpl_set_var('safari_message', $safari_not_allowed_message);
$error = true;
$attribs_not_ok = true;
}
else
tpl_set_var('safari_message', '');
//no errors?
if (!($tos_not_ok || $name_not_ok || $hidden_date_not_ok || $activation_date_not_ok || $lon_not_ok || $lat_not_ok || $time_not_ok || $way_length_not_ok || $size_not_ok || $type_not_ok || $diff_not_ok))
if (!($tos_not_ok || $name_not_ok || $hidden_date_not_ok || $activation_date_not_ok || $lon_not_ok || $lat_not_ok || $time_not_ok || $way_length_not_ok || $size_not_ok || $type_not_ok || $diff_not_ok || $attribs_not_ok))
{
//sel_status
$now = getdate();
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1977,7 +1977,7 @@ function get_attrib_filter_params(no)
var state = (no ? '2' : '1');
var sAttribs = '';
for (var nCacheAttribId=1; nCacheAttribId<nMaxAttributeId; nCacheAttribId++)
for (var nCacheAttribId=1; nCacheAttribId<=nMaxAttributeId; nCacheAttribId++)
if (document.getElementById('attribute' + nCacheAttribId))
if (document.getElementById('imgattribute' + nCacheAttribId).style.display != 'none')
if (document.getElementById('attribute' + nCacheAttribId).value == state)

0 comments on commit f4bcbe6

Please sign in to comment.
You can’t perform that action at this time.