discarded oconly-81 contest; don't count event attendances

This commit is contained in:
following
2013-10-29 12:07:58 +01:00
parent addb03c478
commit cfec7208e2
6 changed files with 5 additions and 123 deletions

View File

@ -543,7 +543,7 @@ INSERT INTO `helppages` (`ocpage`, `language`, `helppage`) VALUES ('newdesc', 'D
INSERT INTO `helppages` (`ocpage`, `language`, `helppage`) VALUES ('newlogpics', 'DE', 'Logbild-Galerien');
INSERT INTO `helppages` (`ocpage`, `language`, `helppage`) VALUES ('newpw', 'DE', 'Passwort');
INSERT INTO `helppages` (`ocpage`, `language`, `helppage`) VALUES ('oconly', 'DE', 'OConly');
INSERT INTO `helppages` (`ocpage`, `language`, `helppage`) VALUES ('oconly81', 'DE', 'OConly');
INSERT INTO `helppages` (`ocpage`, `language`, `helppage`) VALUES ('oconly81', 'DE', 'OConly-81');
INSERT INTO `helppages` (`ocpage`, `language`, `helppage`) VALUES ('picture', 'DE', 'Bilder');
INSERT INTO `helppages` (`ocpage`, `language`, `helppage`) VALUES ('previewpics', 'DE', 'Vorschaubilder');
INSERT INTO `helppages` (`ocpage`, `language`, `helppage`) VALUES ('query', 'DE', 'Gespeicherte Suchen');
@ -902,7 +902,6 @@ INSERT INTO `sys_menu` (`id`, `id_string`, `title`, `title_trans_id`, `menustrin
INSERT INTO `sys_menu` (`id`, `id_string`, `title`, `title_trans_id`, `menustring`, `menustring_trans_id`, `access`, `href`, `visible`, `parent`, `position`, `color`, `sitemap`, `only_if_parent`) VALUES ('102', 'MNU_START_NEWFEATURES', 'New features', '2115', 'New features', '2115', '0', 'articles.php?page=changelog', '1', '1', '5', '', '0', NULL);
INSERT INTO `sys_menu` (`id`, `id_string`, `title`, `title_trans_id`, `menustring`, `menustring_trans_id`, `access`, `href`, `visible`, `parent`, `position`, `color`, `sitemap`, `only_if_parent`) VALUES ('103', 'MNU_MYPROFILE_OWNERLOGS', 'Log history', '2126', 'Log history', '2126', '0', 'ownerlogs.php', '0', '9', '10', '', '1', NULL);
INSERT INTO `sys_menu` (`id`, `id_string`, `title`, `title_trans_id`, `menustring`, `menustring_trans_id`, `access`, `href`, `visible`, `parent`, `position`, `color`, `sitemap`, `only_if_parent`) VALUES ('104', 'MNU_MYPROFILE_OWNLOGS', 'Log history', '2126', 'Log history', '2126', '0', 'ownlogs.php', '0', '9', '11', '', '1', NULL);
INSERT INTO `sys_menu` (`id`, `id_string`, `title`, `title_trans_id`, `menustring`, `menustring_trans_id`, `access`, `href`, `visible`, `parent`, `position`, `color`, `sitemap`, `only_if_parent`) VALUES ('105', 'MNU_CACHES_OCONLY81', 'OConly-81', '2139', 'OConly-81', '2139', '0', 'oconly81.php', '1', '10', '5', '', '1', NULL);
-- Table sys_trans
SET NAMES 'utf8';

View File

@ -21,7 +21,7 @@
FROM `cache_logs`
INNER JOIN `caches` ON `caches`.`cache_id`=`cache_logs`.`cache_id`
INNER JOIN `caches_attributes` ON `caches_attributes`.`cache_id`=`cache_logs`.`cache_id` AND `caches_attributes`.`attrib_id`=6
WHERE `cache_logs`.`user_id`='&1' AND `cache_logs`.`type` IN (1,7)
WHERE `cache_logs`.`user_id`='&1' AND `cache_logs`.`type` IN (1,7) AND `caches`.`type` <> 6
GROUP BY `difficulty`, `terrain`",
$userid);
}

View File

@ -1,52 +0,0 @@
<?php
/***************************************************************************
* For license information see doc/license.txt
*
* Unicode Reminder メモ
*
* Display some status information about the server and Opencaching
***************************************************************************/
require 'lib2/web.inc.php';
require 'lib2/logic/oconly81.inc.php';
$showall = (@$_REQUEST['showall'] == 1);
$tpl->name = 'oconly81';
$tpl->menuitem = MNU_CACHES_OCONLY81;
$tpl->caching = true;
$tpl->cache_lifetime = 900;
$tpl->cache_id = $showall ? 1 : 0;
$login->verify();
sql_temp_table('oconly81');
sql("
CREATE TEMPORARY TABLE &oconly81 ENGINE=MEMORY
SELECT DISTINCT `user`.`user_id`, `caches`.`terrain`, `caches`.`difficulty`
FROM `user`
INNER JOIN `cache_logs` ON `cache_logs`.`user_id`=`user`.`user_id` AND `cache_logs`.`type` IN (1,7)
INNER JOIN `caches` ON `caches`.`cache_id`=`cache_logs`.`cache_id`
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 `count` DESC, `username` ASC " .
($showall ? "" : "LIMIT " . sql_escape($opt['logic']['oconly81']['default_maxusers']+1)) );
$tpl->assign_rs('users', $rs);
sql_free_result($rs);
sql_drop_temp_table('oconly81');
set_oconly81_tpldata(0);
$tpl->assign('default_maxusers', $opt['logic']['oconly81']['default_maxusers']);
$tpl->assign('showall', $showall);
$tpl->display();
?>

View File

@ -1,67 +0,0 @@
{***************************************************************************
* You can find the license in the docs directory
*
* Unicode Reminder メモ
***************************************************************************}
{* OCSTYLE *}
<div class="content2-pagetitle">
<img src="resource2/{$opt.template.style}/images/misc/is_oconly_small.png" style="align: left; margin-right: 10px;" />
{t}OConly-81{/t}
</div>
<div class="content-txtbox-noshade" style="padding-right: 25px;">
<p class="article">
{t}<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>.{/t}<br />
</p>
<div class="buffer" style="width: 500px;">&nbsp;</div>
<div class="content2-container bg-blue02">
<p class="content-title-noshade-size2">
<img src="resource2/{$opt.template.style}/images/profile/32x22-profile.png" style="align: left; margin-right: 10px;" width="32" height="22" />
{t}Participants{/t}
{if !$showall && ($users|@count > $default_maxusers)}
&nbsp; <span class="content-title-link">[<a href="oconly81.php?showall=1">{t}Show all{/t}</a>]</span>
{/if}
</p>
</div>
<p>
{t}Users with OConly-81 statistics:{/t}
</p>
<ul class="col4">
{foreach from=$users key=n item=user}
{if $showall || ($n < $default_maxusers)}
<li>
<a href="viewprofile.php?userid={$user.user_id}#oconly81">{$user.username}</a> ({$user.count})
</li>
{/if}
{/foreach}
</ul>
<div class="buffer" style="width: 500px;">&nbsp;</div>
<div class="content2-container bg-blue02">
<p class="content-title-noshade-size2">
<img src="resource2/{$opt.template.style}/images/cacheicon/22x20-traditional.png" style="align: left; margin-right: 10px;" width="22" height="20" />
{t}Statistics{/t}
</p>
</div>
<p>
{t}Overall terrain and difficulty distribution of active OConly caches:{/t}
</p>
<table class="table">
<tr>
<td width="1%">
{include file="res_oconly81.tpl" userid=$userid}
</td>
</tr>
<tr>
<td class="spacer">&nbsp;</td>
</tr>
</table>
</div>

View File

@ -6,7 +6,7 @@
{* OCSTYLE *}
<table class="stattable">
<tr>
<th class="h1 nodatacell" style="text-align:right">{if $userid>0}<nobr><a class="systemlink" href="oconly81.php">OConly-81</a>&nbsp;&nbsp;&nbsp;</nobr>{/if}</th>
<th class="h1 nodatacell" style="text-align:right">{if $userid>0}<nobr>{if @$oco81_helplink}{$oco81_helplink}{else}<a class="systemlink" href="oconly81.php">{/if}OConly-81</a>&nbsp;&nbsp;&nbsp;</nobr>{/if}</th>
<th class="h1 nodatacell" colspan="11" style="line-height:1.8em">{t}Terrain{/t}</th>
</tr>
<tr>

View File

@ -80,6 +80,8 @@
$useropt = new useroptions($userid);
$show_statistics = $useropt->getOptValue(USR_OPT_SHOWSTATS);
$show_oconly81 = $useropt->getOptValue(USR_OPT_OCONLY81);
if ($show_oconly81)
$tpl->assign('oco81_helplink', helppagelink('oconly81'));
if ($show_statistics)
{