}
# Looks like we're good; start output
-
+
# For YADIS discovery, we also have a <meta> tag
header('X-XRDS-Location: '. common_local_url('xrds', array('nickname' =>
}
$this->show_sidebar($profile);
-
+
$this->show_notices($profile);
-
+
common_show_footer();
}
'content' => common_local_url('xrds', array('nickname' =>
$user->nickname))));
}
-
+
function no_such_user() {
common_user_error('No such user');
}
common_element_end('div');
}
-
+
function show_profile($profile) {
common_element_start('div', 'profile');
}
function show_remote_subscribe_form($profile) {
- common_element_start('form', array('id' => 'remotesubscribe', 'method' => 'POST',
+ common_element_start('form', array('id' => 'remotesubscribe',
+ 'method' => 'POST',
'action' => common_local_url('remotesubscribe')));
common_hidden('nickname', $profile->nickname);
- common_input('profile', _t('Profile'));
- common_submit('submit',_t('Subscribe'));
+ common_element('input', array('name' => 'profile',
+ 'type' => 'text',
+ 'id' => 'profile',
+ 'size' => '15'));
+ common_element('input', array('type' => 'submit',
+ 'id' => 'submit',
+ 'name' => 'submit',
+ 'value' => _t('Subscribe'),
+ 'class' => 'button'));
common_element_end('form');
}
-
+
function show_unsubscribe_form($profile) {
common_element_start('form', array('id' => 'unsubscribe', 'method' => 'POST',
'action' => common_local_url('unsubscribe')));
function show_subscriptions($profile) {
global $config;
-
+
# XXX: add a limit
$subs = DB_DataObject::factory('subscription');
$subs->subscriber = $profile->id;
if ($idx % SUBSCRIPTIONS_PER_ROW == 1) {
common_element_start('div', 'row');
}
-
+
$other = Profile::staticGet($subs->subscribed);
-
+
common_element_start('a', array('title' => ($other->fullname) ?
$other->fullname :
$other->nickname,
$other->fullname :
$other->nickname));
common_element_end('a');
-
+
if ($idx % SUBSCRIPTIONS_PER_ROW == 0) {
common_element_end('div');
}
-
+
if ($idx == SUBSCRIPTIONS) {
break;
}
if ($page > 1) {
common_element_start('span', 'floatLeft width25');
- common_element('a', array('href' => common_local_url('showstream',
+ common_element('a', array('href' => common_local_url('showstream',
array('nickname' => $profile->nickname,
'page' => $page-1)),
'class' => 'newer'),
_t('Newer'));
common_element_end('span');
}
-
+
if ($cnt > NOTICES_PER_PAGE) {
common_element_start('span', 'floatRight width25');
- common_element('a', array('href' => common_local_url('showstream',
+ common_element('a', array('href' => common_local_url('showstream',
array('nickname' => $profile->nickname,
'page' => $page+1)),
'class' => 'older'),
_t('Older'));
common_element_end('span');
}
-
+
# XXX: show a link for the next page
common_element_end('div');
}
common_element_end('div');
}
-
+
function show_notice($notice) {
$profile = $notice->getProfile();
# XXX: RDFa