Changeset 1784 for trunk/include/functions_notification.inc.php
- Timestamp:
- Feb 6, 2007, 11:55:12 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 2 2 gal2 3 3 feed.xml 4 testmail
-
- Property svn:ignore
-
trunk/include/functions_notification.inc.php
r1677 r1784 408 408 { 409 409 add_news_line( $news, 410 nb_new_elements($start, $end), '%d new element', '%d new elements'); 410 nb_new_elements($start, $end), '%d new element', '%d new elements', 411 get_root_url().'index.php?/recent_pics', $add_url ); 411 412 } 412 413 … … 414 415 { 415 416 add_news_line( $news, 416 nb_updated_categories($start, $end), '%d category updated', '%d categories updated'); 417 nb_updated_categories($start, $end), '%d category updated', '%d categories updated', 418 get_root_url().'/index.php?/recent_cats', $add_url ); 417 419 } 418 420 … … 510 512 return $dates; 511 513 } 514 515 /** 516 * returns html description about recently published elements grouped by post date 517 * @param $date_detail: selected date computed by get_recent_post_dates function 518 */ 519 function get_html_description_recent_post_date($date_detail) 520 { 521 global $conf; 522 523 $description = ''; 524 525 $description .= 526 '<li>' 527 .l10n_dec('%d new element', '%d new elements', $date_detail['nb_elements']) 528 .' (' 529 .'<a href="'.make_index_url(array('section'=>'recent_pics')).'">' 530 .l10n('recent_pics_cat').'</a>' 531 .')' 532 .'</li><br/>'; 533 534 foreach($date_detail['elements'] as $element) 535 { 536 $tn_src = get_thumbnail_url($element); 537 $description .= '<img src="'.$tn_src.'"/>'; 538 } 539 $description .= '...<br/>'; 540 541 $description .= 542 '<li>' 543 .l10n_dec('%d category updated', '%d categories updated', 544 $date_detail['nb_cats']) 545 .'</li>'; 546 547 $description .= '<ul>'; 548 foreach($date_detail['categories'] as $cat) 549 { 550 $description .= 551 '<li>' 552 .get_cat_display_name_cache($cat['uppercats']) 553 .' ('. 554 l10n_dec('%d new element', 555 '%d new elements', $cat['img_count']).')' 556 .'</li>'; 557 } 558 $description .= '</ul>'; 559 560 return $description; 561 } 562 563 /** 564 * explodes a MySQL datetime format (2005-07-14 23:01:37) in fields "year", 565 * "month", "day", "hour", "minute", "second". 566 * 567 * @param string mysql datetime format 568 * @return array 569 */ 570 function explode_mysqldt($mysqldt) 571 { 572 $date = array(); 573 list($date['year'], 574 $date['month'], 575 $date['day'], 576 $date['hour'], 577 $date['minute'], 578 $date['second']) 579 = preg_split('/[-: ]/', $mysqldt); 580 581 return $date; 582 } 583 584 /** 585 * returns title about recently published elements grouped by post date 586 * @param $date_detail: selected date computed by get_recent_post_dates function 587 */ 588 function get_title_recent_post_date($date_detail) 589 { 590 global $lang; 591 592 $date = $date_detail['date_available']; 593 $exploded_date = explode_mysqldt($date); 594 595 $title = l10n_dec('%d new element', '%d new elements', $date_detail['nb_elements']); 596 $title .= ' ('.$lang['month'][(int)$exploded_date['month']].' '.$exploded_date['day'].')'; 597 598 return $title; 599 } 600 512 601 ?>
Note: See TracChangeset
for help on using the changeset viewer.