aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2006-12-06 01:07:03 +0000
committerrvelices <rv-github@modusoptimus.com>2006-12-06 01:07:03 +0000
commitf880be0609a63046c2f8fe961467f97a8a943f10 (patch)
tree55f8c759e903e37d37bd9bacf69f9c1e9002cdf4
parentaf138fa6311ac686ec7f256788eb2a07784ac215 (diff)
feature 583: notification infromation can be filtered by the requester
(optionnally no comments/new users...) small lang correction in header.tpl git-svn-id: http://piwigo.org/svn/trunk@1636 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--feed.php52
-rwxr-xr-xinclude/menubar.inc.php2
-rw-r--r--language/en_UK.iso-8859-1/common.lang.php3
-rw-r--r--language/fr_FR.iso-8859-1/common.lang.php3
-rw-r--r--notification.php5
-rw-r--r--template/yoga/header.tpl4
-rw-r--r--template/yoga/notification.tpl3
7 files changed, 45 insertions, 27 deletions
diff --git a/feed.php b/feed.php
index 8026b4def..64dc12aae 100644
--- a/feed.php
+++ b/feed.php
@@ -144,29 +144,42 @@ $rss->link = $conf['gallery_url'];
// | Feed creation |
// +-----------------------------------------------------------------------+
-$news = news($user['last_check'], $dbnow, true, true);
-
-if (count($news) > 0)
+if ( !isset($_GET['image_only']) )
{
- $item = new FeedItem();
- $item->title = sprintf(l10n('New on %s'), $dbnow);
- $item->link = $conf['gallery_url'];
+ $news = news($user['last_check'], $dbnow, true, true);
- // content creation
- $item->description = '<ul>';
- foreach ($news as $line)
+ if (count($news) > 0)
{
- $item->description.= '<li>'.$line.'</li>';
+ $item = new FeedItem();
+ $item->title = sprintf(l10n('New on %s'),
+ format_date($dbnow, 'mysql_datetime') );
+ $item->link = $conf['gallery_url'];
+
+ // content creation
+ $item->description = '<ul>';
+ foreach ($news as $line)
+ {
+ $item->description.= '<li>'.$line.'</li>';
+ }
+ $item->description.= '</ul>';
+ $item->descriptionHtmlSyndicated = true;
+
+ $item->date = ts_to_iso8601(mysqldt_to_ts($dbnow));
+ $item->author = 'PhpWebGallery notifier';
+ $item->guid= sprintf('%s', $dbnow);;
+
+ $rss->addItem($item);
+
+ $query = '
+UPDATE '.USER_FEED_TABLE.'
+ SET last_check = \''.$dbnow.'\'
+ WHERE id = \''.$_GET['feed'].'\'
+;';
+ pwg_query($query);
}
- $item->description.= '</ul>';
- $item->descriptionHtmlSyndicated = true;
-
- $item->date = ts_to_iso8601(mysqldt_to_ts($dbnow));
- $item->author = 'PhpWebGallery notifier';
- $item->guid= sprintf('%s', $dbnow);;
-
- $rss->addItem($item);
-
+}
+else
+{ // update the last check to avoid deletion by maintenance task
$query = '
UPDATE '.USER_FEED_TABLE.'
SET last_check = \''.$dbnow.'\'
@@ -175,7 +188,6 @@ UPDATE '.USER_FEED_TABLE.'
pwg_query($query);
}
-
// build items for new images/albums
$query = '
SELECT date_available,
diff --git a/include/menubar.inc.php b/include/menubar.inc.php
index 8b7c816c3..b84d9f09e 100755
--- a/include/menubar.inc.php
+++ b/include/menubar.inc.php
@@ -282,7 +282,7 @@ $template->assign_block_vars(
$template->assign_block_vars(
'summary',
array(
- 'TITLE'=>l10n('notification'),
+ 'TITLE'=>l10n('RSS feed'),
'NAME'=>l10n('Notification'),
'U_SUMMARY'=> get_root_url().'notification.php',
'REL'=> 'rel="nofollow"'
diff --git a/language/en_UK.iso-8859-1/common.lang.php b/language/en_UK.iso-8859-1/common.lang.php
index 94d352b01..e23cdac02 100644
--- a/language/en_UK.iso-8859-1/common.lang.php
+++ b/language/en_UK.iso-8859-1/common.lang.php
@@ -312,6 +312,7 @@ $lang['Average rate'] = 'Average rate';
$lang['Categories'] = 'Categories';
$lang['Category'] = 'Category';
$lang['Close this window'] = 'Close this window';
+$lang['Complete RSS feed'] = 'Complete RSS feed (images, comments)';
$lang['Confirm Password'] = 'Confirm Password';
$lang['Connection settings'] = 'Connection settings';
$lang['Connection'] = 'Connection';
@@ -336,6 +337,7 @@ $lang['Forgot your password?'] = 'Forgot your password?';
$lang['Go through the gallery as a visitor'] = 'Go through the gallery as a visitor';
$lang['Help'] = 'Help';
$lang['Identification'] = 'Identification';
+$lang['Image only RSS feed'] = 'Image only RSS feed';
$lang['Keyword'] = 'Keyword';
$lang['Keywords'] = 'Keywords';
$lang['Links'] = 'Links';
@@ -508,7 +510,6 @@ $lang['next_page'] = 'Next';
$lang['no'] = 'No';
$lang['no_category'] = 'Home';
$lang['no_rate'] = 'no rate';
-$lang['notification'] = 'notification';
$lang['only_members'] = 'Only members can access this page';
$lang['password updated'] = 'password updated';
$lang['periods_error'] = 'Recent period must be a positive integer value';
diff --git a/language/fr_FR.iso-8859-1/common.lang.php b/language/fr_FR.iso-8859-1/common.lang.php
index b6e4af2ff..1652a0524 100644
--- a/language/fr_FR.iso-8859-1/common.lang.php
+++ b/language/fr_FR.iso-8859-1/common.lang.php
@@ -311,6 +311,7 @@ $lang['Average rate'] = 'Note moyenne';
$lang['Categories'] = 'Catégories';
$lang['Category'] = 'Catégorie';
$lang['Close this window'] = 'Fermer cette fenêtre';
+$lang['Complete RSS feed'] = 'Flux RSS complet (images, commentaires)';
$lang['Confirm Password'] = 'Confirmer le mot de passe';
$lang['Connection settings'] = 'Paramètres de connexion';
$lang['Connection'] = 'Connexion';
@@ -335,6 +336,7 @@ $lang['Forgot your password?'] = 'Mot de passe oublié ?';
$lang['Go through the gallery as a visitor'] = 'Parcourir la galerie en tant que visiteur';
$lang['Help'] = 'Aide';
$lang['Identification'] = 'Identification';
+$lang['Image only RSS feed'] = 'Flux RSS des images';
$lang['Keyword'] = 'Mot-clef';
$lang['Keywords'] = 'Mots-clef';
$lang['Links'] = 'Liens';
@@ -507,7 +509,6 @@ $lang['next_page'] = 'Suivant';
$lang['no'] = 'Non';
$lang['no_category'] = 'Accueil';
$lang['no_rate'] = 'pas de note';
-$lang['notification'] = 'notification';
$lang['only_members'] = 'Seuls les membres enregistrés peuvent accéder à cette page';
$lang['password updated'] = 'mot de passe mis à jour';
$lang['periods_error'] = 'La période de nouveauté doit être un entier positif';
diff --git a/notification.php b/notification.php
index ea6381ebf..177ddb654 100644
--- a/notification.php
+++ b/notification.php
@@ -52,6 +52,8 @@ INSERT INTO '.USER_FEED_TABLE.'
pwg_query($query);
$feed_url=PHPWG_ROOT_PATH.'feed.php?feed='.$page['feed'];
+$feed_image_only_url=$feed_url.'&amp;image_only';
+
// +-----------------------------------------------------------------------+
// | template initialization |
// +-----------------------------------------------------------------------+
@@ -74,7 +76,8 @@ $template->set_filenames(array('notification'=>'notification.tpl'));
$template->assign_vars(
array(
- 'FEED_URL' => $feed_url,
+ 'U_FEED' => $feed_url,
+ 'U_FEED_IMAGE_ONLY' => $feed_image_only_url,
'U_HOME' => make_index_url(),
)
);
diff --git a/template/yoga/header.tpl b/template/yoga/header.tpl
index fe3e1da02..3e2b43634 100644
--- a/template/yoga/header.tpl
+++ b/template/yoga/header.tpl
@@ -16,7 +16,7 @@
<link rel="search" title="{lang:search}" href="{pwg_root}search.php" >
<!-- BEGIN first -->
<link rel="first" title="{lang:first_page}" href="{first.U_IMG}" >
-<link rel="up" title="{lang:thumbails}" href="{U_UP}" >
+<link rel="up" title="{lang:thumbnails}" href="{U_UP}" >
<!-- END first -->
<!-- BEGIN previous -->
<link rel="prev" title="{lang:previous_page}" href="{previous.U_IMG}" >
@@ -26,7 +26,7 @@
<!-- END next -->
<!-- BEGIN last -->
<link rel="last" title="{lang:last_page}" href="{last.U_IMG}" >
-<link rel="up" title="{lang:thumbails}" href="{U_UP}" >
+<link rel="up" title="{lang:thumbnails}" href="{U_UP}" >
<!-- END last -->
<link rel="stylesheet" type="text/css" href="{pwg_root}template/{themeconf:template}/layout.css">
<!-- the next css is used to fix khtml (Konqueror/Safari) issue
diff --git a/template/yoga/notification.tpl b/template/yoga/notification.tpl
index d4b178b42..3cd7be193 100644
--- a/template/yoga/notification.tpl
+++ b/template/yoga/notification.tpl
@@ -9,5 +9,6 @@
<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>
- <p><a href="{FEED_URL}">{lang:RSS feed}</a></p>
+ <p><a href="{U_FEED_IMAGE_ONLY}">{lang:Image only RSS feed}</a></p>
+ <p><a href="{U_FEED}">{lang:Complete RSS feed}</a></p>
</div>