$avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
return ($avatar) ? $avatar->url : NULL;
}
+
+ # override parent to add X-SUP-ID URL
+
+ function show_rss($limit=0) {
+ $url = common_local_url('sup', NULL, $this->user->id);
+ header('X-SUP-ID', $url);
+ parent::show_rss($limit);
+ }
+
+
}
\ No newline at end of file
RewriteRule ^main/favor$ index.php?action=favor [L,QSA]
RewriteRule ^main/disfavor$ index.php?action=disfavor [L,QSA]
+RewriteRule ^main/sup$ index.php?action=sup [L,QSA]
+
RewriteRule ^settings/profile$ index.php?action=profilesettings [L,QSA]
RewriteRule ^settings/openid$ index.php?action=openidsettings [L,QSA]
RewriteRule ^settings/im$ index.php?action=imsettings [L,QSA]
return theme_path('default-avatar-'.$sizenames[$size].'.png');
}
-function common_local_url($action, $args=NULL) {
- global $config;
- if ($config['site']['fancy']) {
- return common_fancy_url($action, $args);
+function common_local_url($action, $args=NULL, $fragment=NULL) {
+ $url = NULL;
+ if (common_config('site','fancy')) {
+ $url = common_fancy_url($action, $args);
} else {
- return common_simple_url($action, $args);
+ $url = common_simple_url($action, $args);
+ }
+ if (!is_null($fragment)) {
+ $url .= '#'.$fragment;
}
+ return $url;
}
function common_fancy_url($action, $args=NULL) {
}
default: return common_simple_url($action, $args);
}
+ case 'sup':
+ return common_path('main/sup');
default:
return common_simple_url($action, $args);
}