Plugin Directory

Changeset 576538


Ignore:
Timestamp:
07/24/2012 09:26:08 AM (14 years ago)
Author:
belinde
Message:

Aggiunto banner e spiegazioni nel readme.txt. Aggiunto widget dashboard per il conteggio iscritti

Location:
volleytnt
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • volleytnt/trunk/admin/volleytnt_home.php

    r576416 r576538  
    1616    public function firstpage() {
    1717        require_once(ABSPATH . 'wp-admin/includes/dashboard.php');
     18        $screen = get_current_screen();
     19        $priority = 'core';
    1820       
    19         wp_add_dashboard_widget('volleytnt_iscrizione_rapida', __('Iscrizione rapida', 'volleytnt'), array( $this, 'iscrizione_rapida' ) );
     21//      wp_add_dashboard_widget('volleytnt_iscrizione_rapida', __('Iscrizione rapida', 'volleytnt'), array( $this, 'iscrizione_rapida' ) );
     22//      wp_add_dashboard_widget('volleytnt_iscritti', __('Iscritti', 'volleytnt'), array( $this, 'iscritti' ) );   
    2023       
     24        add_meta_box( 'volleytnt_iscrizione_rapida', __('Iscrizione rapida', 'volleytnt'), array( $this, 'iscrizione_rapida' ), $screen, 'normal', $priority );
     25        add_meta_box( 'volleytnt_iscritti', __('Iscritti', 'volleytnt'), array( $this, 'iscritti' ), $screen, 'side', $priority );
    2126       
    2227        wp_dashboard();
     
    3035        $VolleyTNT->call_page_method( 'volleytnt_squadre', 'edit', 0, true );
    3136    }
    32 
     37   
     38    function iscritti() {
     39        global $wpdb;
     40        $dati = $wpdb->get_results("SELECT
     41                                      `s`.`categoria`,
     42                                      COUNT( DISTINCT `sa`.`squadre_id` ) AS `num`,
     43                                      COUNT( `a`.`id` ) AS `atl`,
     44                                      SUM( `sa`.`pagato` ) AS `pag`,
     45                                      SUM( `sa`.`manleva` ) AS `man`
     46                                    FROM `{$this->prefix}squadre_atleti` AS `sa`
     47                                      JOIN `{$this->prefix}atleti` AS `a`
     48                                        ON `a`.`id` = `sa`.`atleti_id`
     49                                      JOIN `{$this->prefix}squadre` AS `s`
     50                                        ON `s`.`id` = `sa`.`squadre_id`
     51                                          AND `s`.`tornei_id` = {$this->opts->corrente}
     52                                    GROUP BY `s`.`categoria`
     53                                    ORDER BY `s`.`categoria`");
     54        echo '<table class="widefat"><thead><tr><th>&nbsp;</th>';
     55        echo '<th>' . __('Squadre', 'volleytnt') . '</th>';
     56        echo '<th>' . __('Atleti', 'volleytnt') . '</th>';
     57        echo '<th>' . __('Pagato', 'volleytnt') . '</th>';
     58        echo '<th>' . __('Manleva', 'volleytnt') . '</th>';
     59        echo '</tr></thead><tbody>';
     60        if ( $dati ) {
     61            $num = $atl = $pag = $man = 0;
     62            foreach ( $dati as $row ) {
     63                echo '<tr>';
     64                echo '<th>' . $this->l_categorie[ $row->categoria ] . '</th>';
     65                echo '<td>' . number_format_i18n( $row->num ) . '</td>';
     66                echo '<td>' . number_format_i18n( $row->atl ) . '</td>';
     67                echo '<td>' . number_format_i18n( $row->pag ) . '</td>';
     68                echo '<td>' . number_format_i18n( $row->man ) . '</td>';
     69                echo '</tr>';
     70                $num += intval( $row->num );
     71                $atl += intval( $row->atl );
     72                $pag += intval( $row->pag );
     73                $man += intval( $row->man );
     74            }
     75            echo '</tbody>';
     76            echo '<tfoot><tr><th>' . __("Totali:", 'volleytnt') . '</th>';
     77            echo '<th>' . number_format_i18n( $num ) . '</th>';
     78            echo '<th>' . number_format_i18n( $atl ) . '</th>';
     79            echo '<th>' . number_format_i18n( $pag ) . '</th>';
     80            echo '<th>' . number_format_i18n( $man ) . '</th>';
     81            echo '</tr></tfoot>';
     82        } else {
     83            echo '<tr><td colspan="5">' . __("Ancora nessuna iscrizione per il torneo corrente.", 'volleytnt') . '</td></tr>';
     84            echo '</tbody>';
     85        }
     86        echo '</table>';
     87    }
    3388   
    3489}
  • volleytnt/trunk/readme.txt

    r472023 r576538  
    44Tags: sport, volley, beachvolley, volleyball, tournament, management
    55Requires at least: 3.3
    6 Tested up to: 3.3
     6Tested up to: 3.4.1
    77Stable tag: trunk
    88
     
    1111== Description ==
    1212
    13 This plugin is under heavy development and not ready for final users!
     13This plugin is finally availlable for normal user, yet is always under heavy development. By now is only in italian, but soon will be fully translated in english.
    1414
    15 This plugin manages every aspect of volleyball tournaments: registration of athletes, management of playing fields, play-offs, the final knockout. It can handle unlimited editions of the tournament, and you can show the history of all editions played. Dedicated interface is provided for mobile devices, and a native iPhone / Android that can access data is in development.
     15This plugin manages every aspect of volleyball tournaments: registration of athletes, management of playing fields, play-offs, the final knockout. It can handle unlimited editions of the tournament, and you can show the history of all editions played.
    1616
    1717While still in development this plugin will be free, but will become a fee (approximately € 10) reached a stable version. Free licenses are available for those who help in the development, for example, translating the interface or developing add-ons.
     18
     19To properly use this plugin you must follow these steps:
     20
     211. Create a new tournement in "Options and tournements" page
     221. Mark it as *current* in the same page
     231. Set playing times in his options
     241. Register players and teams in "Teams" page
     251. When the subscriptions are closed, put the teams in their playing groups
     261. Go in "Matches" page, regenerate the match list and put the matches in their places
     271. When a match has been played, go on "Results" page and write the points
     281. When you play the final knock-out you must go on "Finals" page and write the points
     29
     30You can use these shortcodes in your posts and pages:
     31
     32* **[volleytnt_squadre]** the teams list
     33* **[volleytnt_calendario]** the calendar
     34* **[volleytnt_risultati]** the results of the first phases
     35* **[volleytnt_classifiche_gironi]** the standings of the round
     36* **[volleytnt_finali]** the final knock-out tree
    1837
    1938== Installation ==
    2039
    2140Simply use Wordpress standard tools to install this plugin.
     41
     42== Coming soon ==
     43
     44English translation.
     45
     46Dedicated interface for mobile devices.
     47
     48A native iPhone / Android that can access data.
Note: See TracChangeset for help on using the changeset viewer.