From e517cfad640d7697eb021cb698e5958f154f908b Mon Sep 17 00:00:00 2001 From: rub Date: Tue, 6 Feb 2007 22:55:12 +0000 Subject: Issue 0000598: NBM: Add new informations Notification by mail: Add new informations about last categories and last images like new feature of RSS notification. 2 parts: - Possibility to send HTML mail - Include last categories and last images on HTML format into notification mail ccs & HTML experts! Please! Check, fix, improve and enhance HTML mail content! git-svn-id: http://piwigo.org/svn/trunk@1784 68402e56-0260-453c-a942-63ccdbb3a9ee --- feed.php | 66 +++++----------------------------------------------------------- 1 file changed, 5 insertions(+), 61 deletions(-) (limited to 'feed.php') diff --git a/feed.php b/feed.php index 7701b36fc..d3d8193cb 100644 --- a/feed.php +++ b/feed.php @@ -33,27 +33,6 @@ include_once(PHPWG_ROOT_PATH.'include/functions_notification.inc.php'); // | functions | // +-----------------------------------------------------------------------+ -/** - * explodes a MySQL datetime format (2005-07-14 23:01:37) in fields "year", - * "month", "day", "hour", "minute", "second". - * - * @param string mysql datetime format - * @return array - */ -function explode_mysqldt($mysqldt) -{ - $date = array(); - list($date['year'], - $date['month'], - $date['day'], - $date['hour'], - $date['minute'], - $date['second']) - = preg_split('/[-: ]/', $mysqldt); - - return $date; -} - /** * creates a Unix timestamp (number of seconds since 1970-01-01 00:00:00 * GMT) from a MySQL datetime format (2005-07-14 23:01:37) @@ -185,15 +164,13 @@ else } } -$dates = get_recent_post_dates( 5, 6, 6); +$dates = get_recent_post_dates(5, 6, 6); -foreach($dates as $date_detail) +foreach($dates as $date_detail) { // for each recent post date we create a feed item - $date = $date_detail['date_available']; - $exploded_date = explode_mysqldt($date); $item = new FeedItem(); - $item->title = l10n_dec('%d new element', '%d new elements', $date_detail['nb_elements']); - $item->title .= ' ('.$lang['month'][(int)$exploded_date['month']].' '.$exploded_date['day'].')'; + $date = $date_detail['date_available']; + $item->title = get_title_recent_post_date($date_detail); $item->link = make_index_url( array( 'chronology_field' => 'posted', @@ -206,40 +183,7 @@ foreach($dates as $date_detail) $item->description .= ''.$conf['gallery_title'].'
'; - $item->description .= - '
  • ' - .l10n_dec('%d new element', '%d new elements', $date_detail['nb_elements']) - .' (' - .'' - .l10n('recent_pics_cat').'' - .')' - .'
  • '; - - foreach( $date_detail['elements'] as $element ) - { - $tn_src = get_thumbnail_url($element); - $item->description .= ''; - } - $item->description .= '...
    '; - - $item->description .= - '
  • ' - .l10n_dec('%d category updated', '%d categories updated', - $date_detail['nb_cats']) - .'
  • '; - - $item->description .= ''; + $item->description .= get_html_description_recent_post_date($date_detail); $item->descriptionHtmlSyndicated = true; -- cgit v1.2.3