$notice->find();
- common_start_element('div', 'notices');
+ common_element_start('div', 'notices');
while ($notice->fetch()) {
$this->show_notice($notice);
}
- common_end_element('div');
+ common_element_end('div');
}
}
'height' => AVATAR_PROFILE_SIZE));
}
- common_start_element('form', array('enctype' => 'multipart/form-data',
+ common_element_start('form', array('enctype' => 'multipart/form-data',
'method' => 'POST',
'id' => 'avatar',
'action' =>
'type' => 'submit',
'id' => 'submit'),
_t('Upload'));
+ common_element_end('form');
}
function handle_post() {
if (!is_null($error)) {
common_element('div', array('class' => 'error'), $msg);
}
- common_start_element('form', array('method' => 'POST',
+ common_element_start('form', array('method' => 'POST',
'id' => 'login',
'action' => common_local_url('login')));
common_element('label', array('for' => 'username'),
'type' => 'button',
'id' => 'cancel'),
_t('Cancel'));
+ common_element_end('form');
}
}
}
function show_form() {
- common_start_element('form', array('id' => 'newnotice', 'method' => 'POST',
+ common_element_start('form', array('id' => 'newnotice', 'method' => 'POST',
'action' => common_local_url('newnotice')));
common_element('span', 'nickname', $profile->nickname);
common_element('textarea', array('rows' => 4, 'cols' => 80, 'id' => 'content'));
common_element('input', array('type' => 'submit'), 'Send');
- common_end_element('form');
+ common_element_end('form');
}
}
\ No newline at end of file
common_show_header(_t('Change password'));
$this->settings_menu();
$this->message($msg, $success);
- common_start_element('form', array('method' => 'POST',
+ common_element_start('form', array('method' => 'POST',
'id' => 'password',
'action' =>
common_local_url('password')));
'type' => 'button',
'id' => 'cancel'),
_t('Cancel'));
+ common_element_end('form');
}
function handle_post() {
common_show_header(_t('Profile settings'));
$this->settings_menu();
$this->message($msg, $success);
- common_start_element('form', array('method' => 'POST',
+ common_element_start('form', array('method' => 'POST',
'id' => 'profilesettings',
'action' =>
common_local_url('profilesettings')));
'type' => 'button',
'id' => 'cancel'),
_t('Cancel'));
+ common_element_end('form');
common_show_footer();
}
$notice->find();
- common_start_element('div', 'notices');
+ common_element_start('div', 'notices');
while ($notice->fetch()) {
$this->show_notice($notice);
}
- common_end_element('div');
+ common_element_end('div');
}
}
common_show_header(_t('Login'));
common_element_start('form', array('method' => 'POST',
'id' => 'login',
- 'action' => common_local_url('login')));
+ 'action' => common_local_url('register')));
common_element('label', array('for' => 'username'),
_t('Name'));
common_element('input', array('name' => 'username',
function show_notice($notice) {
$profile = $notice->getProfile();
# XXX: RDFa
- common_start_element('div', array('class' => 'notice'));
+ common_element_start('div', array('class' => 'notice'));
$avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
if ($avatar) {
common_element('img', array('src' => $avatar->url,
($profile->fullname) ? $profile->fullname :
$profile->nickname));
}
- common_start_element('a', array('href' => $profile->profileurl,
- 'class' => 'nickname',
- 'title' =>
- ($profile->fullname) ? $profile->fullname :
- $profile->nickname),
- $profile->nickname);
+ common_element('a', array('href' => $profile->profileurl,
+ 'class' => 'nickname',
+ 'title' =>
+ ($profile->fullname) ? $profile->fullname :
+ $profile->nickname),
+ $profile->nickname);
# FIXME: URL, image, video, audio
common_element('span', array('class' => 'content'),
$notice->content);
common_element('span', array('class' => 'date'),
common_date_string($notice->created));
- common_end_element('div');
+ common_element_end('div');
}
}
}
function notice_form() {
- common_start_element('form', array('id' => 'newnotice', 'method' => 'POST',
+ common_element_start('form', array('id' => 'newnotice', 'method' => 'POST',
'action' => common_local_url('newnotice')));
common_element('textarea', array('rows' => 4, 'cols' => 80, 'id' => 'content'));
common_element('input', array('type' => 'submit'), 'Send');
- common_end_element('form');
+ common_element_end('form');
}
function show_profile($profile) {
- common_start_element('div', 'profile');
+ common_element_start('div', 'profile');
$avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
if ($avatar) {
common_element('img', array('src' => $avatar->url,
}
function show_subscribe_form($profile) {
- common_start_element('form', array('id' => 'subscribe', 'method' => 'POST',
+ common_element_start('form', array('id' => 'subscribe', 'method' => 'POST',
'action' => common_local_url('subscribe')));
common_element('input', array('id' => 'subscribeto',
'name' => 'subscribeto',
'type' => 'hidden',
'value' => $profile->nickname));
common_element('input', array('type' => 'submit'), _t('subscribe'));
- common_end_element('form');
+ common_element_end('form');
}
function show_unsubscribe_form($profile) {
- common_start_element('form', array('id' => 'unsubscribe', 'method' => 'POST',
+ common_element_start('form', array('id' => 'unsubscribe', 'method' => 'POST',
'action' => common_local_url('unsubscribe')));
common_element('input', array('id' => 'unsubscribeto',
'name' => 'unsubscribeto',
'type' => 'hidden',
'value' => $profile->nickname));
common_element('input', array('type' => 'submit'), _t('unsubscribe'));
- common_end_element('form');
+ common_element_end('form');
}
function show_subscriptions($profile) {
# XXX: add a limit
$subs = $profile->getLink('id', 'subscription', 'subscriber');
- common_start_element('div', 'subscriptions');
+ common_element_start('div', 'subscriptions');
$cnt = 0;
while ($subs->fetch()) {
$cnt++;
if ($cnt % SUBSCRIPTIONS_PER_ROW == 1) {
- common_start_element('div', 'row');
+ common_element_start('div', 'row');
}
- common_start_element('a', array('title' => $subs->fullname ||
+ common_element_start('a', array('title' => $subs->fullname ||
$subs->nickname,
'href' => $subs->profileurl,
'class' => 'subscription'));
'width' => AVATAR_MINI_SIZE,
'height' => AVATAR_MINI_SIZE,
'class' => 'avatar mini'));
- common_end_element('a');
+ common_element_end('a');
if ($cnt % SUBSCRIPTIONS_PER_ROW == 0) {
- common_end_element('div');
+ common_element_end('div');
}
if ($cnt == SUBSCRIPTIONS) {
'class' => 'moresubscriptions'),
_t('All subscriptions'));
- common_end_element('div');
+ common_element_end('div');
}
function show_statistics($profile) {
$notice_count = $notice->count();
# Other stats...?
- common_start_element('dl', 'statistics');
+ common_element_start('dl', 'statistics');
common_element('dt', _t('Subscriptions'));
common_element('dd', $subs_count);
common_element('dt', _t('Subscribers'));
common_element('dd', $subbed_count);
common_element('dt', _t('Notices'));
common_element('dd', $notice_count);
- common_end_element('dl');
+ common_element_end('dl');
}
function show_notices($profile) {
$notice->find();
- common_start_element('div', 'notices');
+ common_element_start('div', 'notices');
while ($notice->fetch()) {
$this->show_notice($notice);
}
- common_end_element('div');
+ common_element_end('div');
}
function show_last_notice($profile) {
$subs_count = $subs->find();
- common_start_element('div', 'subscriptions');
+ common_element_start('div', 'subscriptions');
$idx = 0;
while ($subs->fetch()) {
$idx++;
if ($idx % SUBSCRIPTIONS_PER_ROW == 1) {
- common_start_element('div', 'row');
+ common_element_start('div', 'row');
}
- common_start_element('a', array('title' => $subs->fullname ||
+ common_element_start('a', array('title' => $subs->fullname ||
$subs->nickname,
'href' => $subs->profileurl,
'class' => 'subscription'));
'width' => AVATAR_STREAM_SIZE,
'height' => AVATAR_STREAM_SIZE,
'class' => 'avatar stream'));
- common_end_element('a');
+ common_element_end('a');
# XXX: subscribe form here
if ($idx % SUBSCRIPTIONS_PER_ROW == 0) {
- common_end_element('div');
+ common_element_end('div');
}
if ($idx == SUBSCRIPTIONS_PER_PAGE) {
'class' => 'next'),
_t('Next'));
}
- common_end_element('div');
+ common_element_end('div');
}
}
\ No newline at end of file
$subs_count = $subs->find();
- common_start_element('div', 'subscriptions');
+ common_element_start('div', 'subscriptions');
$idx = 0;
while ($subs->fetch()) {
$idx++;
if ($idx % SUBSCRIPTIONS_PER_ROW == 1) {
- common_start_element('div', 'row');
+ common_element_start('div', 'row');
}
- common_start_element('a', array('title' => $subs->fullname ||
+ common_element_start('a', array('title' => $subs->fullname ||
$subs->nickname,
'href' => $subs->profileurl,
'class' => 'subscription'));
'width' => AVATAR_STREAM_SIZE,
'height' => AVATAR_STREAM_SIZE,
'class' => 'avatar stream'));
- common_end_element('a');
+ common_element_end('a');
# XXX: subscribe form here
if ($idx % SUBSCRIPTIONS_PER_ROW == 0) {
- common_end_element('div');
+ common_element_end('div');
}
if ($idx == SUBSCRIPTIONS_PER_PAGE) {
'class' => 'next'),
_t('Next'));
}
- common_end_element('div');
+ common_element_end('div');
}
}
\ No newline at end of file
function show_notice($notice) {
$profile = $notice->getProfile();
# XXX: RDFa
- common_start_element('div', array('class' => 'notice'));
+ common_element_start('div', array('class' => 'notice'));
$avatar = $profile->getAvatar(AVATAR_STREAM_SIZE);
- common_start_element('a', array('href' => $profile->profileurl));
+ common_element_start('a', array('href' => $profile->profileurl));
common_element('img', array('src' => ($avatar) ? $avatar->url : DEFAULT_STREAM_AVATAR,
'class' => 'avatar stream',
'width' => AVATAR_STREAM_SIZE,
'alt' =>
($profile->fullname) ? $profile->fullname :
$profile->nickname));
- common_end_element('a');
+ common_element_end('a');
common_element('a', array('href' => $profile->profileurl,
'class' => 'nickname'),
$profile->nickname);
common_element('a', array('class' => 'notice',
'href' => $noticeurl),
common_date_string($notice->created));
- common_end_element('div');
+ common_element_end('div');
}
}