function OutputRow(&$row) { if (empty($this->parser)) { $this->parser = new FSSParser(); } $row->customfields = $this->customfields; if (!property_exists($this->parser, "priorities")) { $this->parser->priorities = $this->get('priorities'); } if (empty($this->db_time)) { $this->getDBTime(); } $this->parser->userid = $this->userid; $this->parser->db_time = $this->db_time; /*if ($this->layoutpreview) { $this->parser->Load('preview',0); } else {*/ $this->parser->Load(FSS_Settings::get('support_user_template'), 0); //} $this->parser->customfields = $this->customfields; FSSParserTicket::forUser($this->parser, $row); if ($this->cst) { if ($this->cst->is_closed) { $this->parser->SetVar('view', 'closed'); } if ($this->cst->def_archive) { $this->parser->SetVar('view', 'archived'); } } echo $this->parser->Parse(); }
static function ParseSig($text, $ticket, $bbcode = true) { if (!is_object($ticket)) { echo "CALLING PARSESIG WITHOUT TICKET OBJECT!"; exit; } $parser = new FSSParser(); $parser->template = $text; $parser->Clear(); FSSParserTicket::core($parser, $ticket); $user = JFactory::getUser(); $parser->SetVar('handlername', $user->name); $parser->SetVar('handlerusername', $user->username); $parser->SetVar('handleremail', $user->email); $text = $parser->Parse(); if ($bbcode) { return FSS_Helper::ParseBBCode($text); } return $text; }
function getTitle() { return FSSParserTicket::parseTitle($this->title, $this->id); }
function listRow(&$row) { if (empty($this->parser)) { $this->parser = new FSSParser(); } if (!property_exists($this->parser, "priorities")) { $this->parser->priorities = $this->get('priorities'); } if (empty($this->db_time)) { $this->getDBTime(); } if ($this->layoutpreview) { $this->parser->Load('preview', 0); } else { $this->parser->Load(FSS_Settings::get('support_list_template'), 0); } FSSParserTicket::forAdmin($this->parser, $row, $this->customfields); $this->setupParserView(); $session = JFactory::getSession(); if ($this->merge) { if ($this->merge == "related") { $link = FSSRoute::_('index.php?option=com_fss&view=admin_support&task=merge.related&source_id=' . $session->get('merge_ticket_id') . '&dest_id=' . $row->id, false); if ($row->id != $session->get('merge_ticket_id')) { $this->parser->SetVar('mergebutton', "<a href='{$link}' class='btn btn-default btn-small'>" . JText::_('ADD_RELATED') . "</a>"); } } else { if ($this->merge == "into") { $link = FSSRoute::_('index.php?option=com_fss&view=admin_support&task=merge.merge&source_id=' . $session->get('merge_ticket_id') . '&dest_id=' . $row->id, false); } else { $link = FSSRoute::_('index.php?option=com_fss&view=admin_support&task=merge.merge&source_id=' . $row->id . '&dest_id=' . $session->get('merge_ticket_id'), false); } if ($row->id != $session->get('merge_ticket_id') && $row->merged == 0) { $this->parser->SetVar('mergebutton', "<a href='{$link}' class='btn btn-default btn-small'>" . JText::_('TICKET_MERGE') . "</a>"); } } } echo $this->parser->Parse(); }