- function onRouterInitialized(&$m) {
- $m->connect('main/flag/profile', array('action' => 'flagprofile'));
- $m->connect('admin/profile/flag', array('action' => 'adminprofileflag'));
+ /**
+ * Add a 'flag' button to profile page
+ *
+ * @param Action $action The action being called
+ * @param Profile $profile Profile being shown
+ *
+ * @return boolean hook result
+ */
+ function onEndProfilePageActionsElements($action, $profile)
+ {
+ $this->showFlagButton($action, $profile,
+ array('action' => 'showstream',
+ 'nickname' => $profile->nickname));
+