fixed oconly-89 search links: show inactive caches for user stats

This commit is contained in:
following
2013-08-03 20:22:15 +02:00
parent 2943cf77b3
commit 2b9b834f09
5 changed files with 8 additions and 6 deletions

View File

@ -2562,7 +2562,7 @@ INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2136', 'OConly
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2137', 'The user has found <b>%1</b> of <b>81</b> theoretically possible terrain/difficulty combinations.', '2010-09-07 20:19:07');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2138', 'Finds by region', '2010-09-07 20:19:07');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2139', 'OConly-81', '2010-09-07 20:19:07');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2140', 'These Opencaching users have OConly-81 statistics enabled:', '2010-09-07 20:19:07');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2140', 'Users with OConly-81 statistics:', '2010-09-07 20:19:07');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2141', 'OConly-81 statistics', '2010-09-07 20:19:07');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2142', 'inactive', '2010-09-07 20:19:07');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2143', '<b>OConly-81</b> is a new challenge about finding OConly caches under varying conditions, i.e. with different difficulty and terrain ratings. To participate, you can enable the OConly-81 statistics in your <a href=\"mydetails.php\">user profile settings</a>.', '2010-09-07 20:19:07');
@ -6587,7 +6587,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 ('2137', 'DE', 'Der Benutzer hat <b>%1</b> von <b>81</b> theoretisch möglichen Gelände/Schwierigkeit-Kombinationen gefunden.', '2010-08-28 11:48:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2138', 'DE', 'Funde nach Region', '2010-08-28 11:48:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2139', 'DE', 'OConly-81', '2010-09-07 20:19:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2140', 'DE', 'Diese Benutzer haben ihre OConly-81-Statistik aktiviert:', '2010-09-07 20:19:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2140', 'DE', 'Benutzer mit OConly-81-Statistik:', '2010-09-07 20:19:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2141', 'DE', 'OConly-81-Statistik', '2010-09-07 20:19:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2142', 'DE', 'inaktiv', '2010-09-07 20:19:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2143', 'DE', '<b>OConly-81</b> ist eine sportliche Herausforderung bei dem es darum geht, OC-Only-Caches unter den verschiedensten Bedingungen zu finden, d.&nbsp;h. mit verschiedenen Schwierigkeits- und Geländewertungen. Um mitzumachen, kannst du in deinen <a href=\"mydetails.php\">Profileinstellungen</a> die OConly-81-Statistik aktivieren.', '2010-09-07 20:19:07');

View File

@ -27,12 +27,13 @@
INNER JOIN `caches_attributes` ON `caches_attributes`.`cache_id`=`cache_logs`.`cache_id` AND `caches_attributes`.`attrib_id`=6
INNER JOIN `user_options` ON `user_options`.`user_id`=`user`.`user_id`
WHERE `user_options`.`option_id`=13 AND `user_options`.`option_value`='1'");
// users with 0 OConly founds are filtered out here
$rs = sql("
SELECT `user`.`username`, `user`.`user_id`, COUNT(*) AS `count`
FROM `user`
INNER JOIN &oconly81 ON &oconly81.`user_id`=`user`.`user_id`
GROUP BY `user`.`user_id`
ORDER BY `user`.`username`");
ORDER BY `count` DESC, `username` ASC");
$tpl->assign_rs('users', $rs);
sql_free_result($rs);
sql_drop_temp_table('oconly81');

View File

@ -322,6 +322,7 @@ ul.linklist-indent {margin: -0.3em 0px 0.5em 0px; padding: 0px 0px 0px 10px; lis
div.changelog ul {margin: 0px 0px 10px 0px; }
div.changelog ul li {margin: 0px 0px 0.2em 0px; }
div.changelog ul li ul {font-size: 83%; margin:0}
ul.col4 { column-count:4; -moz-column-count:4; -webkit-column-count:4; line-height:1.7em; }
/* Tables */
.table {font-size: 10px; line-height: 1.8em; clear: left; padding: 0px; margin: 0.5em 0px 0.2em 0px; border: solid 0px rgb(150,150,150); empty-cells: show; border-collapse: collapse; background-color: rgb(255,255,255);}

View File

@ -24,10 +24,10 @@
</div>
<p>
{t}These Opencaching users have OConly-81 statistics enabled:{/t}
{t}Users with OConly-81 statistics:{/t}
</p>
<ul style="column-count:4; -moz-column-count:4; -webkit-column-count:4;">
<ul class="col4">
{foreach from=$users item=user}
<li><a href="viewprofile.php?userid={$user.user_id}#oconly81">{$user.username}</a> ({$user.count})</li>
{/foreach}

View File

@ -29,7 +29,7 @@
<th>&nbsp;{$difficulty/2}</th>
{assign var=dsum value=0}
{foreach from=$terrains key=terrain item=count}
<td style="text-align:center; background-color:{if $count}rgb({$count/$stat81_maxcount*-242+242.5|floor},{$count/$stat81_maxcount*-242+242.5|floor},242){else}#f2f2f2{/if}" {if $count}onclick='location.href="search.php?showresult=1&amp;expert=0&amp;f_inactive=0&amp;output=HTML&amp;sort=byname&amp;{if $userid>0}finderid={$userid}&amp;searchbyfinder={else}f_inactive=1&amp;f_disabled=1&amp;searchall={/if}&amp;logtype=1,7&amp;calledbysearch=0&amp;cache_attribs=6&amp;terrainmin={$terrain}&amp;terrainmax={$terrain}&amp;difficultymin={$difficulty}&amp;difficultymax={$difficulty}"'{/if}>
<td style="text-align:center; background-color:{if $count}rgb({$count/$stat81_maxcount*-242+242.5|floor},{$count/$stat81_maxcount*-242+242.5|floor},242){else}#f2f2f2{/if}" {if $count}onclick='location.href="search.php?showresult=1&amp;expert=0&amp;output=HTML&amp;sort=byname&amp;{if $userid>0}f_inactive=0&amp;f_disabled=0&amp;finderid={$userid}&amp;searchbyfinder={else}f_inactive=1&amp;f_disabled=1&amp;searchall={/if}&amp;logtype=1,7&amp;calledbysearch=0&amp;cache_attribs=6&amp;terrainmin={$terrain}&amp;terrainmax={$terrain}&amp;difficultymin={$difficulty}&amp;difficultymax={$difficulty}"'{/if}>
{if $count}
<span style="cursor:pointer; color:{if $count > $stat81_maxcount/3}#fff{else}#000{/if}">{$count}</span>
{assign var=dsum value=$dsum+$count}