public function onEndShowThreadedNoticeTail(NoticeListItem $nli, Notice $notice, array $notices) { if ($this->prerender_replyforms) { $nli->out->elementStart('li', array('class' => 'notice-reply', 'style' => 'display: none;')); $replyForm = new NoticeForm($nli->out, array('inreplyto' => $notice->getID())); $replyForm->show(); $nli->out->elementEnd('li'); } return true; }
/** * Same as the parent, but not including the @-whoever in replies * * @return void */ function showNoticeForm() { $content = $this->trimmed('status_textarea'); if (!$content) { $replyto = $this->trimmed('replyto'); $inreplyto = $this->trimmed('inreplyto'); } else { // @fixme most of these bits above aren't being passed on above $inreplyto = null; } $notice_form = new NoticeForm($this, '', $content, null, $inreplyto); $notice_form->show(); }
/** * Show notice form. * * MAY overload if no notice form needed... or direct message box???? * * @return nothing */ function showNoticeForm() { $notice_form = new NoticeForm($this); $notice_form->show(); }
/** * 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, '', $content, null, $inreplyto); $notice_form->show(); }
/** * 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'); $profile = Profile::staticGet('nickname', $replyto); if ($profile) { $content = '@' . $profile->nickname . ' '; } } $notice_form = new NoticeForm($this, '', $content); $notice_form->show(); }
/** * Show notice form. * * MAY overload if no notice form needed... or direct message box???? * * @return nothing */ function showNoticeForm() { // 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'); if ($tag == 'status') { // We're actually showing the placeholder form, // but we special-case the 'Status' tab as if // it were a small version of it. $attrs['class'] .= ' current'; } $this->elementStart('li', $attrs); $this->element('a', array('href' => 'javascript:SN.U.switchInputFormTab("' . $tag . '")'), $title); $this->elementEnd('li'); } $this->elementEnd('ul'); $attrs = array('class' => 'input_form current', 'id' => 'input_form_placeholder'); $this->elementStart('div', $attrs); $form = new NoticePlaceholderForm($this); $form->show(); $this->elementEnd('div'); foreach ($tabs as $tag => $title) { $attrs = array('class' => 'input_form', 'id' => 'input_form_' . $tag); $this->elementStart('div', $attrs); $form = null; if (Event::handle('StartMakeEntryForm', array($tag, $this, &$form))) { if ($tag == 'status') { $options = $this->noticeFormOptions(); $form = new NoticeForm($this, $options); } Event::handle('EndMakeEntryForm', array($tag, $this, $form)); } if (!empty($form)) { $form->show(); } $this->elementEnd('div'); } } $this->elementEnd('div'); }
/** * Constructor * * @param HTMLOutputter $out output channel * @param string $action action to return to, if any * @param string $content content to pre-fill */ function __construct($out = null, $action = null, $content = null, $post_action = null, $user = null) { parent::__construct($out, $action, $content, $user); $this->post_action = $post_action; }
/** * Show notice form. * * MAY overload if no notice form needed... or direct message box???? * * @return nothing */ function showNoticeForm() { // TRANS: Tab on the notice form. $tabs = array('status' => array('title' => _m('TAB', 'Status'), 'href' => common_local_url('newnotice'))); $this->elementStart('div', 'input_forms'); $this->element('label', array('for' => 'input_form_nav'), _m('TAB', 'Share your:')); if (Event::handle('StartShowEntryForms', array(&$tabs))) { $this->elementStart('ul', array('class' => 'nav', 'id' => 'input_form_nav')); foreach ($tabs as $tag => $data) { $tag = htmlspecialchars($tag); $attrs = array('id' => 'input_form_nav_' . $tag, 'class' => 'input_form_nav_tab'); if ($tag == 'status') { $attrs['class'] .= ' current'; } $this->elementStart('li', $attrs); $this->element('a', array('onclick' => 'return SN.U.switchInputFormTab("' . $tag . '");', 'href' => $data['href']), $data['title']); $this->elementEnd('li'); } $this->elementEnd('ul'); foreach ($tabs as $tag => $data) { $attrs = array('class' => 'input_form', 'id' => 'input_form_' . $tag); if ($tag == 'status') { $attrs['class'] .= ' current'; } $this->elementStart('div', $attrs); $form = null; if (Event::handle('StartMakeEntryForm', array($tag, $this, &$form))) { if ($tag == 'status') { $options = $this->noticeFormOptions(); $form = new NoticeForm($this, $options); } Event::handle('EndMakeEntryForm', array($tag, $this, $form)); } if (!empty($form)) { $form->show(); } $this->elementEnd('div'); } } $this->elementEnd('div'); }
/** * // XXX: Should we be showing the notice form with microapps here? * * 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; } $this->elementStart('div', 'input_forms'); $this->elementStart('div', array('id' => 'input_form_status', 'class' => 'input_form current nonav')); $notice_form = new NoticeForm($this, array('content' => $content, 'inreplyto' => $inreplyto)); $notice_form->show(); $this->elementEnd('div'); $this->elementEnd('div'); }