Changeset 1636


Ignore:
Timestamp:
Dec 6, 2006, 2:07:03 AM (17 years ago)
Author:
rvelices
Message:

feature 583: notification infromation can be filtered by the requester
(optionnally no comments/new users...)
small lang correction in header.tpl

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/feed.php

    r1604 r1636  
    145145// +-----------------------------------------------------------------------+
    146146
    147 $news = news($user['last_check'], $dbnow, true, true);
    148 
    149 if (count($news) > 0)
    150 {
    151   $item = new FeedItem();
    152   $item->title = sprintf(l10n('New on %s'), $dbnow);
    153   $item->link = $conf['gallery_url'];
    154 
    155   // content creation
    156   $item->description = '<ul>';
    157   foreach ($news as $line)
     147if ( !isset($_GET['image_only']) )
     148{
     149  $news = news($user['last_check'], $dbnow, true, true);
     150
     151  if (count($news) > 0)
    158152  {
    159     $item->description.= '<li>'.$line.'</li>';
    160   }
    161   $item->description.= '</ul>';
    162   $item->descriptionHtmlSyndicated = true;
    163 
    164   $item->date = ts_to_iso8601(mysqldt_to_ts($dbnow));
    165   $item->author = 'PhpWebGallery notifier';
    166   $item->guid= sprintf('%s', $dbnow);;
    167 
    168   $rss->addItem($item);
    169 
    170   $query = '
     153    $item = new FeedItem();
     154    $item->title = sprintf(l10n('New on %s'),
     155        format_date($dbnow, 'mysql_datetime') );
     156    $item->link = $conf['gallery_url'];
     157
     158    // content creation
     159    $item->description = '<ul>';
     160    foreach ($news as $line)
     161    {
     162      $item->description.= '<li>'.$line.'</li>';
     163    }
     164    $item->description.= '</ul>';
     165    $item->descriptionHtmlSyndicated = true;
     166
     167    $item->date = ts_to_iso8601(mysqldt_to_ts($dbnow));
     168    $item->author = 'PhpWebGallery notifier';
     169    $item->guid= sprintf('%s', $dbnow);;
     170
     171    $rss->addItem($item);
     172
     173    $query = '
    171174UPDATE '.USER_FEED_TABLE.'
    172175  SET last_check = \''.$dbnow.'\'
    173176  WHERE id = \''.$_GET['feed'].'\'
    174177;';
     178    pwg_query($query);
     179  }
     180}
     181else
     182{ // update the last check to avoid deletion by maintenance task
     183  $query = '
     184UPDATE '.USER_FEED_TABLE.'
     185  SET last_check = \''.$dbnow.'\'
     186  WHERE id = \''.$_GET['feed'].'\'
     187;';
    175188  pwg_query($query);
    176189}
    177 
    178190
    179191// build items for new images/albums
  • trunk/include/menubar.inc.php

    r1595 r1636  
    283283  'summary',
    284284  array(
    285     'TITLE'=>l10n('notification'),
     285    'TITLE'=>l10n('RSS feed'),
    286286    'NAME'=>l10n('Notification'),
    287287    'U_SUMMARY'=> get_root_url().'notification.php',
  • trunk/language/en_UK.iso-8859-1/common.lang.php

    r1624 r1636  
    313313$lang['Category'] = 'Category';
    314314$lang['Close this window'] = 'Close this window';
     315$lang['Complete RSS feed'] = 'Complete RSS feed (images, comments)';
    315316$lang['Confirm Password'] = 'Confirm Password';
    316317$lang['Connection settings'] = 'Connection settings';
     
    337338$lang['Help'] = 'Help';
    338339$lang['Identification'] = 'Identification';
     340$lang['Image only RSS feed'] = 'Image only RSS feed';
    339341$lang['Keyword'] = 'Keyword';
    340342$lang['Keywords'] = 'Keywords';
     
    509511$lang['no_category'] = 'Home';
    510512$lang['no_rate'] = 'no rate';
    511 $lang['notification'] = 'notification';
    512513$lang['only_members'] = 'Only members can access this page';
    513514$lang['password updated'] = 'password updated';
  • trunk/language/fr_FR.iso-8859-1/common.lang.php

    r1624 r1636  
    312312$lang['Category'] = 'Catégorie';
    313313$lang['Close this window'] = 'Fermer cette fenêtre';
     314$lang['Complete RSS feed'] = 'Flux RSS complet (images, commentaires)';
    314315$lang['Confirm Password'] = 'Confirmer le mot de passe';
    315316$lang['Connection settings'] = 'Paramètres de connexion';
     
    336337$lang['Help'] = 'Aide';
    337338$lang['Identification'] = 'Identification';
     339$lang['Image only RSS feed'] = 'Flux RSS des images';
    338340$lang['Keyword'] = 'Mot-clef';
    339341$lang['Keywords'] = 'Mots-clef';
     
    508510$lang['no_category'] = 'Accueil';
    509511$lang['no_rate'] = 'pas de note';
    510 $lang['notification'] = 'notification';
    511512$lang['only_members'] = 'Seuls les membres enregistrés peuvent accéder à cette page';
    512513$lang['password updated'] = 'mot de passe mis à jour';
  • trunk/notification.php

    r1539 r1636  
    5353
    5454$feed_url=PHPWG_ROOT_PATH.'feed.php?feed='.$page['feed'];
     55$feed_image_only_url=$feed_url.'&amp;image_only';
     56
    5557// +-----------------------------------------------------------------------+
    5658// |                        template initialization                        |
     
    7577$template->assign_vars(
    7678  array(
    77     'FEED_URL' => $feed_url,
     79    'U_FEED' => $feed_url,
     80    'U_FEED_IMAGE_ONLY' => $feed_image_only_url,
    7881    'U_HOME' => make_index_url(),
    7982    )
  • trunk/template/yoga/header.tpl

    r1630 r1636  
    1717<!-- BEGIN first -->
    1818<link rel="first" title="{lang:first_page}" href="{first.U_IMG}" >
    19 <link rel="up" title="{lang:thumbails}" href="{U_UP}" >
     19<link rel="up" title="{lang:thumbnails}" href="{U_UP}" >
    2020<!-- END first -->
    2121<!-- BEGIN previous -->
     
    2727<!-- BEGIN last -->
    2828<link rel="last" title="{lang:last_page}" href="{last.U_IMG}" >
    29 <link rel="up" title="{lang:thumbails}" href="{U_UP}" >
     29<link rel="up" title="{lang:thumbnails}" href="{U_UP}" >
    3030<!-- END last -->
    3131<link rel="stylesheet" type="text/css" href="{pwg_root}template/{themeconf:template}/layout.css">
  • trunk/template/yoga/notification.tpl

    r960 r1636  
    1010  <p>{lang:The RSS notification feed provides notification on news from this website : new pictures, updated categories, new comments. Use a RSS feed reader.}</p>
    1111
    12   <p><a href="{FEED_URL}">{lang:RSS feed}</a></p>
     12  <p><a href="{U_FEED_IMAGE_ONLY}">{lang:Image only RSS feed}</a></p>
     13  <p><a href="{U_FEED}">{lang:Complete RSS feed}</a></p>
    1314</div>
Note: See TracChangeset for help on using the changeset viewer.