# Looks like we're good; show the header
- common_show_header($profile->nickname);
+ common_show_header($profile->nickname, array($this, 'show_header'), $user);
$cur = common_current_user();
common_show_footer();
}
+ function show_header($user) {
+ common_element('link', array('rel' => 'alternate',
+ 'href' => common_local_url('rss10', array('nickname' =>
+ $user->nickname)),
+ 'type' => 'application/rdf+xml',
+ 'title' => _t('Notice feed for ') . $user->nickname));
+ }
+
function no_such_user() {
common_user_error('No such user');
}
$xw->flush();
}
-function common_show_header($pagetitle) {
+function common_show_header($pagetitle, $callable=NULL, $data=NULL) {
global $config, $xw;
header('Content-Type: application/xhtml+xml');
'type' => 'text/css',
'href' => $config['site']['path'] . 'theme/default/style/print.css',
'media' => 'print'));
+ if ($callable) {
+ if ($data) {
+ call_user_func($callable, $data);
+ } else {
+ call_user_func($callable);
+ }
+ }
common_element_end('head');
common_element_start('body');
common_element_start('div', array('id' => 'wrapper'));