improved log removal
- notification email includes cache url - notification email includes deleted text - nicer template layout
This commit is contained in:
@ -2448,6 +2448,7 @@ INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2006', 'Deleted
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2007', 'User data', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2008', 'OKAPI Applications', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2009', 'OKAPI Apps', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2040', 'Deleted text:', '2013-04-25 23:00:00');
|
||||
|
||||
-- Table sys_trans_ref
|
||||
SET NAMES 'utf8';
|
||||
@ -6227,6 +6228,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 ('2007', 'DE', 'Benutzerdaten', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2008', 'DE', 'API-Anwendungen', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2009', 'DE', 'API-Anwendungen', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2040', 'DE', 'Gelöschter Text:', '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');
|
||||
|
@ -1,8 +1,11 @@
|
||||
Hallo %log_owner%,
|
||||
|
||||
%cache_owner% hat deinen Logeintrag für seinen Cache "%cache_name%" gelöscht.
|
||||
%cache_owner% hat deinen Logeintrag für seinen Cache "%cache_name%" gelöscht
|
||||
(http://opencaching.de/%cache_wp%).
|
||||
|
||||
%log_text%
|
||||
|
||||
%comment%
|
||||
|
||||
Weiterhin viel Spass beim Geocaching wünscht dir das Opencaching.de-Team
|
||||
http://www.opencaching.de
|
||||
Weiterhin viel Spass beim Geocaching wünscht dir das Opencaching.de-Team.
|
||||
http://www.opencaching.de
|
||||
|
@ -18,6 +18,8 @@
|
||||
$error_wrong_node = t('This log entry has been created on another Opencaching website. The cache can only be edited there.');
|
||||
|
||||
$removed_log_title = t('Info: Your log entry has been removed from the cache owner');
|
||||
$removed_message_titel = t('The owner of the has written you the following comment:') . "\n---";
|
||||
$removed_message_title = t('The owner of the has written you the following comment:') . "\n---";
|
||||
$removed_message_end = "---";
|
||||
$removed_text_title = t('Deleted text:') . "\n---";
|
||||
$removed_text_end = "---";
|
||||
?>
|
@ -20,7 +20,6 @@
|
||||
<input type="hidden" name="logid" value="{logid}"/>
|
||||
<table class="table">
|
||||
<tr><td class="header" colspan="2"><img src="lang/de/ocstyle/images/description/22x22-logs.png" border="0" width="32" height="32" alt="" title="" align="middle"> <b>{t}remove log entry for <a href="viewcache.php?cacheid={cacheid}">{cachename}</a>{/t}</b></td></tr>
|
||||
<tr><td class="spacer"></td></tr>
|
||||
|
||||
<tr><td colspan="2">{t}are you sure that this log entry shall be removed?{/t}</td></tr>
|
||||
<tr><td class="spacer"></td></tr>
|
||||
@ -28,22 +27,19 @@
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>
|
||||
{logimage} {date}{time} {typetext}
|
||||
<div class="textblock">
|
||||
<p>{logimage} {date}{time} {typetext}</p>
|
||||
<p>{logtext}</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="spacer"></td></tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
{logtext}
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="spacer"></td></tr>
|
||||
<tr><td class="spacer"> </td></tr>
|
||||
|
||||
<tr><td class="header-small" colspan="2">{t}do you want to send {log_user_name} a note?{/t}</td></tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<textarea class="logs" name="logowner_message"></textarea>
|
||||
<td> </td>
|
||||
<td>
|
||||
<textarea class="removelogs" name="logowner_message"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="spacer"></td></tr>
|
||||
|
@ -32,17 +32,13 @@
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>
|
||||
{logimage} {date}{time} {typetext}
|
||||
<div class="textblock">
|
||||
<p>{logimage} {date}{time} {typetext}</p>
|
||||
<p>{logtext}</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="spacer"></td></tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
{logtext}
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="spacer"></td></tr>
|
||||
<tr><td class="spacer"> </td></tr>
|
||||
|
||||
<tr>
|
||||
<td class="header-small" colspan="2">
|
||||
|
@ -20,6 +20,7 @@
|
||||
//prepare the templates and include all neccessary
|
||||
require_once('./lib/common.inc.php');
|
||||
require_once($stylepath . '/lib/icons.inc.php');
|
||||
require_once($rootpath . 'lib2/html2text.class.php');
|
||||
|
||||
//Preprocessing
|
||||
if ($error == false)
|
||||
@ -38,21 +39,24 @@
|
||||
tpl_set_var('username', '');
|
||||
tpl_set_var('target', htmlspecialchars('removelog.php?logid=' . urlencode($log_id), ENT_COMPAT, 'UTF-8'));
|
||||
tpl_set_var('message', $login_required);
|
||||
tpl_set_var('message_start', '');
|
||||
tpl_set_var('message_end', '');
|
||||
}
|
||||
else
|
||||
{
|
||||
$log_rs = sql("SELECT `cache_logs`.`node` AS `node`, `cache_logs`.`uuid` AS `uuid`, `cache_logs`.`cache_id` AS `cache_id`, `caches`.`user_id` AS `cache_owner_id`,
|
||||
`caches`.`name` AS `cache_name`, `cache_logs`.`text` AS `log_text`, `cache_logs`.`type` AS `log_type`,
|
||||
`caches`.`name` AS `cache_name`, `cache_logs`.`text` AS `log_text`, `cache_logs`.`text_html`, `cache_logs`.`type` AS `log_type`,
|
||||
`cache_logs`.`user_id` AS `log_user_id`, `cache_logs`.`date` AS `log_date`,
|
||||
`log_types`.`icon_small` AS `icon_small`,
|
||||
`user`.`username` as `log_username`,
|
||||
`caches`.`wp_oc`,
|
||||
`cache_status`.`allow_user_view`
|
||||
FROM `log_types`, `cache_logs`, `caches`, `user`, `cache_status`
|
||||
WHERE `cache_logs`.`id`='&1'
|
||||
AND `cache_logs`.`user_id`=`user`.`user_id`
|
||||
AND `caches`.`cache_id`=`cache_logs`.`cache_id`
|
||||
AND `caches`.`status`=`cache_status`.`id`
|
||||
AND `log_types`.`id`=`cache_logs`.`type`", $log_id, $locale);
|
||||
AND `log_types`.`id`=`cache_logs`.`type`", $log_id);
|
||||
|
||||
//log exists?
|
||||
if (mysql_num_rows($log_rs) == 1)
|
||||
@ -96,9 +100,19 @@
|
||||
if ($message != '')
|
||||
{
|
||||
//message to logowner
|
||||
$message = $removed_message_titel . "\n" . $message . "\n" . $removed_message_end;
|
||||
$message = $removed_message_title . "\n" . $message . "\n" . $removed_message_end;
|
||||
}
|
||||
|
||||
$logtext = $log_record['log_text'];
|
||||
if ($log_record['text_html'] != 0)
|
||||
{
|
||||
$logtext = html_entity_decode($logtext, ENT_COMPAT, 'UTF-8');
|
||||
$h2t = new html2text($logtext);
|
||||
$h2t->set_base_url($absolute_server_URI);
|
||||
$logtext = $h2t->get_text();
|
||||
}
|
||||
$logtext = $removed_text_title . "\n" . trim($logtext) . "\n" . $removed_text_end;
|
||||
|
||||
//get cache owner name
|
||||
$cache_owner_rs = sql("SELECT `username` FROM `user` WHERE `user_id`='&1'", $log_record['cache_owner_id']);
|
||||
$cache_owner_record = sql_fetch_array($cache_owner_rs);
|
||||
@ -109,9 +123,12 @@
|
||||
$log_user_record = sql_fetch_array($log_user_rs);
|
||||
mysql_free_result($log_user_rs);
|
||||
|
||||
// insert log data
|
||||
$email_content = mb_ereg_replace('%log_owner%', $log_user_record['username'], $email_content);
|
||||
$email_content = mb_ereg_replace('%cache_owner%', $cache_owner_record['username'], $email_content);
|
||||
$email_content = mb_ereg_replace('%cache_name%', $log_record['cache_name'], $email_content);
|
||||
$email_content = mb_ereg_replace('%cache_wp%', $log_record['wp_oc'], $email_content);
|
||||
$email_content = mb_ereg_replace('%log_text%', $logtext, $email_content);
|
||||
$email_content = mb_ereg_replace('%comment%', $message, $email_content);
|
||||
|
||||
//send email
|
||||
|
@ -699,6 +699,7 @@ input.formbutton_active {
|
||||
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.removelogs { width:620px; height:200px; } /* log removal */
|
||||
|
||||
.show_deleted { text-decoration: line-through; }
|
||||
|
||||
@ -1421,6 +1422,17 @@ div#havefound {
|
||||
color: #428d1d;
|
||||
}
|
||||
|
||||
.textblock {
|
||||
border: solid 2px #d6e4f0;
|
||||
border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
margin: 3px;
|
||||
padding: 6px 6px 6px 8px;
|
||||
min-width: 600px;
|
||||
}
|
||||
|
||||
|
||||
/* RSS feeds */
|
||||
#blog div.newsblock { margin-left:20px }
|
||||
#forum div.newsblock { margin-left:20px }
|
||||
|
Reference in New Issue
Block a user