function prepare($argarray)
{
$this->args =& common_copy_args($argarray);
+
+ if ($this->boolean('ajax')) {
+ StatusNet::setAjax(true);
+ }
+
return true;
}
{
if (Event::handle('StartShowHTML', array($this))) {
$this->startHTML();
+ $this->flush();
Event::handle('EndShowHTML', array($this));
}
if (Event::handle('StartShowHead', array($this))) {
$this->showHead();
+ $this->flush();
Event::handle('EndShowHead', array($this));
}
if (Event::handle('StartShowBody', array($this))) {
{
$this->element('title', null,
// TRANS: Page title. %1$s is the title, %2$s is the site name.
- sprintf(_("%1\$s - %2\$s"),
+ sprintf(_('%1$s - %2$s'),
$this->title(),
common_config('site', 'name')));
}
function title()
{
// TRANS: Page title for a page without a title set.
- return _("Untitled page");
+ return _('Untitled page');
}
/**
$this->elementStart('div', array('id' => 'wrap'));
if (Event::handle('StartShowHeader', array($this))) {
$this->showHeader();
+ $this->flush();
Event::handle('EndShowHeader', array($this));
}
$this->showCore();
+ $this->flush();
if (Event::handle('StartShowFooter', array($this))) {
$this->showFooter();
+ $this->flush();
Event::handle('EndShowFooter', array($this));
}
$this->elementEnd('div');
*/
function showNoticeForm()
{
- $tabs = array('status' => _('Status'));
+ // TRANS: Tab on the notice form.
+ $tabs = array('status' => _m('TAB','Status'));
$this->elementStart('div', 'input_forms');
if (Event::handle('StartShowEntryForms', array(&$tabs))) {
-
$this->elementStart('ul', array('class' => 'nav',
'id' => 'input_form_nav'));
foreach ($tabs as $tag => $title) {
-
$attrs = array('id' => 'input_form_nav_'.$tag,
'class' => 'input_form_nav_tab');
$this->elementEnd('div');
foreach ($tabs as $tag => $title) {
-
$attrs = array('class' => 'input_form',
'id' => 'input_form_'.$tag);
if (Event::handle('StartMakeEntryForm', array($tag, $this, &$form))) {
if ($tag == 'status') {
- $form = new NoticeForm($this);
+ $options = $this->noticeFormOptions();
+ $form = new NoticeForm($this, $options);
}
Event::handle('EndMakeEntryForm', array($tag, $this, $form));
}
$this->elementEnd('div');
}
+ function noticeFormOptions()
+ {
+ return array();
+ }
+
/**
* Show anonymous message.
*
$this->elementStart('div', array('id' => 'site_nav_local_views_wrapper'));
if (Event::handle('StartShowLocalNavBlock', array($this))) {
$this->showLocalNavBlock();
+ $this->flush();
Event::handle('EndShowLocalNavBlock', array($this));
}
if (Event::handle('StartShowContentBlock', array($this))) {
$this->showContentBlock();
+ $this->flush();
Event::handle('EndShowContentBlock', array($this));
}
if (Event::handle('StartShowAside', array($this))) {
$this->showAside();
+ $this->flush();
Event::handle('EndShowAside', array($this));
}
$this->elementEnd('div');
// Need to have this ID for CSS; I'm too lazy to add it to
// all menus
$this->elementStart('div', array('id' => 'site_nav_local_views'));
+ // Cheat cheat cheat!
$this->showLocalNav();
$this->elementEnd('div');
}
+ /**
+ * If there's a logged-in user, show a bit of login context
+ *
+ * @return nothing
+ */
+
+ function showProfileBlock()
+ {
+ if (common_logged_in()) {
+ $block = new DefaultProfileBlock($this);
+ $block->show();
+ }
+ }
+
/**
* Show local navigation.
*
{
$this->elementStart('div', array('id' => 'aside_primary',
'class' => 'aside'));
+ $this->showProfileBlock();
if (Event::handle('StartShowObjectNavBlock', array($this))) {
$this->showObjectNavBlock();
Event::handle('EndShowObjectNavBlock', array($this));