- $this->startHTML('text/xml;charset=utf-8', true);
- $this->elementStart('head');
- $this->element('title', null, _('New notice'));
- $this->elementEnd('head');
- $this->elementStart('body');
-
- $form = new NoticeForm($this);
- $form->show();
-
- $this->elementEnd('body');
- $this->elementEnd('html');
- }
-
- /**
- * Formerly page output
- *
- * This used to be the whole page output; now that's been largely
- * subsumed by showPage. So this just stores an error message, if
- * it was passed, and calls showPage.
- *
- * Note that since we started doing Ajax output, this page is rarely
- * seen.
- *
- * @param string $msg An error message, if any
- *
- * @return void
- */
- function showForm($msg=null)
- {
- if ($this->boolean('ajax')) {
- if ($msg) {
- $this->ajaxErrorMsg($msg);
- } else {
- $this->ajaxShowForm();
- }
- return;
- }
-
- $this->msg = $msg;
- $this->showPage();
- }
-
- /**
- * Overload for replies or bad results
- *
- * We show content in the notice form if there were replies or results.
- *
- * @return void
- */
- function showNoticeForm()
- {
- $content = $this->trimmed('status_textarea');
- if (!$content) {
- $replyto = $this->trimmed('replyto');
- $inreplyto = $this->trimmed('inreplyto');
- $profile = Profile::staticGet('nickname', $replyto);
- if ($profile) {
- $content = '@' . $profile->nickname . ' ';
- }
- } else {
- // @fixme most of these bits above aren't being passed on above
- $inreplyto = null;
- }
-
- $notice_form = new NoticeForm($this, array('content' => $content,
- 'inreplyto' => $inreplyto));
-
- $notice_form->show();
- }
-
- /**
- * Show an error message
- *
- * Shows an error message if there is one.
- *
- * @return void
- *
- * @todo maybe show some instructions?
- */
- function showPageNotice()
- {
- if ($this->msg) {
- $this->element('p', array('id' => 'error'), $this->msg);