if (Event::handle('StartInitializeRouter', array(&$m))) {
+ // top of the menu hierarchy, sometimes "Home"
+ $m->connect('', array('action' => 'top'));
+
+ // public endpoints
+
$m->connect('robots.txt', array('action' => 'robotstxt'));
$m->connect('opensearch/people', array('action' => 'opensearch',
'deleteaccount',
'restoreaccount',
'top',
+ 'public',
);
foreach ($main as $a) {
$m->connect('main/'.$a, array('action' => $a));
}
- $m->connect('main/public', array('action' => 'public'));
$m->connect('main/all', array('action' => 'networkpublic'));
$m->connect('main/tagprofile/:id', array('action' => 'tagprofile'),
array('action' => 'shownotice'),
array('notice' => '[0-9]+'));
- $m->connect('notice/delete/:notice',
+ $m->connect('notice/:notice/delete',
array('action' => 'deletenotice'),
array('notice' => '[0-9]+'));
- $m->connect('notice/delete', array('action' => 'deletenotice'));
-
// conversation
$m->connect('conversation/:id',
array('action' => 'rsd',
'nickname' => $nickname));
- $m->connect('',
- array('action' => 'startpage'));
-
// peopletags
$m->connect('peopletags',
$m->connect('all/:tag',
array('action' => 'showprofiletag',
+ 'nickname' => $nickname,
'tag' => self::REGEX_TAG));
foreach (array('subscriptions', 'subscribers') as $a) {
}
}
- $m->connect('', array('action' => 'startpage'));
- $m->connect('main/public', array('action' => 'public'));
- $m->connect('main/all', array('action' => 'networkpublic'));
$m->connect('rss', array('action' => 'publicrss'));
$m->connect('featuredrss', array('action' => 'featuredrss'));
$m->connect('featured/', array('action' => 'featured'));
array('action' => 'subqueue'),
array('nickname' => Nickname::DISPLAY_FMT));
+ // some targeted RSS 1.0 actions (extends TargetedRss10Action)
+ foreach (array('all', 'replies') as $a) {
+ $m->connect(':nickname/'.$a.'/rss',
+ array('action' => $a.'rss'),
+ array('nickname' => Nickname::DISPLAY_FMT));
+ }
+
// people tags
$m->connect(':nickname/peopletags',
'tagger_id' => '[0-9]+',
'id' => '[0-9]+'));
- $m->connect(':tagger/all/:tag',
- array('action' => 'showprofiletag',
- 'tagger' => Nickname::DISPLAY_FMT,
+ $m->connect(':nickname/all/:tag',
+ array('action' => 'showprofiletag'),
+ array('nickname' => Nickname::DISPLAY_FMT,
'tag' => self::REGEX_TAG));
foreach (array('subscriptions', 'subscribers') as $a) {
array('nickname' => Nickname::DISPLAY_FMT));
}
- foreach (array('all', 'replies') as $a) {
- $m->connect(':nickname/'.$a.'/rss',
- array('action' => $a.'rss'),
- array('nickname' => Nickname::DISPLAY_FMT));
- }
-
$m->connect(':nickname/avatar',
array('action' => 'avatarbynickname'),
array('nickname' => Nickname::DISPLAY_FMT));