/** * Ensure a valid template is set * * @return $this */ protected function _beforeToHtml() { if (!$this->getTemplate()) { $this->setTemplate('wordpress/post/view/comment/form.phtml'); } return parent::_beforeToHtml(); }
/** * Setup the comments block * */ protected function _beforeToHtml() { if ($this->getChild('comments')) { $this->getChild('comments')->setPost($this->getPost()); } $this->_initPostViewTemplate(); return parent::_beforeToHtml(); }
/** * Setup the pager and comments form blocks * */ protected function _beforeToHtml() { if (!$this->getTemplate()) { $this->setTemplate('wordpress/post/view/comments.phtml'); } if ($this->getCommentCount() > 0 && ($pagerBlock = $this->getChild('pager')) !== false) { $pagerBlock->setCollection($this->getComments()); } if (($form = $this->getChild('form')) !== false) { $form->setPost($this->getPost()); } parent::_beforeToHtml(); }
/** * Setup the pager and comments form blocks * */ protected function _beforeToHtml() { if (!$this->getTemplate()) { $this->setTemplate('wordpress/post/view/comments.phtml'); } if ($this->getCommentCount() > 0) { if ($pagerBlock = $this->getPagerBlock()) { $pagerBlock->setCollection($this->getComments()); } } if ($commentsFormBlock = $this->getCommentFormBlock()) { $commentsFormBlock->setPost($this->getPost()); } parent::_beforeToHtml(); }
protected function _beforeToHtml() { if (!$this->getTemplate()) { $this->setTemplate('wordpress/post/view/comment/form.phtml'); } if ($this->helper('wordpress')->isPluginEnabled('comment-reply-notification')) { if ($options = Mage::helper('wordpress')->getWpOption('commentreplynotification')) { $options = unserialize($options); if (isset($options['mail_notify'])) { if (in_array($options['mail_notify'], array('parent_check', 'parent_uncheck'))) { $this->setCommentReplyNotificationEnabled(true); if ($options['mail_notify'] === 'parent_check') { $this->setCommentReplyNotificationOptInChecked(true); } } } } } return parent::_beforeToHtml(); }
/** * Gets the post meta block * * @return Mage_Core_Block_Template */ public function getMetaBlock() { return parent::getMetaBlock()->setIncludeNextPreviousLinks(true); }