Ignore:
Timestamp:
Feb 23, 2011, 11:45:29 PM (13 years ago)
Author:
tiico
Message:

Complete v2.0.0 :

  • Add information on admin page
  • Change blockmenu to show Contests without groups or for Guests.
Location:
extensions/ConcoursPhoto
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • extensions/ConcoursPhoto/CHANGELOG

    r8965 r9364  
    99        - Correct hour/min bug when time is set to 00h00 and control coherence between end and begin dates/hours
    1010        - Correct export to csv file (utf8decode)
     11        - Add information on admin page
     12        - Change blockmenu to show Contests without groups or for Guests. 
    1113______________
    1214
  • extensions/ConcoursPhoto/admin/admin.php

    r8965 r9364  
    6060
    6161    }
     62}
    6263           
    63 }
     64$template->assign( 'CONCOURS_VERSION', l10n('concoursphoto')." (<i>Version ".CONCOURS_VERSION.'</i>)');
    6465
    6566
  • extensions/ConcoursPhoto/admin/template/add_concours.tpl

    r8965 r9364  
    1010
    1111<div class="titrePage">
    12   <h2>Concours</h2>
     12  <h2>{$CONCOURS_VERSION}</h2>
    1313</div>
    1414
  • extensions/ConcoursPhoto/admin/template/audit.tpl

    r8946 r9364  
    11<div class="titrePage">
    2   <h2>Concours</h2>
     2  <h2>{$CONCOURS_VERSION}</h2>
    33</div>
    44<div class="concours">
  • extensions/ConcoursPhoto/admin/template/config.tpl

    r8946 r9364  
    11<div class="titrePage">
    2   <h2>Concours</h2>
     2  <h2>{$CONCOURS_VERSION}</h2>
    33</div>
    44<p>
  • extensions/ConcoursPhoto/admin/template/criteria.tpl

    r8946 r9364  
    11<div class="titrePage">
    2   <h2>Concours</h2>
     2  <h2>{$CONCOURS_VERSION}</h2>
    33</div>
    44<p>
  • extensions/ConcoursPhoto/admin/template/manage.tpl

    r8946 r9364  
    11<div class="titrePage">
    2   <h2>Concours</h2>
     2  <h2>{$CONCOURS_VERSION}</h2>
    33</div>
    44<p>
  • extensions/ConcoursPhoto/admin/template/params.tpl

    r8946 r9364  
    11<div class="titrePage">
    2   <h2>Concours</h2>
     2  <h2>{$CONCOURS_VERSION}</h2>
    33</div>
    44<p>
  • extensions/ConcoursPhoto/include/Concours.class.php

    r8965 r9364  
    933933
    934934
    935    
    936935                if (($page['section']) == 'categories' AND !empty($page['category']))
    937936                {
     
    10041003                                if (isset($_POST['concours_submit']))
    10051004                                {
     1005               
     1006//                    array_push($page['infos'] , l10n('concours_vote_saved'));
     1007                   
    10061008                                        $user_note = "";
    10071009                if ($this->debug)                       echo "SUBMIT";
     
    17841786        }
    17851787
    1786   /*
    1787     initialise menubar's menu
    1788     called by menubar object when making menu
    1789   */
     1788    // initialise menubar's menu.     called by menubar object when making menu
    17901789        public function blockmanager_apply( $menu_ref_arr )
    17911790        {
     
    17991798                if ( ($block = $menu->get_block( 'CONCOURS_menu' ) ) != null )
    18001799                {
    1801                   if($user['id']==2)
    1802                   {
    1803                         $vote_id = $_SERVER['REMOTE_ADDR'];
    1804                   }
    1805                   else
    1806                   {
    1807                         $vote_id = $user['id'];
    1808                   }
    1809 
    1810         //      $polls_list=$this->get_polls_list($vote_id, is_admin(), $user['language']);
     1800
    18111801                  $menu_list=array();
    18121802
     
    18241814
    18251815                        // recover all img_id from the category
    1826                         $query = 'SELECT distinct(id_concours), groups, CONC.name'
     1816                        $query = 'SELECT distinct(id_concours), groups, guest, CONC.name'
    18271817                        .' FROM ' .CONCOURS_RESULT_TABLE
    18281818                        .' INNER JOIN '.CONCOURS_TABLE. ' AS CONC ON CONC.id = id_concours'
    1829                         .' ORDER BY date DESC'
     1819                        .' ORDER BY id DESC'
    18301820                        .';';
    18311821                       
     
    18391829                                        break;
    18401830                                       
    1841                                 if (!empty($row['groups']))
     1831                $conc_to_show = false;  // Default ==> dont show
     1832               
     1833                // Guest
     1834                                if (is_a_guest() AND $row['guest'])
     1835                    $conc_to_show = true;
     1836                // Group present
     1837                elseif (!empty($row['groups']))
    18421838                                {
    18431839                                        $authorized_groups = explode(',', $row['groups']);
    1844                                         if (array_intersect($this->user_groups, $authorized_groups) == array())
     1840                                        if (array_intersect($this->user_groups, $authorized_groups) != array())
     1841                        $conc_to_show = true;
     1842                }
     1843                // Allowed for any user (logged)
     1844                elseif (empty($row['groups']))
     1845                    $conc_to_show = true;
     1846               
     1847                if ($conc_to_show)
    18451848                                        {
    1846                                                 continue;
    1847                                         }
    18481849                                        $nb_concours ++;
    18491850                                        array_push($menu_list,
     
    18511852                                                'nfo' => "",
    18521853                                                'text' => $row['name'],
    1853         //                                      'link' => CONCOURS_PATH.'publish.php?id='.$row['id_concours'],
    18541854                                                'link' => './index.php?/concours/'.$row['id_concours'],
    18551855                                                'edit' => (is_admin()? PHPWG_ROOT_PATH . 'admin.php?page=plugin&amp;section=' . CONCOURS_DIR . '%2Fadmin%2Fadd_concours.php&amp;concours=' . $row['id_concours'].'&amp;action=modify':"")
     
    18621862                  {
    18631863
    1864                           $block->set_title("Concours Photo");
     1864                          $block->set_title(l10n('concoursphoto'));
    18651865                          $block->template = CONCOURS_ROOT.'/template/concours_menu.tpl';
    18661866                          $block->data = $menu_list;
  • extensions/ConcoursPhoto/language/en_UK/plugin.lang.php

    r8965 r9364  
    9898$lang['concours_change_score']          = 'Allow user to change his score after a validation';
    9999$lang['concours_end_date_change_to']    = 'End date changed to %s';
    100 $lang['concours_saved']                 = 'Concours %s-%s saved';
     100$lang['concours_saved']                 = 'Contest %s-%s saved';
     101$lang['concoursphoto']                  = 'Photo Contest';
     102$lang['concours_saveOK']                = 'Parameters saved';
    101103?>
  • extensions/ConcoursPhoto/language/fr_FR/plugin.lang.php

    r8965 r9364  
    9999$lang['concours_end_date_change_to']    = 'La date de fin du concours a été modifié : %s';
    100100$lang['concours_saved']                 = 'Concours %s-%s sauvegardé';
     101$lang['concoursphoto']                  = 'Concours Photo';
     102$lang['concours_saveOK']                = 'Paramètres enregistrés';
     103
    101104?>
  • extensions/ConcoursPhoto/main.inc.php

    r8946 r9364  
    22/*
    33 * Plugin Name: ConcoursPhoto
    4  * Version: 1.2.0
     4 * Version: 2.0.0
    55 * Description: Concours de photo paramétrable
    66 * Plugin URI: http://piwigo.org/ext/extension_view.php?eid=323
     
    1616
    1717global $prefixeTable;
     18
     19define('CONCOURS_VERSION', '2.0.0 [BETA]');       //
     20
    1821
    1922define('CONCOURS_NAME', 'Concours Photo');
Note: See TracChangeset for help on using the changeset viewer.