Skip to content
Permalink
Browse files

added rating star to log lists; (re-)added missing newlog/editlog tra…

…nslations
  • Loading branch information...
following5 committed Jul 21, 2013
1 parent 882f8c2 commit 1680a5237b9206b51d3eb50039be7b86e1971277

Large diffs are not rendered by default.

Oops, something went wrong.
BIN +397 Bytes (180%) htdocs/images/rating-plus.gif
Binary file not shown.
BIN +400 Bytes (170%) htdocs/images/rating-star.gif
Binary file not shown.
@@ -22,7 +22,7 @@
$date_message = '<span class="errormsg">' . t('date or time is invalid') . '</span>';
$smiley_link = '<a href="javascript:insertSmiley(\'{smiley_text}\')">{smiley_image}</a>';
$log_pw_field = '<tr><td colspan="2">' . t('passwort to log:') . ' <input class="input100" type="text" name="log_pw" maxlength="20" value="" /> ' . t('(only for found logs)') . '</td></tr>
$log_pw_field = '<tr><td colspan="2">' . t('passwort to log:') . ' <input class="input100" type="text" name="log_pw" maxlength="20" value="" /> (' . t('only for found logs') . ')</td></tr>
<tr><td class="spacer" colspan="2"></td></tr>';
$log_pw_field_pw_not_ok = '<tr><td colspan="2">' . t('passwort to log:') . ' <input type="text" name="log_pw" maxlength="20" size="20" value=""/><span class="errormsg"> ' . t('Invalid password!') . '</span></td></tr><tr><td class="spacer" colspan="2"></td></tr>';
@@ -22,7 +22,7 @@
// Ocprop: <td colspan=\"2\">\s*Kennwort zum Loggen:\s*<input
$event_log_pw_field = '<tr><td colspan="2">' . t('passwort to log:') . ' <input class="input100" type="text" name="log_pw" maxlength="20" value="" /> (' . t('only for attended-logs') . ')</td></tr><tr><td class="spacer" colspan="2"></td></tr>';
$other_log_pw_field = '<tr><td colspan="2">' . t('passwort to log:') . ' <input class="input100" type="text" name="log_pw" maxlength="20" value="" /> ' . t('(only for found-logs)') . '</td></tr><tr><td class="spacer" colspan="2"></td></tr>';
$other_log_pw_field = '<tr><td colspan="2">' . t('passwort to log:') . ' <input class="input100" type="text" name="log_pw" maxlength="20" value="" /> (' . t('only for found logs') . ')</td></tr><tr><td class="spacer" colspan="2"></td></tr>';
$log_pw_field_pw_not_ok = '<tr><td colspan="2">' . t('passwort to log:') . ' <input type="text" name="log_pw" maxlength="20" size="20" value=""/><span class="errormsg"> ' . t('Invalid password!') . '</span></td></tr><tr><td class="spacer" colspan="2"></td></tr>';
$teamcomment_field = '&nbsp; <input type="checkbox" name="teamcomment" value="1" class="checkbox" {chk_sel} id="teamcomment" /> <label for="teamcomment"><span class="{textclass}">' . t('OC team comment') . '</span></label>';
@@ -29,13 +29,16 @@
//get last logs
$tpl->assign_rs('logs', sql("SELECT `cache_logs`.`cache_id` `cacheid`, `cache_logs`.`type` `type`, `cache_logs`.`date` `date`, `caches`.`name` `name`,
`user`.`user_id` AS `userid`, `user`.`username`, `caches`.`wp_oc`, `ca`.`attrib_id` IS NOT NULL AS `oconly`
`user`.`user_id` AS `userid`, `user`.`username`, `caches`.`wp_oc`, `ca`.`attrib_id` IS NOT NULL AS `oconly`,
`cache_rating`.`rating_date` IS NOT NULL AS `recommended`
FROM `cache_logs`
INNER JOIN `caches` ON `cache_logs`.`cache_id`=`caches`.`cache_id`
INNER JOIN `user` ON `caches`.`user_id`=`user`.`user_id`
LEFT JOIN `caches_attributes` `ca` ON `ca`.`cache_id`=`caches`.`cache_id` AND `ca`.`attrib_id`=6
LEFT JOIN `cache_rating` ON `cache_rating`.`cache_id`=`caches`.`cache_id` AND `cache_rating`.`user_id`=`cache_logs`.`user_id` AND `cache_rating`.`rating_date`=`cache_logs`.`date`
WHERE `cache_logs`.`user_id`='&1'
ORDER BY `cache_logs`.`date` DESC, `cache_logs`.`date_created` DESC LIMIT 10", $login->userid));
ORDER BY `cache_logs`.`date` DESC, `cache_logs`.`date_created` DESC
LIMIT 10", $login->userid));
//get last hidden caches
$tpl->assign_rs('caches', sql("SELECT `caches`.`cache_id`, `caches`.`name`, `caches`.`type`,
@@ -44,7 +44,7 @@
INNER JOIN `caches` ON `cache_rating`.`cache_id`=`caches`.`cache_id`
LEFT JOIN `caches_attributes` `ca` ON `ca`.`cache_id`=`caches`.`cache_id` AND `ca`.`attrib_id`=6
WHERE `cache_rating`.`user_id`='&1'
ORDER BY `caches`.`name` ASC", $login->userid);
ORDER BY `rating_date` DESC", $login->userid);
$tpl->assign_rs('ratings', $rs);
sql_free_result($rs);
@@ -13,7 +13,7 @@
$exclude_country = 'DE';
// As nearly all logs are from Germany, retrieving non-German logs is
// expensive -> longer cache lifetime and smaller count:
// expensive -> longer cache lifetime.
$tpl->cache_lifetime = 900;
$logcount = 250;
}
@@ -62,6 +62,7 @@
`cacheloguser`.`user_id`,
`cacheloguser`.`username`,
`cache_logs`.`cache_id`,
`cache_rating`.`rating_date` IS NOT NULL AS `recommended`,
'' AS `pic_uuid`,
0 AS `picshown`,
(SELECT COUNT(*) FROM `pictures` WHERE `object_type`=1 AND `object_id`=`cache_logs`.`id`) AS `pics`
@@ -72,6 +73,7 @@
INNER JOIN `countries` ON `caches`.`country`=`countries`.`short`
LEFT JOIN `sys_trans_text` ON `countries`.`trans_id`=`sys_trans_text`.`trans_id` AND `sys_trans_text`.`lang`='&1'
LEFT JOIN `cache_logs_restored` ON `cache_logs_restored`.`id`=`cache_logs`.`id`
LEFT JOIN `cache_rating` ON `cache_rating`.`cache_id`=`caches`.`cache_id` AND `cache_rating`.`user_id`=`cache_logs`.`user_id` AND `cache_rating`.`rating_date`=`cache_logs`.`date`
WHERE IFNULL(`cache_logs_restored`.`restored_by`,0)=0
ORDER BY " . $sqlOrderBy . "`cache_logs`.`date_created` DESC",
$opt['template']['locale']);
@@ -177,7 +177,7 @@ function _chkFound () {
{if $logpw}
<tr>
<td colspan="2">{t}passwort to log:{/t}
<input class="input100" type="text" name="log_pw" maxlength="20" value="" /> {if $validate.pwOk==false}<span class="errormsg">{t}Invalid password!{/t}</span>{else}({if $cachetype==6}{t}only for attended-logs{/t}{else}{t}only for found-logs{/t}{/if}){/if}
<input class="input100" type="text" name="log_pw" maxlength="20" value="" /> {if $validate.pwOk==false}<span class="errormsg">{t}Invalid password!{/t}</span>{else}({if $cachetype==6}{t}only for attended-logs{/t}{else}{t}only for found logs{/t}{/if}){/if}
</td>
</tr>
<tr><td class="spacer" colspan="2"></td></tr>
@@ -74,7 +74,12 @@ function myHomeLoad()
<tr>
<td>{include file="res_logtype.tpl" type=$logItem.type}</td>
<td style="white-space:nowrap; text-align:center">{$logItem.date|date_format:$opt.format.datelong}</td>
<td><a href="viewcache.php?wp={$logItem.wp_oc}">{$logItem.name|escape}</a> {include file="res_oconly.tpl" oconly=$logItem.oconly} {t}by{/t} <a href="viewprofile.php?userid={$logItem.userid}">{$logItem.username|escape}</a></td>
<td>
<a href="viewcache.php?wp={$logItem.wp_oc}">{$logItem.name|escape}</a>
{include file="res_oconly.tpl" oconly=$logItem.oconly}
{t}by{/t} <a href="viewprofile.php?userid={$logItem.userid}">{$logItem.username|escape}</a>
{if $logItem.recommended}<img src="images/rating-star.gif" width="17" height="16" title="{t}with recommendation{/t}">{/if}
</td>
</tr>
{foreachelse}
<tr><td>{t}No entries found{/t}</td></tr>
@@ -62,12 +62,14 @@

{if $newLog.type==1}
{t 1=$smarty.capture.cachename 2=$smarty.capture.username}%2 found %1{/t}
{if $newLog.recommended}<img src="images/rating-star.gif" width="17" height="16" title="{t}with recommendation{/t}">{/if}
{elseif $newLog.type==2}
{t 1=$smarty.capture.cachename 2=$smarty.capture.username}%2 didn't find %1{/t}
{elseif $newLog.type==3}
{t 1=$smarty.capture.cachename 2=$smarty.capture.username}%2 wrote a note for %1{/t}
{elseif $newLog.type==7}
{t 1=$smarty.capture.cachename 2=$smarty.capture.username}%2 visited %1{/t}
{if $newLog.recommended}<img src="images/rating-star.gif" width="17" height="16" title="{t}with recommendation{/t}">{/if}
{elseif $newLog.type==8}
{t 1=$smarty.capture.cachename 2=$smarty.capture.username}%2 want's to visit %1{/t}
{elseif $newLog.type==9}

0 comments on commit 1680a52

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