show number of active caches in public profiles; hide show-zero-links
This commit is contained in:
@@ -2436,11 +2436,12 @@ INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1994', 'Opencac
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1995', 'Opencaching at Twitter', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1996', 'The visited website <b>%1</b> does not exists, we found the following suitable pages:', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1998', 'OK', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1999', 'Show active', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1999', 'Show', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2000', 'My last log', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2001', 'Own logs', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2002', 'Show all finds', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2003', 'Show all logs', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2004', 'active caches', '2013-04-25 23:00:00');
|
||||
|
||||
-- Table sys_trans_ref
|
||||
SET NAMES 'utf8';
|
||||
@@ -6209,11 +6210,12 @@ INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUE
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1995', 'DE', 'Opencaching bei Twitter', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1996', 'DE', 'Die gesuchte Webseite <b>%1</b> existiert nicht, aber wir haben folgende Seiten gefunden:', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1998', 'DE', 'OK', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1999', 'DE', 'aktive anzeigen', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1999', 'DE', 'anzeigen', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2000', 'DE', 'mein letztes Log', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2001', 'DE', 'Eigene Logs', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2002', 'DE', 'alle Funde anzeigen', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2003', 'DE', 'alle Logs anzeigen', '2013-04-25 23:00:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2004', 'DE', 'aktive Caches', '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');
|
||||
|
@@ -107,7 +107,7 @@
|
||||
<td valign="middle" class="header-small" style="padding-top:5px;padding-bottom:5px">
|
||||
<img src="resource2/{$opt.template.style}/images/cacheicon/22x22-traditional.gif" width="22" height="22" align="middle" border="0" alt="{t}Hidden caches{/t}" title="{t}Hidden caches{/t}"> <b>{t}Hidden caches{/t}:</b></td>
|
||||
<td class="header-small">{$hidden}
|
||||
[<a href="search.php?showresult=1&expert=0&f_inactive=0&output=HTML&sort=byname&ownerid={$userid}&searchbyowner=">{t}Show all{/t}</a>] [<a href="search.php?showresult=1&expert=0&f_inactive=1&output=HTML&sort=byname&ownerid={$userid}&searchbyowner=">{t}Show active{/t}</a>]
|
||||
{if $hidden>0}[<a href="search.php?showresult=1&expert=0&f_inactive=0&output=HTML&sort=byname&ownerid={$userid}&searchbyowner=">{t}Show all{/t}</a>]{if $active<$hidden} – {$active} {t}active caches{/t} {if $active>0}[<a href="search.php?showresult=1&expert=0&f_inactive=1&output=HTML&sort=byname&ownerid={$userid}&searchbyowner=">{t}Show{/t}</a>]{/if}{/if}{/if}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -121,10 +121,6 @@
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
{foreachelse}
|
||||
<tr>
|
||||
<td colspan="2">{t}The user has not hidden any caches yet.{/t}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
<tr><td class="spacer" colspan="2"></td></tr>
|
||||
{/if}
|
||||
@@ -136,7 +132,7 @@
|
||||
</td>
|
||||
<td class="header-small">
|
||||
{$founds}
|
||||
[<a href="search.php?showresult=1&expert=0&f_inactive=0&output=HTML&sort=byname&finderid={$userid}&searchbyfinder=&logtype=1,7">{t}Show all{/t}</a>]
|
||||
{if $founds>0}[<a href="search.php?showresult=1&expert=0&f_inactive=0&output=HTML&sort=byname&finderid={$userid}&searchbyfinder=&logtype=1,7">{t}Show all{/t}</a>]{/if}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -150,10 +146,6 @@
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
{foreachelse}
|
||||
<tr>
|
||||
<td colspan="2">{t}The user has not found any caches yet.{/t}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
<tr><td class="spacer" colspan="2"></td></tr>
|
||||
|
||||
@@ -161,14 +153,14 @@
|
||||
<td valign="middle" class="header-small" style="padding-top:5px;padding-bottom:5px">
|
||||
<img src="resource2/ocstyle/images/logtype/16x16-dnf.png" alt="{t}Caches not found{/t}" title="{t}Caches not found{/t}"> <b>{t}Not found{/t}:</b></td>
|
||||
<td class="header-small" >{$notfound}
|
||||
[<a href="search.php?showresult=1&expert=0&f_inactive=0&output=HTML&sort=byname&finderid={$userid}&searchbyfinder=&logtype=2">{t}Show all{/t}</a>]
|
||||
{if $notfound > 0}[<a href="search.php?showresult=1&expert=0&f_inactive=0&output=HTML&sort=byname&finderid={$userid}&searchbyfinder=&logtype=2">{t}Show all{/t}</a>]{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" class="header-small" style="padding-bottom:5px">
|
||||
<img src="resource2/ocstyle/images/logtype/16x16-note.png" alt="{t}Notes{/t}" title="{t}Notes{/t}"> <b>{t}Notes{/t}:</b></td>
|
||||
<td class="header-small" >{$note}
|
||||
[<a href="search.php?showresult=1&expert=0&f_inactive=0&output=HTML&sort=byname&finderid={$userid}&searchbyfinder=&logtype=3">{t}Show all{/t}</a>]
|
||||
{if $note>0}[<a href="search.php?showresult=1&expert=0&f_inactive=0&output=HTML&sort=byname&finderid={$userid}&searchbyfinder=&logtype=3">{t}Show all{/t}</a>]{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
@@ -176,7 +168,7 @@
|
||||
<tr>
|
||||
<td class="header-small">
|
||||
<img src="resource2/{$opt.template.style}/images/viewcache/cache-rate.png" align="middle" border="0" alt="{t}Recommendations{/t}" title="{t}Recommendations{/t}"> <b>{t}Recommendations{/t}:</b></td>
|
||||
<td class="header-small" >{t 1=$recommended 2=$maxrecommended}%1 of %2 possibles{/t} [<a href="usertops.php?userid={$userid}">{t}Show all{/t}</a>]
|
||||
<td class="header-small" >{t 1=$recommended 2=$maxrecommended}%1 of %2 possibles{/t} {if $recommended>0}[<a href="usertops.php?userid={$userid}">{t}Show all{/t}</a>]{/if}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -184,7 +176,7 @@
|
||||
<tr>
|
||||
<td class="header-small">
|
||||
<img src="resource2/{$opt.template.style}/images/action/16x16-addimage.png" align="middle" border="0" alt="{t}Log pictures{/t}" title="{t}Log pictures{/t}"> <b>{t}Log pictures{/t}:</b></td>
|
||||
<td class="header-small" >{$logpics} [<a href="viewprofile.php?userid={$userid}&allpics=1">{t}Show all{/t}</a>]
|
||||
<td class="header-small" >{$logpics} {if $logpics>0}[<a href="viewprofile.php?userid={$userid}&allpics=1">{t}Show all{/t}</a>]{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
@@ -55,6 +55,8 @@
|
||||
if ($record === false)
|
||||
$tpl->error(ERROR_USER_NOT_EXISTS);
|
||||
|
||||
$active = sql_value("SELECT COUNT(*) FROM `caches` WHERE `user_id`='&1' AND `status`=1", 0, $userid);
|
||||
|
||||
$rs = sql("SELECT IFNULL(`tt`.`text`, `p`.`name`) AS `name`, `u`.`option_value`, `u`.`option_id` AS `option_id`
|
||||
FROM `profile_options` AS `p`
|
||||
LEFT JOIN `user_options` AS `u` ON `p`.`id`=`u`.`option_id`
|
||||
@@ -106,6 +108,7 @@
|
||||
$tpl->assign('notfound', $record['notfound'] <= 0 ? '0' : $record['notfound']);
|
||||
$tpl->assign('note', $record['note'] <= 0 ? '0' : $record['note']);
|
||||
$tpl->assign('hidden', $record['hidden'] <= 0 ? '0' : $record['hidden']);
|
||||
$tpl->assign('active', $active);
|
||||
$tpl->assign('recommended', sql_value("SELECT COUNT(*) FROM `cache_rating` WHERE `user_id`='&1'", 0, $userid));
|
||||
$tpl->assign('maxrecommended', floor($record['found'] * $opt['logic']['rating']['percentageOfFounds'] / 100));
|
||||
|
||||
|
Reference in New Issue
Block a user