Skip to content
Permalink
Browse files

more info for cache reporters; udpdates #903

  • Loading branch information...
following5 committed Feb 5, 2016
1 parent 1b7d2cc commit 2de42e764829a9874140a9a02e7d539bfe9fa6b7
@@ -381,6 +381,12 @@
*/
$opt['logic']['api']['email_problems']['key'] = ''; // must be set to enable
/* cache report info settings
*/
$opt['logic']['cache_reports']['delaydays'] = 2;
$opt['logic']['cache_reports']['min_processperday'] = 5; // set to 0 to disable
$opt['logic']['cache_reports']['max_processperday'] = 20; // set to 0 to disable
/* cronjob
*/
$opt['cron']['username'] = 'apache'; // system username for cronjobs
@@ -564,6 +564,7 @@ INSERT INTO `helppages` (`ocpage`, `language`, `helppage`) VALUES ('register', '
INSERT INTO `helppages` (`ocpage`, `language`, `helppage`) VALUES ('removelog_logowner', 'DE', 'Logeintrag löschen');
INSERT INTO `helppages` (`ocpage`, `language`, `helppage`) VALUES ('removelog_cacheowner', 'DE', 'Logeintrag löschen');
INSERT INTO `helppages` (`ocpage`, `language`, `helppage`) VALUES ('reportcache', 'DE', 'Cache melden');
INSERT INTO `helppages` (`ocpage`, `language`, `helppage`) VALUES ('report_reasons', 'DE', 'Cache melden#Wann melden?');
INSERT INTO `helppages` (`ocpage`, `language`, `helppage`) VALUES ('search', 'DE', 'Suchformular');
INSERT INTO `helppages` (`ocpage`, `language`, `helppage`) VALUES ('tops', 'DE', 'Empfehlungen');
INSERT INTO `helppages` (`ocpage`, `language`, `helppage`) VALUES ('tops', 'EN', 'Recommendations');
@@ -2815,6 +2816,9 @@ INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2529', 'recomme
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2530', 'Current new entries', '2015-01-20 20:37:00');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2531', 'All new entries', '2015-01-20 20:37:00');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2532', '... by log date', '2015-01-20 20:37:00');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2533', 'Good and inappropriate reasons to report a cache', '2015-01-20 20:37:00');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2534', '%1 reports are being processed, %2 reports are pending', '2015-01-20 20:37:00');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2535', 'estimated queuing time for new reports: about %1 to %2 days', '2015-01-20 20:37:00');

-- Table sys_trans_ref
SET NAMES 'utf8';
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('762', 'DE', 'Es sind nur die Bildformate %1 erlaubt; für Fotos wird JPEG empfohlen.', '2010-08-28 11:48:06');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('763', 'DE', 'Außerdem ist eine maximale Dateigröße von %1 KB zu beachten. Als Bildgröße sind 640 Pixel Breite und 480 Pixel Höhe empfohlen.', '2010-08-28 11:48:06');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('764', 'DE', 'Meldebericht für %1 eingetragen', '2010-08-28 11:48:06');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('765', 'DE', 'Ursache:', '2010-08-28 11:48:06');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('765', 'DE', 'Grund:', '2010-08-28 11:48:06');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('766', 'DE', 'Kommentar:', '2010-08-28 11:48:06');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('767', 'DE', '%1 melden', '2010-08-28 11:48:06');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('768', 'DE', 'Es muss eine Ursache angegeben werden!', '2010-08-28 11:48:06');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('768', 'DE', 'Es muss ein Grund angegeben werden!', '2010-08-28 11:48:06');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('769', 'DE', 'Kommentar: (muss eingetragen werden)', '2010-08-28 11:48:06');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('770', 'DE', 'Es muss ein Kommentar eingetragen werden, um einen Geocache zu melden.', '2010-08-28 11:48:06');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('771', 'DE', 'Ein Fehler ist aufgetreten und der Meldebericht konnte nicht erstellt werden.', '2010-08-28 11:48:06');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2530', 'DE', 'Aktuelle Neueinträge', '2015-01-20 20:37:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2531', 'DE', 'Alle Neueinträge', '2015-01-20 20:37:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2532', 'DE', '... nach Logdatum', '2015-01-20 20:37:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2533', 'DE', 'Gute und unpassende Gründe für eine Cachemeldung', '2015-01-20 20:37:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2534', 'DE', '%1 Meldungen sind in Bearbeitung, %2 Meldungen sind offen', '2015-01-20 20:37:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2535', 'DE', 'geschätzte Wartezeit für neue Meldungen: ca. %1–%2 Tage', '2015-01-20 20:37:00');
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');
@@ -74,7 +74,7 @@ function helppageurl($ocpage)
if (substr($helppage,0,1) == "!")
substr($helppage,1);
else if ($helppage != "" && isset($opt['locale'][$help_locale]['helpwiki']))
return $opt['locale'][$help_locale]['helpwiki'] . str_replace(' ','_',$helppage);
return $opt['locale'][$help_locale]['helpwiki'] . urlencode(str_replace(' ','_',$helppage));
else
return "";
}
@@ -74,9 +74,24 @@
$tpl->assign('reason', $reportreason);
$tpl->assign('note', $reportnote);
$tpl->assign('cacheid', $cacheid);
$tpl->assign('cachename', $cache->getName());
$tpl->assign('help_reportreasons', helppagelink('report_reasons'));
$open_reports = sql_value("SELECT COUNT(*) FROM `cache_reports` WHERE `status`=1", 0);
$processing_reports = sql_value("SELECT COUNT(*) FROM `cache_reports` WHERE `status`=2 AND DATEDIFF(NOW(),`lastmodified`) <= 180", 0);
$tpl->assign('open_reports', $open_reports);
$tpl->assign('processing_reports', $processing_reports);
if ($opt['logic']['cache_reports']['min_processperday'] > 0)
{
$waitdays_min = 1 + floor(($open_reports + $opt['logic']['cache_reports']['max_processperday'] - 1) / $opt['logic']['cache_reports']['max_processperday']);
$waitdays_max = 1 + $opt['logic']['cache_reports']['delaydays'] + floor(($open_reports + $opt['logic']['cache_reports']['min_processperday'] - 1) / $opt['logic']['cache_reports']['min_processperday']);
$tpl->assign('waitdays_min', $waitdays_min);
$tpl->assign('waitdays_max', $waitdays_max);
}
else
$tpl->assign('waitdays_min', false);
$tpl->display();
?>
@@ -660,6 +660,7 @@ textarea { font-family: Arial, sans-serif, Tahoma, Verdana; font-size: 8pt; }
textarea.cachedesc { width:750px; height:500px; } /* only cacheeditor */
textarea.hint { width:750px; height:100px; } /* only cacheditor */
textarea.logs { width:640px; height:300px; } /* only logeditor */
textarea.reports { width:640px; height:250px; } /* only logeditor */
textarea.listdesc2 { width:580px; height:120px; } /* only list desc editor */
textarea.listdesc3 { width:580px; height:220px; } /* only list desc editor */
textarea.userdesc { width:750px; height:400px; } /* only user desc editor */
@@ -47,9 +47,27 @@
in a way, that requires immediate action of an Opencaching administrator.{/t}
</td>
</tr>
{if $help_reportreasons}
<tr>
<td colspan="2" class="info">
<img src="resource2/{$opt.template.style}/images/viewcache/16x16-info.png" class="icon16" alt="Info" />
{$help_reportreasons}{t}Good and inappropriate reasons to report a cache{/t}</a>
</tr>
{/if}
<tr>
<td class="spacer" colspan="2"></td>
</tr>
<tr>
<td colspan="2" class="info">
{t 1=$processing_reports 2=$open_reports}%1 reports are being processed, %2 reports are pending{/t}{if $waitdays_min};
<br />
{t 1=$waitdays_min 2=$waitdays_max}estimated queuing time for new reports: about %1 to %2 days{/t}
{/if}
</td>
</tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
<td colspan="2">{t}Reason:{/t}
<td colspan="2">{t}Reason:{/t}&nbsp;
<select name="reason">
<option value="0" {if $reason==0}selected="selected"{/if}>{t}-- Please select --{/t}</option>
{foreach from=$reasons item=reasonItem}
@@ -71,7 +89,7 @@
</tr>
<tr>
<td colspan="2">
<textarea class="logs" name="note" cols="68" rows="15">{$note|escape}</textarea>
<textarea class="reports" name="note" cols="68" rows="15">{$note|escape}</textarea>
</td>
</tr>
<tr><td class="spacer" colspan="2"></td></tr>

0 comments on commit 2de42e7

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