$page->assign('xorg_title','Polytechnique.org - Mon carnet');
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('xorg_rss',
+ array("title" => "Polytechnique.org :: Carnet",
+ "href" => "/carnet/rss/".Session::get('forlife')."/".Session::get('core_rss_hash')."/rss..xml"));
}
$page->assign('refe',$_SERVER['PHP_SELF']);
$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->assign('xorg_rss',
+ array("title" => "Polytechnique.org :: Carnet",
+ "href" => "/carnet/rss/".Session::get('forlife')."/".Session::get('core_rss_hash')."/rss.xml"));
}
$page->run();
* 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');
+class CarnetModule extends PLModule
+{
+ function handlers()
+ {
+ return array(
+ 'carnet/rss' => $this->make_hook('rss', AUTH_PUBLIC),
+ );
+ }
-if (preg_match(',^/([^/]+)/([^/]+)\.xml$,', $_SERVER['PATH_INFO'], $m)) {
- $uid = init_rss('carnet/rss.tpl', $m[1], $m[2]);
- $notifs = new Notifs($uid, false);
- $page->assign('notifs', $notifs);
+ function handler_rss(&$page, $user = null, $hash = null)
+ {
+ require_once 'rss.inc.php';
+ require_once 'notifs.inc.php';
- $page->run();
+ $uid = init_rss('carnet/rss.tpl', $user, $hash);
+ $notifs = new Notifs($uid, false);
+ $page->assign('notifs', $notifs);
+
+ return PL_OK;
+ }
}
-?>
+
+?>
Affichage de tous les évenements de camarades/promos
{if $smarty.session.core_rss_hash}
<div class="right">
- <a href='{rel}/rss.php/{$smarty.session.forlife}/{$smarty.session.core_rss_hash}.xml'><img src='{rel}/images/rssicon.gif' alt='fil rss' /></a>
+ <a href='{rel}/carnet/rss/{$smarty.session.forlife}/{$smarty.session.core_rss_hash}/rss.xml'><img src='{rel}/images/rssicon.gif' alt='fil rss' /></a>
</div>
{else}
<div class="right">
<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>
+<a href='{rel}/carnet/rss/{$smarty.session.forlife}/{$smarty.session.core_rss_hash}/rss.xml'><img src='{rel}/images/rssicon.gif' alt='fil rss' /></a>
{/if}
</div>
</li>
<li>
Ton carnet polytechnicien :
- <a href='{rel}/carnet/rss.php/{$smarty.session.forlife}/{$smarty.session.core_rss_hash}.xml'><img src='{rel}/images/rssicon.gif' alt='fil rss' title='fil RSS'/></a>
+ <a href='{rel}/carnet/rss/{$smarty.session.forlife}/{$smarty.session.core_rss_hash}/rss.xml'><img src='{rel}/images/rssicon.gif' alt='fil rss' title='fil RSS'/></a>
</li>
</ul>
<p>