Ignore:
Timestamp:
Feb 13, 2011, 11:12:58 AM (13 years ago)
Author:
mistic100
Message:

ContestResults :

  • Code revision
  • Add Letton (lv_LV) language, thanks to Aivars Baldone
  • Delete display options
  • Fix languages bugs
  • Improve public appearence
Location:
extensions/ContestResults/template
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • extensions/ContestResults/template/cr_main.tpl

    r6782 r9200  
    66
    77{if !empty($PLUGIN_INDEX_CONTENT_BEFORE)}{$PLUGIN_INDEX_CONTENT_BEFORE}{/if}
     8
    89<div id="content" class="content">
    910        <div class="titrePage">
     
    1314                <h2>{'Contests'|@translate}</h2>
    1415        </div> <!-- titrePage -->
    15         {if !isset($contests_pending) AND !isset($contests_finished)}
     16       
     17        {if !isset($contests)}
    1618                <div class="nopublic" style="margin-bottom:200px;">
    1719                        {'CR_no_contest'|@translate}
    1820                </div>
    19         {/if}
    20         {if isset($contests_pending)}
     21               
     22        {else}
    2123                <ul class="thumbnailCategories">
    22                         {foreach from=$contests_pending item=contest}
    23                                 <li>
    24                                         <div class="thumbnailCategory {if $contest.VISIBLE == 0}novisible{/if}">
    25                                                 <div class="illustration">
    26                                                         <a href="{$contest.URL}">
    27                                                                 {if !empty($contest.LOGO)}
    28                                                                         <img src="{$contest.LOGO}" alt="{$contest.NAME}" style="max-height:120px;max-width:120px;">
     24                                {foreach from=$contests item=contest}
     25                                        <li>
     26                                                <div class="thumbnailCategory {if $contest.VISIBLE == 0}novisible{/if}">
     27                                                        <div class="illustration">
     28                                                                <a href="{$contest.URL}">
     29                                                                {if $contest.STATUS == 'pending'}
     30                                                                        {if !empty($contest.LOGO)}
     31                                                                                <img src="{$contest.LOGO}" alt="{$contest.NAME}" style="max-height:120px;max-width:120px;">
     32                                                                        {/if}
     33                                                                {else}
     34                                                                        <img src="{$contest.RESULTS.1.TN_SRC}" alt="{$contest.NAME|@replace:'"':' '}">
    2935                                                                {/if}
    30                                                         </a>
    31                                                 </div>
    32                                                 <div class="description">
    33                                                         <h3>
    34                                                                 <a href="{$contest.URL}">{$contest.NAME}</a>
    35                                                         </h3>
    36                                                         <div class="text">
    37                                                                 <p class="Nb_images">{$contest.DATE_BEGIN} - {$contest.DATE_END}</p>
    38                                                                 {if !empty($contest.SUMMARY)}
    39                                                                         <p>{$contest.SUMMARY}</p>
    40                                                                 {/if}
     36                                                                </a>
    4137                                                        </div>
    42                                                 </div>
    43                                         </div>
    44                                 </li>
    45                         {/foreach}
    46                 </ul>
    47         {/if}
    48        
    49         {if isset($contests_finished)}
    50                 <ul class="thumbnailCategories">
    51                         {foreach from=$contests_finished item=contest}
    52                                 <li>
    53                                         <div class="thumbnailCategory {if $contest.VISIBLE == 0}novisible{/if}">
    54                                                 <div class="description">
    55                                                         <h3>
    56                                                                 <a href="{$contest.URL}">{$contest.NAME}</a>
    57                                                                 <span class="finished">({'CR_finished'|@translate})</span>
    58                                                         </h3>
    59                                                         <div class="text">
    60                                                                 <p class="Nb_images">{$contest.DATE_BEGIN} - {$contest.DATE_END}</p>
    61                                                                 <div class="results">
    62                                                                         <a href="{$contest.URL}">
     38                                                        <div class="description">
     39                                                                <h3>
     40                                                                        <a href="{$contest.URL}">{$contest.NAME}</a>
     41                                                                        {if $contest.STATUS == 'finished'}<span class="CR_finished">({'CR_finished'|@translate})</span>{/if}
     42                                                                </h3>
     43                                                                <div class="text">
     44                                                                        <p class="Nb_images">{$contest.DATE_BEGIN} - {$contest.DATE_END}</p>
     45                                                                        <p>
     46                                                                        {if $contest.STATUS == 'pending'}
     47                                                                                {if !empty($contest.SUMMARY)}
     48                                                                                        {$contest.SUMMARY}
     49                                                                                {/if}
     50                                                                        {else}
    6351                                                                                {foreach from=$contest.RESULTS item=result}
    64                                                                                         <img src="{$result.TN_SRC}" style="max-height:80px;max-width:120px;"/>
     52                                                                                        {'CR_order_'|cat:$result.RANK|@translate} {'CR_place'|@translate} - <u>{$result.AUTHOR}</u><br>
    6553                                                                                {/foreach}
    66                                                                         </a>
     54                                                                        {/if}
     55                                                                        </p>
    6756                                                                </div>
    6857                                                        </div>
    6958                                                </div>
    70                                         </div>
    71                                 </li>
    72                         {/foreach}
    73                 </ul>
     59                                        </li>
     60                                {/foreach}
     61                        </ul>
    7462        {/if}
    7563</div> <!-- content -->
  • extensions/ContestResults/template/cr_menubar.tpl

    r6768 r9200  
    11{html_head}
    22        <style type="text/css">
    3                 .finished {ldelim}
     3                .CR_finished {ldelim}
    44                        font-size:0.8em;
    55                        color:#a00;
     
    1515                                <a href="{$data.URL}" title="{$data.DATE}">
    1616                                        {$data.LABEL}
    17                                         {if $data.STATUS == 'finished'}<span class="finished">&times;</span>{/if}
     17                                        {if $data.STATUS == 'finished'}<span class="CR_finished">&times;</span>{/if}
    1818                                </a>
    1919                        </li>
  • extensions/ContestResults/template/cr_page.tpl

    r6782 r9200  
    66
    77{if !empty($PLUGIN_INDEX_CONTENT_BEFORE)}{$PLUGIN_INDEX_CONTENT_BEFORE}{/if}
    8 <div id="content_contest" class="content">
     8<div class="content">
    99        <div class="titrePage">
    1010                <ul class="categoryActions"> 
     
    1515                </ul>
    1616                <h2>
    17                         <a href="index.php?/contests">{'Contests'|@translate}</a>{$SEPARATOR}<a href="{$URL}">{$NAME}</a>
    18                         {if $STATUS=='finished'}<span class="finished">({'CR_finished'|@translate})</span>{/if}
     17                        <a href="index.php?/contests" name="top">{'Contests'|@translate}</a>{$SEPARATOR}<a href="{$URL}">{$NAME}</a>
     18                        {if $STATUS=='finished'}<span class="CR_finished">({'CR_finished'|@translate})</span>{/if}
    1919                </h2>
    2020        </div> <!-- titrePage -->
     
    2626        {/if}
    2727       
     28        <div class="CR_banner">
    2829        {if !empty($BANNER)}
    29                 <div class="CR_banner">
    30                         <a href="#results"><img src="{$BANNER}" alt="{$NAME}"/></a>
     30                <h1><a href="#results"><img src="{$BANNER}" alt="{$NAME}"/></a></h1>
     31        {else}
     32                <h1><a href="#results">{$NAME}</a></h1>
     33        {/if}
     34        </div>
     35       
     36        <div class="CR_text CR_period">
     37                {$DATE_BEGIN} - {$DATE_END}
     38        </div>
     39       
     40        {if !empty($PRESENTATION)}
     41                <div class="CR_text">
     42                        <h3>{'CR_presentation'|@translate} :</h3>
     43                        {$PRESENTATION}
    3144                </div>
    3245        {/if}
    3346       
    34         {if (($STATUS=='pending' AND $PRESENTATION_PENDING) OR ($STATUS=='finished' AND $PRESENTATION_FINISHED)) AND !empty($PRESENTATION)}
     47        {if !empty($RULES)}     
    3548                <div class="CR_text">
    36                         <h3>{'CR_presentation'|@translate} :</h3>
    37                         <p>{$PRESENTATION}</p>
     49                        <h3>{'CR_rules'|@translate} :</h3>
     50                        {$RULES}
    3851                </div>
    3952        {/if}
    4053       
    41         <div class="CR_text">
    42                 <h3>{'CR_period'|@translate} :</h3>
    43                 <p>{$DATE_BEGIN} - {$DATE_END}</p>
    44         </div>
     54        {if !empty($PRICES)}
     55                <div class="CR_text">
     56                        <h3>{'CR_prices'|@translate} :</h3>
     57                        {$PRICES}
     58                </div>
     59        {/if}
    4560       
    46         <div id="CR_rules_prices">
    47                 {if (($STATUS=='pending' AND $RULES_PENDING) OR ($STATUS=='finished' AND $RULES_FINISHED)) AND !empty($RULES)} 
    48                         <div id="CR_rules">
    49                                 <h3>{'CR_rules'|@translate} :</h3>
    50                                 <p>{$RULES}</p>
    51                         </div>
    52                 {/if}
    53                
    54                 {if (($STATUS=='pending' AND $PRICES_PENDING) OR ($STATUS=='finished' AND $PRICES_FINISHED)) AND !empty($PRICES)}
    55                         <div id="CR_prices">
    56                                 <h3>{'CR_prices'|@translate} :</h3>
    57                                 <p>{$PRICES}</p>
    58                         </div>
    59                 {/if}
    60         </div>
    61        
    62         {if (($STATUS=='pending' AND $FINAL_PENDING) OR ($STATUS=='finished' AND $FINAL_FINISHED)) AND !empty($FINAL)}
     61        {if !empty($FINAL)}
    6362                <div class="CR_text">
    6463                        <h3>{'CR_final'|@translate} :</h3>
    65                         <p>{$FINAL}</p>
     64                        {$FINAL}
    6665                </div>
    6766        {/if}
     
    6968
    7069{if !empty($RESULTS)}
    71         <div id="content_results" class="content">
     70        <div class="content">
    7271                <div class="titrePage">
    7372                        <ul class="categoryActions"> 
     
    8584                                        <div class="podium_{$result.RANK}">
    8685                                                <div class="illustration">
    87                                                         <div class="title">{'CR_order_'|cat:$result.RANK|@translate} - <u>{$result.AUTHOR}</u></div>
     86                                                        <div class="title">{'CR_order_'|cat:$result.RANK|@translate} {'CR_place'|@translate} - <u>{$result.AUTHOR}</u></div>
    8887                                                        <a href="{$result.IMAGE_URL}" title="{$result.IMAGE_NAME}">
    8988                                                                <img src="{$result.IMAGE_SRC}" alt="{$result.IMAGE_NAME}"/>
    9089                                                        </a>
    9190                                                </div>
    92                                                 <div class="comment">
    93                                                         <div>{$result.COMMENT}</div>
    94                                                 </div>
     91                                                <p>
     92                                                        {$result.COMMENT}
     93                                                </p>
    9594                                        </div>
    9695                                        {if $result.RANK == 3}</div>{/if}
     
    108107                                                                        <img class="thumbnail" src="{$result.TN_SRC}" alt="{$result.IMAGE_NAME}"/>
    109108                                                                </a>
    110                                                         </span>
     109                                                        </span>                                                 
    111110                                                        <span class="thumbLegend">
    112                                                                 <b>{$result.RANK}{'CR_order_sup'|@translate}</b> - {$result.AUTHOR}
     111                                                                <span class="thumbnail-name">
     112                                                                        {$result.AUTHOR}
     113                                                                </span>
     114                                                                <span class="nb-hits">
     115                                                                        <br>{$result.RANK}{'CR_order_sup'|@translate} {'CR_place'|@translate}
     116                                                                </span>
    113117                                                        </span>
    114118                                                </span>
     
    120124                {if !empty($LOGO)}
    121125                        <div class="CR_banner">
    122                                 <img src="{$LOGO}" alt="{$NAME}"/>
     126                                <h1><a href="#top"><img src="{$LOGO}" alt="{$NAME}"/></a></h1>
    123127                        </div>
    124128                {/if}
  • extensions/ContestResults/template/index.php

    r6768 r9200  
    11<?php
    22// +-----------------------------------------------------------------------+
    3 // | PhpWebGallery - a PHP based picture gallery                           |
    4 // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
     3// | Piwigo - a PHP based picture gallery                                  |
    64// +-----------------------------------------------------------------------+
    7 // | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
    8 // | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
    9 // | last modifier : $Author: rub $
    10 // | revision      : $Revision: 1912 $
     5// | Copyright(C) 2008-2010 Piwigo Team                  http://piwigo.org |
     6// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
     7// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
    118// +-----------------------------------------------------------------------+
    129// | This program is free software; you can redistribute it and/or modify  |
  • extensions/ContestResults/template/style.css

    r6782 r9200  
    1 .content {
    2         min-height:0;
    3 }
    4 
    5 .finished {
     1.CR_finished {
    62        font-weight:normal;
    73        font-size:0.8em;
     
    95        padding-left:10px;
    106        color:#a00;
    11 }
    12 
    13 .results {
    14         overflow:hidden;
    15         white-space:nowrap;
    167}
    178
     
    3122}
    3223
    33 #content_contest {
    34         padding-bottom:20px;
    35 }
    36 
    37 p {
    38         text-align:justify;
    39         margin:0 0 10px 20px;
    40         font-size:1.1em;
    41 }
    42 
    43 h3 {
    44         margin-bottom:0;
    45         font-size:1.3em;
    46 }
    47 
    48 ul {
    49         margin:0;
    50         font-size:1.1em;
    51 }
    52 
    5324.CR_banner {
    5425        width:100%;
    5526        text-align:center;
    5627}
     28        .CR_banner h1 {
     29                margin:20px;
     30                font-size:2.5em;
     31        }
    5732
    5833.CR_text {
    59         margin:0 5%;
     34        margin:0 20px 20px 20px;
     35        text-align:justify;
    6036}
    61 
    62 #CR_rules_prices {
     37        .CR_text h3 {
     38                margin:0 0 3px 0;
     39                font-size:1.3em;
     40                border-bottom:1px dotted #999;
     41                color:#ddd;
     42        }
     43       
     44.CR_period {
    6345        text-align:center;
    64         margin:0 5%;
     46        font-size:1.3em;
     47        font-weight:bold;
     48        font-style:italic;
     49        font-family:"Consolas";
     50        color:#ddd;
     51        border-top:1px dotted #999;
    6552}
    66         #CR_rules, #CR_prices {
    67                 display:inline-block;
    68                 width:49%;
    69                 text-align:left;
    70                 vertical-align:top;
    71         }
    72         #CR_rules_prices h3 {
    73                 margin-left:-1%;
    74         }
    7553
    7654#CR_podium {
    7755        text-align:center;
    78         margin:0 5% 30px 5%;
     56        margin:0 5px 30px 5px;
    7957}
    8058        #CR_podium .podium_1 {
     
    9270                }
    9371                #CR_podium .podium_1 .illustration {
    94                         margin:0 10% 10px 10%;
     72                        margin:0 5px 10px 5px;
    9573                }
    9674                        #CR_podium .podium_1 .illustration img {
     
    9876                                max-height:250px;
    9977                                max-width:100%;
    100                                 -moz-border-radius:10px;
    101                                 border-radius:10px;
     78                                border-radius:5px;
     79                                -moz-border-radius:5px;
     80                                -webkit-border-radius:5px;
     81                                -moz-box-shadow:0 0 5px #EFBF00;
     82                                -webkit-box-shadow:0 0 5px #EFBF00;
    10283                        }
    10384                                #CR_podium .podium_1 .illustration img:hover {
    10485                                        border-style:inset;
    10586                                }
    106                 #CR_podium .podium_1 .comment {
    107                         padding:0 5px;
    108                 }
    109                
    110                 #CR_podium .podium_1 .comment div {
    111                         margin:0 auto;
     87                #CR_podium .podium_1 p {
     88                        padding:0 10px 0 5px;
    11289                        text-align:justify;
     90                        font-size:0.9em;
    11391                }
    11492        #CR_podium .podium_23  {
     
    11795                text-align:left;
    11896                vertical-align:middle;
    119                 border-left:1px dotted #555;
     97                border-left:1px dotted #ddd;
    12098                max-height:400px;
    12199        }
     
    131109                                margin-bottom:5px;
    132110                        }
    133                                 #CR_podium .podium_2 .title {
     111                                #CR_podium .podium_3 .title {
    134112                                        color:#EF5400;
    135113                                }
    136                                 #CR_podium .podium_3 .title {
     114                                #CR_podium .podium_2 .title {
    137115                                        color:#9F9F9F;
    138116                                }
    139117                        #CR_podium .podium_2 .illustration, #CR_podium .podium_3 .illustration {
    140                                 display:inline-block;
    141                                 margin:0 2% 10px 2%;
    142                                 width:40%;
     118                                float:left;
     119                                margin:0 10px 10px 10px;
     120                                width:180px;
    143121                                text-align:center;
    144122                        }
     
    146124                                        border-width:3px;
    147125                                        border-style:outset;
    148                                         max-height:150px;
    149                                         max-width:100%;
    150                                         border-radius:6px;
    151                                         -moz-border-radius:6px;
     126                                        max-height:160px;
     127                                        max-width:170px;
     128                                        border-radius:5px;
     129                                        -moz-border-radius:5px;
     130                                        -webkit-border-radius:5px;
    152131                                }
     132                                        #CR_podium .podium_3 .illustration img {
     133                                                border-color:#EF5400;
     134                                                -moz-box-shadow:0 0 5px #EF5400;
     135                                                -webkit-box-shadow:0 0 5px #EF5400;
     136                                        }
    153137                                        #CR_podium .podium_2 .illustration img {
    154                                                 border-color:#EF5400;
    155                                         }
    156                                         #CR_podium .podium_3 .illustration img {
    157138                                                border-color:#9F9F9F;
     139                                                -moz-box-shadow:0 0 5px #9F9F9F;
     140                                                -webkit-box-shadow:0 0 5px #9F9F9F;
    158141                                        }
    159142                                        #CR_podium .podium_2 .illustration img:hover, #CR_podium .podium_3 .illustration img:hover {
     
    161144                                        }
    162145                       
    163                         #CR_podium .podium_2 .comment, #CR_podium .podium_3 .comment {
    164                                 display:inline-block;
    165                                 width:53%;
    166                                 height:50%;
    167                                 vertical-align:top;
    168                                 margin-top:20px;
     146                        #CR_podium .podium_2 p, #CR_podium .podium_3 p {
    169147                                text-align:justify;
    170148                                font-size:0.9em;
Note: See TracChangeset for help on using the changeset viewer.