Changeset 690032
- Timestamp:
- 04/01/2013 01:36:03 PM (13 years ago)
- Location:
- ttlive/trunk
- Files:
-
- 2 edited
-
index.php (modified) (4 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ttlive/trunk/index.php
r690020 r690032 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. 86 Version: 0.7 7 7 Author: finalan 8 8 Author URI: http://www.svbb-tischtennis.de … … 371 371 if($xml = simplexml_load_file($params['filename'], NULL, ($debug==1)?LIBXML_NOERROR:NULL)) 372 372 { 373 $expiration_date = new DateTime(); 374 $date_interval = new DateInterval('P'.$params['showxdays'].'D'); 375 $date_interval->invert = $params['display_type']; 376 $expiration_date->sub($date_interval); 373 //works only with php 5.3 and higher 374 //$expiration_date = new DateTime(); 375 //$date_interval = new DateInterval('P'.$params['showxdays'].'D'); 376 //$date_interval->invert = $params['display_type']; 377 //$expiration_date->sub($date_interval); 378 379 if ( $params['display_type'] == "0" ) { 380 $op = "-"; 381 } else { 382 $op = "+"; 383 } 384 385 $expiration_date = new DateTime(date("d-m-Y",strtotime($op.$params['showxdays'].' day'))); 377 386 378 387 $plan .= "<table class='" . $tableclassname . "'>\n"; … … 516 525 if($xml = simplexml_load_file($params['filename'], NULL, ($debug==1)?LIBXML_NOERROR:NULL)) 517 526 { 518 $expiration_date = new DateTime(); 519 $date_interval = new DateInterval('P'.$params['showxdays'].'D'); 520 $date_interval->invert = $params['display_type']; 521 $expiration_date->sub($date_interval); 527 //works only with php 5.3 and higher 528 //$expiration_date = new DateTime(); 529 //$date_interval = new DateInterval('P'.$params['showxdays'].'D'); 530 //$date_interval->invert = $params['display_type']; 531 //$expiration_date->sub($date_interval); 532 533 if ( $params['display_type'] == "0" ) { 534 $op = "-"; 535 } else { 536 $op = "+"; 537 } 538 539 $expiration_date = new DateTime(date("d-m-Y",strtotime($op.$params['showxdays'].' day'))); 522 540 523 541 $zeile; … … 950 968 } 951 969 952 } // class Foo_Widget953 // register Foo_Widget widget970 } // class TTLive_Widget 971 // register TTLive_Widget widget 954 972 add_action( 'widgets_init', create_function( '', 'register_widget( "ttlive_widget" );' ) ); 955 973 -
ttlive/trunk/readme.txt
r690020 r690032 80 80 == Changelog == 81 81 82 = 0.8.1 = 83 * bugfix: Error in 14Tage: PHP Class DateInterval is only available with PHP Version 5.3 and higher - Problem fixed with a workaround 84 82 85 = 0.8 = 83 86 * added new parameter showxdays --> 14Tage: Anzahl der Tage die dargestell werden sollen (default = 14)
Note: See TracChangeset
for help on using the changeset viewer.