/** * @param $row * @param KunenaForumCategory $category * @param KunenaForumTopic $topic * @param $subject * * @return string */ protected function showForm($row, KunenaForumCategory $category, KunenaForumTopic $topic, $subject) { $canPost = $this->canPost($category, $topic); if (!$canPost) { if (!$this->user->exists()) { $this->debug("showForm: Public posting is not permitted, show login instead"); $login = KunenaLogin::getInstance(); $loginlink = $login->getLoginURL(); $registerlink = $login->getRegistrationURL(); $this->msg = JText::sprintf('PLG_KUNENADISCUSS_LOGIN_OR_REGISTER', '"' . $loginlink . '"', '"' . $registerlink . '"'); } else { $this->debug("showForm: Unfortunately you cannot discuss this item"); $this->msg = JText::_('PLG_KUNENADISCUSS_NO_PERMISSION_TO_POST'); } } $this->open = $this->params->get('quickpost_open', false); $this->name = JRequest::getString('name', $this->user->getName(), 'POST'); $this->email = JRequest::getString('email', null, 'POST'); $this->message = JRequest::getString('message', null, 'POST'); ob_start(); $this->debug("showForm: Rendering form"); include __DIR__ . "/tmpl/form.php"; $str = ob_get_contents(); ob_end_clean(); return $str; }