Esempio n. 1
0
 public function process()
 {
     $this->setPlaceholders($this->post->toArray());
     $this->setPlaceholders(array('post' => $this->post->get('id'), 'participants_usernames' => $this->thread->get('participants_usernames'), 'thread' => $this->thread->get('id'), 'message' => str_replace(array('[', ']'), array('[', ']'), $this->post->br2nl($this->post->get('message')))));
     $this->getAttachments();
     $this->getButtons();
     $this->getThreadSummary();
     /* output form to browser */
     $this->modx->setPlaceholder('discuss.error_panel', $this->discuss->getChunk('disError'));
     $this->modx->setPlaceholders($this->getPlaceholders(), 'fi.');
 }
Esempio n. 2
0
 /**
  * Handle Quote functionality that will append the quoted post into the initial message
  * @return void
  */
 public function handleQuote()
 {
     if (empty($_POST) && !empty($this->scriptProperties['quote'])) {
         $message = str_replace(array('[', ']'), array('[', ']'), $this->post->br2nl($this->post->get('message')));
         $message = '[quote author=' . $this->author->get('username') . ' date=' . strtotime($this->post->get('createdon')) . ']' . $message . '[/quote]' . "\n";
         $this->setPlaceholder('message', $message);
     } elseif (empty($_POST) && empty($this->scriptProperties['quote'])) {
         $this->setPlaceholder('message', '');
     }
 }