From 51c9b362148e3f2daeb7fa05403b9a56e0111348 Mon Sep 17 00:00:00 2001 From: x2001elahdab Date: Fri, 7 Oct 2005 17:38:36 +0000 Subject: [PATCH] Bug 339: Modification des logos RSS pour permettre l'activation des fils RSS. git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@86 839d8a87-29fc-0310-9880-83ba4fa771e5 --- htdocs/carnet/index.php | 2 ++ htdocs/filrss.php | 48 ++++++++++++++++++++++++++++++ htdocs/images/rssact.gif | Bin 0 -> 1473 bytes htdocs/login.php | 2 ++ templates/carnet/index.tpl | 12 ++++++-- templates/filrss.tpl | 72 +++++++++++++++++++++++++++++++++++++++++++++ templates/login.tpl | 4 +++ 7 files changed, 137 insertions(+), 3 deletions(-) create mode 100644 htdocs/filrss.php create mode 100644 htdocs/images/rssact.gif create mode 100644 templates/filrss.tpl diff --git a/htdocs/carnet/index.php b/htdocs/carnet/index.php index a5a72eb..3698e8d 100644 --- a/htdocs/carnet/index.php +++ b/htdocs/carnet/index.php @@ -26,6 +26,8 @@ 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->assign('refe',$_SERVER['PHP_SELF']); + $page->run(); ?> diff --git a/htdocs/filrss.php b/htdocs/filrss.php new file mode 100644 index 0000000..55d4c0b --- /dev/null +++ b/htdocs/filrss.php @@ -0,0 +1,48 @@ +assign('goback',$param); +} + +if (Env::has('referer')) { + $act = Env::get('act_rss'); + if ($act == 'Activer'){ + $page->trig("Ton Fil RSS est activé."); + $_SESSION['core_rss_hash'] = rand_url_id(16); + $globals->xdb->execute('UPDATE auth_user_quick SET core_rss_hash={?} WHERE user_id={?}', + Session::get('core_rss_hash'), Session::getInt('uid')); + } +} + +if (Session::get('core_rss_hash') > '') +{ + $page->assign('rsshash','oui'); +} + +$page->run(); + +// vim:set et sws=4 sw=4 sts=4: +?> diff --git a/htdocs/images/rssact.gif b/htdocs/images/rssact.gif new file mode 100644 index 0000000000000000000000000000000000000000..00f1192f910f7dd38d9349a6ed7ce5851a62aab3 GIT binary patch literal 1473 zcmb_b`%lwX6u+4w)ny_>sW{YSo1~(dk2?}&QrtjcaqZF5 zWQb_vHN4hNQNvV>SwUR_+ET!)#tf%1+RTmNBNbXEuV1|T-0$D8lQiF+o^w9u^ZA@_ zQ$E?aX6@%kNI01wD$2A^nf53{R;Hq>t4rc{Nu>6`6W&l(8M(CfPRpGLa+uHNP{I>!2^qd4QOCV<(w)bM+nZPG7|c*7MT!SNcal5V1Xi+ zf=l=ar(pnip&dp;Ev$qepowYN0ZtGMg`?8_-gnNOhx(93gQr7zuq? zi%e)QnetV;w<>BUR5oi@QN5bc%5}{X)q^bd3!C$@g zhOD!uzKiBQ`^qo+O?>##mFl>nBOmZp3pbXm|GnF(o7D)oFijIsZrVXTP*X zEFSEhiZ#og)>6Y*)x@>)Y2FUA^|!Fn@GPHougC26XSr*OCpYXrHkNe9^8K?*3({S| zkh}RAjZf|s7Vj90+&w3w7U zw=<^OPg$Z0xr08~uj@a%Z7=*_9M9iOHY>%AA6RN(B$$Tc88LYoqj3cmYsHW~@xknn+PsNNRrhn_JD>W0EbbZ8@67k58tnc1df(Z7XxN(W z=)3h^plkJ1`H~GYoLSassign('evenement', $globals->xdb->iterator($sql, $promo, $promo)); +$page->assign('refe',$_SERVER['PHP_SELF']); + $page->run(); // vim:set et sws=4 sw=4 sts=4: diff --git a/templates/carnet/index.tpl b/templates/carnet/index.tpl index 0a3176e..cf22db6 100644 --- a/templates/carnet/index.tpl +++ b/templates/carnet/index.tpl @@ -63,9 +63,15 @@
Affichage de tous les évenements de camarades/promos - {if $smarty.session.core_rss_hash} - fil rss - {/if} + {if $smarty.session.core_rss_hash} +
+ fil rss +
+ {else} +
+ fil rss +
+ {/if}
diff --git a/templates/filrss.tpl b/templates/filrss.tpl new file mode 100644 index 0000000..1a311c8 --- /dev/null +++ b/templates/filrss.tpl @@ -0,0 +1,72 @@ +{**************************************************************************} +{* *} +{* Copyright (C) 2003-2004 Polytechnique.org *} +{* http://opensource.polytechnique.org/ *} +{* *} +{* This program is free software; you can redistribute it and/or modify *} +{* it under the terms of the GNU General Public License as published by *} +{* the Free Software Foundation; either version 2 of the License, or *} +{* (at your option) any later version. *} +{* *} +{* This program is distributed in the hope that it will be useful, *} +{* but WITHOUT ANY WARRANTY; without even the implied warranty of *} +{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *} +{* GNU General Public License for more details. *} +{* *} +{* You should have received a copy of the GNU General Public License *} +{* along with this program; if not, write to the Free Software *} +{* Foundation, Inc., *} +{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *} +{* *} +{**************************************************************************} + +

Fil RSS

+ +{if !$rsshash } +Tu viens de cliquer sur le lien d'activation des fils RSS. Les fils RSS du site
+ne sont pas activés dans tes préférences. +
    +
  • + Tu peux le faire tout de suite en cliquant sur Activer ci-dessous. +
  • +
  • + Qu'est-ce qu'un fil RSS ? +
  • +
  • + Comment configurer un agregateur RSS ? +
  • +
+ + + + +
+
+ + +
+
+
+ + +
+
+ +{else} +En voici l'adresse: fil rss +

+Tu peux le désactiver en allant dans Préférences et en cliquant sur "désactiver les fils RSS". +

+Attention: désactiver, puis réactiver le fil RSS en change l'adresse. +

+

+ + + + +
+ +
+
+{/if} +{* vim:set et sw=2 sts=2 sws=2: *} diff --git a/templates/login.tpl b/templates/login.tpl index e319c4a..30f5246 100644 --- a/templates/login.tpl +++ b/templates/login.tpl @@ -121,6 +121,10 @@ Bienvenue {$smarty.session.prenom}
fil rss
+ {else} +
+ fil rss +
{/if} {/if} -- 2.1.4