Changeset 576538
- Timestamp:
- 07/24/2012 09:26:08 AM (14 years ago)
- Location:
- volleytnt
- Files:
-
- 2 added
- 2 edited
-
assets (added)
-
assets/banner-772x250.jpg (added)
-
trunk/admin/volleytnt_home.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
volleytnt/trunk/admin/volleytnt_home.php
r576416 r576538 16 16 public function firstpage() { 17 17 require_once(ABSPATH . 'wp-admin/includes/dashboard.php'); 18 $screen = get_current_screen(); 19 $priority = 'core'; 18 20 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' ) ); 20 23 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 ); 21 26 22 27 wp_dashboard(); … … 30 35 $VolleyTNT->call_page_method( 'volleytnt_squadre', 'edit', 0, true ); 31 36 } 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> </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 } 33 88 34 89 } -
volleytnt/trunk/readme.txt
r472023 r576538 4 4 Tags: sport, volley, beachvolley, volleyball, tournament, management 5 5 Requires at least: 3.3 6 Tested up to: 3. 36 Tested up to: 3.4.1 7 7 Stable tag: trunk 8 8 … … 11 11 == Description == 12 12 13 This plugin is under heavy development and not ready for final users!13 This 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. 14 14 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.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. 16 16 17 17 While 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 19 To properly use this plugin you must follow these steps: 20 21 1. Create a new tournement in "Options and tournements" page 22 1. Mark it as *current* in the same page 23 1. Set playing times in his options 24 1. Register players and teams in "Teams" page 25 1. When the subscriptions are closed, put the teams in their playing groups 26 1. Go in "Matches" page, regenerate the match list and put the matches in their places 27 1. When a match has been played, go on "Results" page and write the points 28 1. When you play the final knock-out you must go on "Finals" page and write the points 29 30 You 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 18 37 19 38 == Installation == 20 39 21 40 Simply use Wordpress standard tools to install this plugin. 41 42 == Coming soon == 43 44 English translation. 45 46 Dedicated interface for mobile devices. 47 48 A native iPhone / Android that can access data.
Note: See TracChangeset
for help on using the changeset viewer.