merged branch 334-gc-waypoints

This commit is contained in:
following 2015-05-28 01:05:23 +02:00
commit 84e027369e
9 changed files with 30 additions and 4 deletions

View File

@ -2602,6 +2602,7 @@ INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2174', 'Newslet
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2175', 'Disclose my e-mail address by default when sending e-mails to other users.', '2015-05-25 19:50:00');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2176', 'Planned events', '2013-11-03 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2177', 'Another cache (<a href=\"viewcache.php?wp=%1\">%1</a>) exists at these coords. Maybe you pressed \"submit cache\" twice. To publish a cache with identical coords, enter other coords first, then edit the listing and change coords.', '2013-11-03 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2178', 'GC waypoint is invalid, must be GCXXX...', '2013-11-03 10:09:14');
-- Table sys_trans_ref
SET NAMES 'utf8';
@ -6693,6 +6694,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 ('2175', 'DE', 'Wenn ich andere Benutzer anschreibe, wird standardmäßig meine E-Mail-Adresse mitgeschickt.', '2015-05-25 19:50:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2176', 'DE', 'Geplante Events', '2013-11-03 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2177', 'DE', 'An diesen Koordinaten befindet sich bereits der Cache <a href=\"viewcache.php?wp=%1\">%1</a>. Vielleicht hast du mehrfach auf \"Cache senden\" geklickt. Wenn du tatsächlich einen weiteren Cache mit identischen Koordinaten veröffentlichen möchtest, lege ihn zunächst mit abweichenden Koordinaten an, bearbeite dann das Listing und ändere die Koordinaten.', '2013-11-03 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2178', 'DE', 'ungültiger GC-Wegpunkt, Format ist GCXXX...', '2013-11-03 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1', 'EN', 'Reorder IDs', '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');

View File

@ -337,6 +337,12 @@ function getWaypoints($cacheid)
$error = true;
}
//check GC waypoint
$wpgc_not_ok = $wp_gc != "" && !preg_match("/^(?:GC|CX)[0-9A-Z]{3,6}$/", $wp_gc);
if ($wpgc_not_ok)
{
$error = true;
}
//check hidden_since
$hidden_date_not_ok = true;
@ -428,7 +434,7 @@ function getWaypoints($cacheid)
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 || $attribs_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 || $wpgc_not_ok))
{
$cache_lat = $coords_lat_h + $coords_lat_min / 60;
if ($coords_latNS == 'S') $cache_lat = -$cache_lat;
@ -892,6 +898,7 @@ function getWaypoints($cacheid)
tpl_set_var('lat_message', ($lat_not_ok == true) ? $coords_message : '');
tpl_set_var('date_message', ($hidden_date_not_ok == true) ? $date_message : '');
tpl_set_var('size_message', ($size_not_ok == true) ? $sizemismatch_message : '');
tpl_set_var('wpgc_message', ($wpgc_not_ok == true) ? $bad_wpgc_message : '');
if($lon_not_ok || $lat_not_ok || $hidden_date_not_ok || $name_not_ok)
tpl_set_var('general_message', $error_general);

View File

@ -33,6 +33,7 @@
$status_change = '<br /><div style="margin-top:6px"><img src="lang/de/ocstyle/images/misc/hint.gif" border="0" width="15" height="11" >' . t('To change the state, you need to <a href="log.php?cacheid=%1">log</a> the new state.') . '</div>';
$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>';
$bad_wpgc_message = '<span class="errormsg">' . t('GC waypoint is invalid, must be GCXXX...') . '</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=(.*?)\">

View File

@ -224,7 +224,8 @@ function toggleAttr(id)
<tr>
<td>{t}Waypoints (optional):{/t}</td>
<!-- allow wp_gc copy&paste with leading spaces; will be trimmed later -->
<td>geocaching.com: <input type="text" name="wp_gc" value="{wp_gc}" maxlength="12" class="input50" />
<td>geocaching.com: <input type="text" name="wp_gc" value="{wp_gc}" maxlength="12" class="input70" />
{wpgc_message}
navicache.com: <input type="text" name="wp_nc" value="{wp_nc}" maxlength="6" class="input50" />
</td>
</tr>

View File

@ -36,6 +36,7 @@
$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>';
$bad_wpgc_message = '<span class="errormsg">' . t('GC waypoint is invalid, must be GCXXX...') . '</span>';
$cache_submitted = t('Your cache is successfully added to the database. You will be redirected to the cache page, now.');

View File

@ -221,7 +221,8 @@ function toggleAttr(id)
<tr>
<td>{t}Waypoints:{/t}</td>
<!-- allow wp_gc copy&paste with leading spaces; will be trimmed later -->
<td>geocaching.com: <input type="text" name="wp_gc" value="{wp_gc}" maxlength="12" class="input50" />
<td>geocaching.com: <input type="text" name="wp_gc" value="{wp_gc}" maxlength="12" class="input70" />
{wpgc_message}
navicache.com: <input type="text" name="wp_nc" value="{wp_nc}" maxlength="6" class="input50" />
</td>
</tr>

View File

@ -58,6 +58,7 @@
tpl_set_var('desc_message', '');
tpl_set_var('effort_message', '');
tpl_set_var('size_message', '');
tpl_set_var('wpgc_message', '');
tpl_set_var('type_message', '');
tpl_set_var('diff_message', '');
tpl_set_var('safari_message', '');
@ -697,6 +698,14 @@
$error = true;
}
//check GC waypoint
$wpgc_not_ok = $wp_gc != "" && !preg_match("/^(?:GC|CX)[0-9A-Z]{3,6}$/", $wp_gc);
if ($wpgc_not_ok)
{
tpl_set_var('wpgc_message', $bad_wpgc_message);
$error = true;
}
//check date_activate
$activation_date_not_ok = true;
if (is_numeric($activate_day) && is_numeric($activate_month) && is_numeric($activate_year) && is_numeric($activate_hour))
@ -796,7 +805,7 @@
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 || $attribs_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 || $wpgc_not_ok))
{
//sel_status
$now = getdate();

View File

@ -141,6 +141,8 @@
erl&auml;utere den Aufwand in der Cachebeschreibung. Wenn du bei der
Sch&auml;tzung davon ausgehst, dass eine Teilstrecke mit Inline-Skates, dem Fahrrad oder dem Auto zur&uuml;ckgelegt wird, weise ebenfalls in der Beschreibung darauf hin.</p>
<p><b>Wegpunkte:</b> Falls du den Cache auch auf anderen Geocaching-Plattformen veröffentlicht hast, kannst du hier die entsprechenden Wegpunkte angeben. geocaching.com-Wegpunkte haben das Format GCXXXXX, wobei XXXXX für bis zu fünf Großbuchstaben und/oder Ziffern steht. Navicache-Wegpunkte haben das Format NXXXX.</p>
<p>
<b>Cacheattribute:</b> Mit den Cacheattributen kannst du genauere Angaben zu deinem Cache machen, die z.B. bei der <a href="search.php">Suche</a> als Kriterium angegeben werden k&ouml;nnen.
Viele Attribute sind dabei Erfahrungswerte (z.B. Zeckengefahr). Als Finder eines Geocaches kannst du gerne den Owner darauf hinweisen, dass er dem Geocache die entsprechenden Attribute zuordnen kann.

View File

@ -135,6 +135,8 @@
<p><a name="time"></a><b>Effort:</b> How much time and way is to be expected, beginning at the starting point or parking lot, to find the cache and return to the starting point? Please assume that the geocacher is experienced, but will struggle to solve the one or other puzzle or quest. If you cannot pin down the time needed, keep the default of 0&nbsp;h / 0&nbsp;min and describe the effort. If you estimated the time assuming use of inline skates, a bicycle or car, please mention it in the cache description.</p>
<p><b>Waypoints:</b> If you published this cache also at other geocaching websites, you are encouraged to enter the corresponding waypoints here. geocaching.com waypoints have the format GCXXXXX, with XXXXX being up to 5 capital letters and/or digits. Navicache waypoints have the format NXXXX.</p>
<p><b>Cache attributes:</b> Use the attributes to specify properties of your cache, which may be selected by the <a href="search.php">search function</a>. Attributes may be estimated and depend on your knowledge of the site (e.g. frequent occurance of ticks). As searcher and finder of a cache, you may tell the owner about the usage and helpfullness of attributes or make suggestions. When describing your caches, please assume normal, dry weather conditions.</p>
<p><a href="#attributedesc">See below</a> for a complete explanation of cache attributes.</p>