Changeset 690149
- Timestamp:
- 04/01/2013 04:03:46 PM (13 years ago)
- Location:
- ttlive/trunk
- Files:
-
- 2 edited
-
index.php (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ttlive/trunk/index.php
r690042 r690149 4 4 Plugin URI: http://www.svbb-tischtennis.de/ 5 5 Description: A simple wordpress plugin to get the data from the ttlive-system and show it on my wp-post or wp-page 6 Version: 0.8. 26 Version: 0.8.3 7 7 Author: finalan 8 8 Author URI: http://www.svbb-tischtennis.de … … 360 360 } 361 361 362 363 function xsort(&$nodes, $child_name, $order=SORT_ASC) 364 { 365 $sort_proxy = array(); 366 367 foreach ($nodes as $k => $node) { 368 $sort_proxy[$k] = (string) $node->$child_name; 369 } 370 371 array_multisort($sort_proxy, $order, $nodes); 372 } 373 362 374 function getTTLive14Tage(&$params){ 363 375 $debug = 0; … … 384 396 385 397 $expiration_date = new DateTime(date("d-m-Y",strtotime($op.$params['showxdays'].' day'))); 386 398 399 if ($params['display_type'] == 0) { 400 $nodes = $xml->xpath('/LetzteSpiele/Content/Spiel'); 401 402 // Sort by date, descending 403 xsort($nodes, 'Datum', SORT_DESC); 404 } else { 405 $nodes = $xml->xpath('/NachsteSpiele/Content/Spiel'); 406 } 387 407 $plan .= "<table class='" . $tableclassname . "'>\n"; 388 408 $plan .= "<tr><th></th><th style='text-align:center'>Datum</th>\n"; … … 397 417 } 398 418 $plan .= "</tr>\n"; 399 $zeile; 400 foreach($xml->Content->Spiel as $key => $attribute) 419 $zeile; 420 421 foreach($nodes as $key => $attribute) 401 422 { 402 423 $zeile++; … … 539 560 $expiration_date = new DateTime(date("d-m-Y",strtotime($op.$params['showxdays'].' day'))); 540 561 562 if ($params['display_type'] == 0) { 563 $nodes = $xml->xpath('/LetzteSpiele/Content/Spiel'); 564 565 // Sort by date, descending 566 xsort($nodes, 'Datum', SORT_DESC); 567 } else { 568 $nodes = $xml->xpath('/NachsteSpiele/Content/Spiel'); 569 } 570 541 571 $zeile; 542 572 $plan .= '<dl>'; 543 foreach($ xml->Content->Spielas $key => $attribute)573 foreach($nodes as $key => $attribute) 544 574 { 545 575 $zeile++; -
ttlive/trunk/readme.txt
r690039 r690149 5 5 Requires at least: 3.0.1 6 6 Tested up to: 3.5.1 7 Stable tag: 0.8. 27 Stable tag: 0.8.3 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 80 80 == Changelog == 81 81 82 = 0.8. 2=83 * false version number corrected82 = 0.8.3 = 83 * added sorting for last matches (14 Tage), to show the max number of matches by date 84 84 85 85 = 0.8.1 =
Note: See TracChangeset
for help on using the changeset viewer.