RSS Feed link in head for Atom
authorPascal Corpet <pascal.corpet@m4x.org>
Fri, 11 Feb 2005 20:20:18 +0000 (20:20 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:28:08 +0000 (23:28 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-468

htdocs/carnet/index.php
htdocs/carnet/notifs.php
htdocs/carnet/panel.php
htdocs/login.php
templates/skin/common.header.tpl

index f02b202..a5a72eb 100644 (file)
 
 require_once("xorg.inc.php");
 new_skinned_page('carnet/index.tpl', AUTH_COOKIE);
+
+if (Session::has('core_rss_hash')) {
+    $page->assign('xorg_rss', Array("title" => "Polytechnique.org :: Carnet", "href" => "/carnet/rss.php/".Session::get('forlife')."/".Session::get('core_rss_hash').".xml"));
+}
+
 $page->run();
 
 ?>
index e849863..6665995 100644 (file)
@@ -64,4 +64,6 @@ if (Env::has('flags_mail')) {
 
 $page->assign_by_ref('watch', $watch);
 $page->run();
+
+// vim:set et sws=4 sw=4 sts=4:
 ?>
index 3abeb82..922c5dd 100644 (file)
@@ -34,6 +34,10 @@ $notifs = new Notifs(Session::getInt('uid'), true);
 $page->assign('notifs', $notifs);
 $page->assign('today', date('Y-m-d'));
 
+if (Session::has('core_rss_hash')) {
+    $page->assign('xorg_rss', Array("title" => "Polytechnique.org :: Carnet", "href" => "/carnet/rss.php/".Session::get('forlife')."/".Session::get('core_rss_hash').".xml"));
+}
+
 $page->run();
 
 ?>
index f2c1714..2d0986e 100644 (file)
@@ -61,6 +61,12 @@ if ($nbAlea > 0) {
 $publicite = array_chunk( $publicite , $pub_nbLig , true ) ;
 $page->assign_by_ref('publicite', $publicite);
 
+// ajout du lien RSS
+
+if (Session::has('core_rss_hash')) {
+    $page->assign('xorg_rss', Array("title" => "Polytechnique.org :: News", "href" => "/rss.php/".Session::get('forlife')."/".Session::get('core_rss_hash').".xml"));
+}
+
 // affichage des evenements
 // annonces promos triées par présence d'une limite sur les promos
 // puis par dates croissantes d'expiration
@@ -76,4 +82,6 @@ $sql = "SELECT  e.id,e.titre,e.texte,a.user_id,a.nom,a.prenom,a.promo,l.alias AS
 $page->assign('evenement', $globals->xdb->iterator($sql, $promo, $promo));
 
 $page->run();
+
+// vim:set et sws=4 sw=4 sts=4:
 ?>
index a2e8771..79d4e95 100644 (file)
     <script type="text/javascript" src="{rel}/{$js}"></script>
     {/foreach}
     <script type="text/javascript" src="{rel}/javascript/overlib.js"></script>
+    
+    {if $xorg_rss}
+    <link rel="alternate" type="application/rss+xml" title="{$xorg_rss.title}" href="{rel}{$xorg_rss.href}" />
+    {/if}
 
     <title>{$xorg_title|default:"Anciens eleves Polytechnique, annuaire email, Alumni"}</title>