git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-370
* Notifications :
- Use Pascal's work to enable a simple, nicer html mail. -MC
+ - Use the new RSS engine to provide a feed of the panel. -MC
* Photo Submission :
- Rework of the form. -MC
- #180: Change the list order using name, promo or last change date.-Car
* Core :
+ - #153: rework the RSS engine. -MC
- #145: Use melix address to log in. -Car
- #212: Various font-sizes fixed. -Car
- #245: Use PEAR::Date to avoid 1970-2038 php limitations. -MC
- #238: Links and Mailto are now active. -Car
* Fiche :
- - #218 : Quit fiche using Escape key. -Car
+ - #218: Quit fiche using Escape key. -Car
* Marketing :
- #256, #255: Mail are now correctly sent. -MC/Car
- #232: Add a link to the fiche. -MC/Car
* Profile :
- - #65 : Add professionnal cellphone. -Car
- - #170 : Remove region display for french departments. -Car
- - #204 : Add nicknames (searchable too). -MC
- - #210 : Add medals and orders. -MC
+ - #65: Add professionnal cellphone. -Car
+ - #170: Remove region display for french departments. -Car
+ - #204: Add nicknames (searchable too). -MC
+ - #210: Add medals and orders. -MC
* Search :
- - #249, #251, #253 : Some tweaks to be more accurate. -MC
+ - #249, #251, #253: Some tweaks to be more accurate. -MC
* Stats :
- #261: Stats of registrations over the time. -Car
Bug/Wish :
* Admin :
- - #186 : Users are reachable by melix, redirects, aliases... -MC
+ - #186: Users are reachable by melix, redirects, aliases... -MC
* Bestalias :
- - #206 : Use only the bestalias and the forlife in vcard and fiche. -MC
- - #207 : Enable for the user the choice of his prefered alias. -MC
+ - #206: Use only the bestalias and the forlife in vcard and fiche. -MC
+ - #207: Enable for the user the choice of his prefered alias. -MC
* Core :
- - #183,185 : Implement perms levels : 'pending'+'disabled'. -MC
- - #154 : Birth fields are now of type DATE. -MC
+ - #183,185: Implement perms levels : 'pending'+'disabled'. -MC
+ - #154: Birth fields are now of type DATE. -MC
* Fiche :
- - #83,208,222 : New fiche. -MC
+ - #83,208,222: New fiche. -MC
* Lists :
- - #86 : Yet another old old wish : lists archives are online ! -MC
- - #144 : Users can subscribe from members/trombi page too. -MC
- - #184 : Owners can now delete their lists. -MC
- - #231 : Add a link to the user's fiche on moderation page. -MC
+ - #86: Yet another old old wish : lists archives are online ! -MC
+ - #144: Users can subscribe from members/trombi page too. -MC
+ - #184: Owners can now delete their lists. -MC
+ - #231: Add a link to the user's fiche on moderation page. -MC
* Newsletter :
- - #242 : Newsletter is standalone. -MC
+ - #242: Newsletter is standalone. -MC
* Search :
- - #56 : Search on referent. -JS
- - #189 : Selection of diplomas depends on schools. -JS
- - #195 : Better heuristic for google like (thanks OG). -MC
- - #203 : New fields in search (alive, subscriber, free). -JS
+ - #56: Search on referent. -JS
+ - #189: Selection of diplomas depends on schools. -JS
+ - #195: Better heuristic for google like (thanks OG). -MC
+ - #203: New fields in search (alive, subscriber, free). -JS
* User Interface :
- - #211 : All imgs in the skins are links to login.php. -MC
+ - #211: All imgs in the skins are links to login.php. -MC
Fixes (from 0.9.2 branch) :
Bug/Wish :
* Docs :
- - #156 : Exit Netscape4 (no more supported), Mozilla enters. -MC
+ - #156: Exit Netscape4 (no more supported), Mozilla enters. -MC
* Carnet :
- - #29,147 : Possible to watch subscribings, deaths, `fiche` modifs. -MC
+ - #29,147: Possible to watch subscribings, deaths, `fiche` modifs. -MC
* Core :
- - #135 : First instance of the plugin class : class Trombi. -MC
- - #158 : A photo change updates last `fiche` edition stamp. -MC
- - #100,199 : Kludge to determine if a link is popup or not. -MC
+ - #135: First instance of the plugin class : class Trombi. -MC
+ - #158: A photo change updates last `fiche` edition stamp. -MC
+ - #100,199: Kludge to determine if a link is popup or not. -MC
* Lists :
- - #138 : Refusal message is shown on mail moderation page. -MC
- - #161 : Now supports non-X natively. -MC
+ - #138: Refusal message is shown on mail moderation page. -MC
+ - #161: Now supports non-X natively. -MC
* Search :
- #112,113,126,133,167,171: google like search + some rewrite. -MC
* Search+Contacts :
- - #122 : Women now have a • (no more dirty gender icons). -MC
- - #124 : Homeland is now a flag. -MC
- - #164 : Married women are now well sorted (by their spouse name). -MC
+ - #122: Women now have a • (no more dirty gender icons). -MC
+ - #124: Homeland is now a flag. -MC
+ - #164: Married women are now well sorted (by their spouse name). -MC
* Stats :
- - #8,134 : Return of the stats pages. -VP
+ - #8,134: Return of the stats pages. -VP
Fixes (from 0.9.1 branch) :
- 1-click moderation for accept and reject cases. -MC
* Usability :
- - #99 : All <a><img ... /></a> now have title. -MC
+ - #99: All <a><img ... /></a> now have title. -MC
* NewsLetter :
- Brand New NewsLetter module. -MC
--- /dev/null
+<?php
+/***************************************************************************
+ * 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 *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+require_once('rss.inc.php');
+require_once('notifs.inc.php');
+
+$uid = init_rss('carnet/rss.tpl');
+$notifs = new Notifs($uid, false);
+$page->assign('notifs', $notifs);
+
+$page->run();
+?>
require_once('xorg.inc.php');
require_once('rss.inc.php');
-list($alias, $hash) = init_rss('rss.tpl');
+$uid = init_rss('rss.tpl');
$rss = $globals->xdb->iterator(
'SELECT e.id, e.titre, e.texte, e.creation_date
- FROM evenements AS e
- INNER JOIN aliases AS a ON ( a.alias = {?} AND a.type != "homonyme" )
- INNER JOIN auth_user_quick AS q ON ( a.id = q.user_id AND core_rss_hash = {?} )
- INNER JOIN auth_user_md5 AS u USING(user_id)
- WHERE FIND_IN_SET(e.flags, "valide") AND peremption >= NOW()
- AND (e.promo_min = 0 || e.promo_min <= u.promo)
- AND (e.promo_max = 0 || e.promo_max >= u.promo)',
- $alias, $hash);
+ FROM auth_user_md5 AS u
+ INNER JOIN evenements AS e ON ( (e.promo_min = 0 || e.promo_min <= u.promo) AND (e.promo_max = 0 || e.promo_max >= u.promo) )
+ WHERE u.user_id = {?} AND FIND_IN_SET(e.flags, "valide") AND peremption >= NOW()', $uid);
$page->assign('rss', $rss);
$page->run();
var $_cats = Array();
var $_data = Array();
- function Notifs($uid,$up=false) {
+ function Notifs($uid, $up=false) {
global $globals;
$this->_uid = $uid;
}
}
-
function init_rss($template)
{
- global $page;
+ global $page, $globals;
new_nonhtml_page($template, AUTH_PUBLIC);
$page->register_modifier('rss_date', '_rss_encode_date');
$page->default_modifiers = Array('@to_rss');
if (preg_match(',^/([^/]+)/([^/]+)\.xml$,', $_SERVER['PATH_INFO'], $m)) {
$alias = $m[1];
$hash = $m[2];
- } else {
- exit;
+ $res = $globals->xdb->query(
+ 'SELECT a.id
+ FROM aliases AS a
+ INNER JOIN auth_user_quick AS q ON ( a.id = q.user_id AND q.core_rss_hash = {?} )
+ WHERE a.alias = {?} AND a.type != "homonyme"', $hash, $alias);
+ $uid = $res->fetchOneCell();
}
+ if (empty($uid)) { exit; }
header('Content-Type: application/rss+xml; charset=utf8');
- return Array($alias, $hash);
+ return $uid;
}
// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
</h3>
<div class="explication">
Affichage de tous les évenements de camarades/promos
+ {if $smarty.session.core_rss_hash}
+ <a href='{rel}/carnet/rss.php/{$smarty.session.forlife}/{$smarty.session.core_rss_hash}.xml'><img src='{rel}/images/rssicon.gif' alt='fil rss' /></a>
+ {/if}
</div>
</td>
<td class='half'>
Il faut pour celà se rendre sur la page de <a href='notifs.php'>configuration des notifications</a>.
</p>
+<div class="right">
+{if $smarty.session.core_rss_hash}
+<a href='{rel}/carnet/rss.php/{$smarty.session.forlife}/{$smarty.session.core_rss_hash}.xml'><img src='{rel}/images/rssicon.gif' alt='fil rss' /></a>
+{/if}
+</div>
{foreach from=$notifs->_data item=c key=cid}
<h2>{if ($c|@count) > 1}
--- /dev/null
+<?xml version="1.0"?>
+{***************************************************************************
+ * 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 *
+ ***************************************************************************}
+<rss version="2.0">
+ <channel>
+ <title>Polytechnique.org :: Carnet</title>
+ <language>fr</language>
+ <link>{#globals.baseurl#}/carnet/panel.php</link>
+ <description>Ton carnet polytechnicien...</description>
+ <image>
+ <title>Polytechnique.org</title>
+ <url>{#globals.baseurl#}/images/logo.png</url>
+ <link>{#globals.baseurl#}/</link>
+ </image>
+ {foreach from=$notifs->_data item=c key=cid}
+ {foreach from=$c item=promo}
+ {section name=row loop=$promo}
+ <item>
+ <title>
+ [{$notifs->_cats[$cid].short}] {$promo[row].prenom} {$promo[row].nom} (le {$promo[row].date|date_format})
+ </title>
+ <link>{#globals.baseurl#}/fiche.php?user={$promo[row].bestalias}</link>
+ <pubDate>{$promo[row]->known|rss_date}</pubDate>
+ </item>
+ {/section}
+ {/foreach}
+ {/foreach}
+ </channel>
+</rss>
+{* vim:set et sw=2 sts=2 sws=2: *}
<title>{$line.titre|strip_tags}</title>
<link>{#globals.baseurl#}/login.php#newsid{$line.id}</link>
<description><![CDATA[{$line.texte|nl2br}]]></description>
- <image>
- <title>Polytechnique.org</title>
- <url>{#globals.baseurl#}/images/logo.png</url>
- <link>{#globals.baseurl#}/</link>
- </image>
</item>
{/iterate}
</channel>