static function PageSubTitle2($title, $usejtext = true) { if ($usejtext) { $title = JText::_($title); } return str_replace("\$1", $title, FSF_Settings::get('display_h3')); }
</div> <?php } ?> </div> </div> <?php if ($this->tmpl) { echo "</div>"; } ?> <?php include JPATH_SITE . DS . 'components' . DS . 'com_fsf' . DS . '_powered.php'; if (FSF_Settings::get('glossary_faqs')) { echo FSF_Glossary::Footer(); } ?> <?php if ($this->tmpl) { echo "</div>"; } ?> <?php echo $this->tmpl ? FSF_Helper::PageStylePopupEnd() : FSF_Helper::PageStyleEnd(); ?> <script>
static function getAdminPermissions() { if (empty(FSF_Ticket_Helper::$_permissions)) { $mainframe = JFactory::getApplication(); global $option; $user = JFactory::getUser(); $userid = $user->id; $db = JFactory::getDBO(); $query = "SELECT * FROM #__fsf_user WHERE user_id = '" . FSFJ3Helper::getEscaped($db, $userid) . "'"; $db->setQuery($query); FSF_Ticket_Helper::$_permissions = $db->loadAssoc(); if (!FSF_Ticket_Helper::$_permissions) { FSF_Ticket_Helper::$_permissions['mod_kb'] = 0; FSF_Ticket_Helper::$_permissions['mod_test'] = 0; FSF_Ticket_Helper::$_permissions['support'] = 0; FSF_Ticket_Helper::$_permissions['seeownonly'] = 1; FSF_Ticket_Helper::$_permissions['autoassignexc'] = 1; FSF_Ticket_Helper::$_permissions['allprods'] = 1; FSF_Ticket_Helper::$_permissions['allcats'] = 1; FSF_Ticket_Helper::$_permissions['alldepts'] = 1; FSF_Ticket_Helper::$_permissions['artperm'] = 0; FSF_Ticket_Helper::$_permissions['id'] = 0; FSF_Ticket_Helper::$_permissions['groups'] = 0; FSF_Ticket_Helper::$_permissions['reports'] = 0; FSF_Ticket_Helper::$_permissions['settings'] = ''; } FSF_Ticket_Helper::$_permissions['userid'] = $userid; FSF_Ticket_Helper::$_perm_only = ''; FSF_Ticket_Helper::$_perm_prods = ''; FSF_Ticket_Helper::$_perm_depts = ''; FSF_Ticket_Helper::$_perm_cats = ''; FSF_Ticket_Helper::$_permissions['perm_where'] = ''; // // check for permission overrides for Joomla 1.6 if (FSF_Settings::get('perm_article_joomla') || FSF_Settings::get('perm_mod_joomla')) { if (FSF_Helper::Is16()) { $newart = 0; $newmod = 0; $user = JFactory::getUser(); if ($user->authorise('core.edit.own', 'com_fsf')) { $newart = 1; } if ($user->authorise('core.edit', 'com_fsf')) { $newart = 2; $newmod = 1; } if ($user->authorise('core.edit.state', 'com_fsf')) { $newart = 3; $newmod = 1; } if (FSF_Settings::get('perm_article_joomla') && $newart > FSF_Ticket_Helper::$_permissions['artperm']) { FSF_Ticket_Helper::$_permissions['artperm'] = $newart; } if (FSF_Settings::get('perm_mod_joomla') && $newmod > FSF_Ticket_Helper::$_permissions['mod_kb']) { FSF_Ticket_Helper::$_permissions['mod_kb'] = $newmod; } // } else { $newart = 0; $newmod = 0; $user = JFactory::getUser(); if ($user->authorize('com_fsf', 'create', 'content', 'own')) { $newart = 1; } if ($user->authorize('com_fsf', 'edit', 'content', 'own')) { $newart = 2; $newmod = 1; } if ($user->authorize('com_fsf', 'publish', 'content', 'all')) { $newart = 3; $newmod = 1; } if (FSF_Settings::get('perm_article_joomla') && $newart > FSF_Ticket_Helper::$_permissions['artperm']) { FSF_Ticket_Helper::$_permissions['artperm'] = $newart; } if (FSF_Settings::get('perm_mod_joomla') && $newmod > FSF_Ticket_Helper::$_permissions['mod_kb']) { FSF_Ticket_Helper::$_permissions['mod_kb'] = $newmod; } } } } return FSF_Ticket_Helper::$_permissions; }
function ParserPopulateTicket(&$parser, $row) { $parser->Clear(); if ($row) { $parser->SetVar('ref', $row['reference']); $parser->SetVar('subject', "<a href='" . FSFRoute::_('index.php?option=com_fsf&view=admin&layout=support&ticketid=' . $row['id']) . "'>" . $row['title'] . "</a>"); $parser->SetVar("status", "<span style='color:" . $row['color'] . ";'>" . $row['status'] . "</span>"); if ($row['user_id'] == 0) { $name = $row['unregname'] . " (" . JText::_("UNREG") . ")"; } else { $name = $row['name']; } $parser->SetVar("name", $name); $parser->SetVar("lastactivity", FSF_Helper::Date($row['lastupdate'], FSF_DATETIME_SHORT)); $parser->SetVar("opened", FSF_Helper::Date($row['opened'], FSF_DATETIME_SHORT)); $parser->SetVar("closed", FSF_Helper::Date($row['closed'], FSF_DATETIME_SHORT)); $parser->SetVar("department", $row['department']); $parser->SetVar("category", $row['category']); $parser->SetVar("product", $row['product']); $parser->SetVar("priority", "<span style='color:" . $row['pricolor'] . ";'>" . $row['priority'] . "</span>"); $groups = implode(", ", $row['groups']); $parser->SetVar('groups', $groups); $parser->SetVar('deletebutton', 'deletebutton'); $parser->SetVar('archivebutton', 'archivebutton'); if (array_key_exists("custom", $row)) { $allcustom = array(); if (count($row['custom']) > 0) { foreach ($row['custom'] as $id => $value) { if (array_key_exists($id, $this->customfields)) { $field = $this->customfields[$id]; if ($field['type'] == "plugin") { $aparams = FSFCF::GetValues($field); if (array_key_exists("plugin", $aparams) && array_key_exists("plugindata", $aparams)) { $plugin = FSFCF::get_plugin($aparams['plugin']); $value = $plugin->Display($value, $aparams['plugindata'], array('ticketid' => $row['id'], 'userid' => $row['user_id'], 'ticket' => $row), $field['id']); } } $text = "<span class='fsf_support_fieldname'>" . $this->customfields[$id]['description'] . "</span>"; if ($this->customfields[$id]['type'] == "checkbox") { if ($value == "on") { $value = JText::_("Yes"); } else { $value = JText::_("No"); } } $parser->SetVar("custom" . $id, $value); $parser->SetVar("custom_" . $id, $value); $allcustom[] = $text . ": " . $value; } } } //echo "All custom : " . implode(", ",$allcustom) . "<br>"; $parser->SetVar("custom", implode(", ", $allcustom)); } if ($row['assigned'] == '') { $parser->SetVar('handlername', JText::_("UNASSIGNED")); } else { $parser->SetVar('handlername', $row['assigned']); } $parser->SetVar('username', $row['username']); $parser->SetVar('email', $row['useremail']); $parser->SetVar('handlerusername', $row['handlerusername']); $parser->SetVar('handleremail', $row['handleremail']); $icons = ""; if (FSF_Settings::get('support_show_msg_counts')) { $icons .= "<span>"; $icons .= "<span style='font-weight:normal;top:-2px;position:relative;padding-right:2px;'>" . $row['msgcount']['total'] . "</span><span style='font-weight:normal;top:-2px;position:relative;padding-right:2px;'>x</span><img src='" . JURI::root(true) . "/components/com_fsf/assets/images/messages.png'>"; $icons .= "</span>"; } $cotime = $this->db_time - strtotime($row['checked_out_time']); if ($cotime < FSF_Settings::get('support_lock_time') && $row['checked_out'] != $this->userid && $row['checked_out'] > 0) { $html = "<div class='fsf_user_tt'>" . $row['co_user']->name . " (" . $row['co_user']->email . ")</div>"; $icons .= "<img class='fsj_tip' src='" . JURI::root(true) . "/components/com_fsf/assets/images/lock.png' title=\"" . JText::_('TICKET_LOCKED') . "::" . $html . "\">"; } else { $icons .= "<img src='" . JURI::root(true) . "/components/com_fsf/assets/images/blank_16.png'>"; } if (!FSF_Settings::get('support_hide_tags')) { if (isset($row['tags'])) { $html = ""; foreach ($row['tags'] as $tag) { $html .= "<div class='fsf_tag_tt'>" . $tag['tag'] . "</div>"; } $icons .= "<img class='fsj_tip' src='" . JURI::root(true) . "/components/com_fsf/assets/images/tag.png' title=\"" . JText::_('TICKET_TAGS') . "::" . $html . "\">"; } else { $icons .= "<img src='" . JURI::root(true) . "/components/com_fsf/assets/images/blank_16.png'>"; } } if (isset($row['attach'])) { $html = "<table class='fsf_attach_tt'>"; foreach ($row['attach'] as $attach) { $html .= "<tr style='border:0px;'><td nowrap style='border:0px;'>" . $attach['filename'] . " </td><td nowrap style='border:0px;'> " . FSF_Helper::display_filesize($attach['size']) . "</td></tr>"; } $html .= "<table>"; $icons .= "<img class='fsj_tip' src='" . JURI::root(true) . "/components/com_fsf/assets/images/attach.png' title=\"" . JText::_('TICKET_ATTACHMENTS') . "::" . $html . "\">"; } else { $icons .= "<img src='" . JURI::root(true) . "/components/com_fsf/assets/images/blank_16.png'>"; } $parser->SetVar('icons', $icons); $delete = "<a href='" . FSFRoute::x('index.php?option=com_fsf&view=admin&layout=support&tickets=' . JRequest::getVar('tickets') . '&delete=' . $row['id']) . "'>"; $delete .= "<img src='" . JURI::root(true) . "/components/com_fsf/assets/images/delete_ticket.png'>"; $delete .= JText::_("DELETE") . "</a>"; $archive = "<a href='" . FSFRoute::x('index.php?option=com_fsf&view=admin&layout=support&tickets=' . JRequest::getVar('tickets') . '&archive=' . $row['id']) . "'>"; $archive .= "<img src='" . JURI::root(true) . "/components/com_fsf/assets/images/archive_ticket.png'>"; $archive .= JText::_("ARCHIVE") . "</a>"; $parser->SetVar('archivebutton', $archive); $parser->SetVar('deletebutton', $delete); // TODO: trhl /*id='ticket_<?php echo $ticket['id'];?>' onmouseover="$('ticket_<?php echo $ticket['id'];?>').style.background = '<?php echo FSF_Settings::get('css_hl'); ?>';$('ticket_<?php echo $ticket['id'];?>_2').style.background = '<?php echo FSF_Settings::get('css_hl'); ?>';" onmouseout="$('ticket_<?php echo $ticket['id'];?>').style.background = '';$('ticket_<?php echo $ticket['id'];?>_2').style.background = '';"*/ $this->_permissions = FSF_Ticket_Helper::getAdminPermissions(); $type = "unassigned"; if ($row['admin_id'] == $this->_permissions['id']) { $type = "mine"; } else { if ($row['admin_id'] > 0) { $type = "other"; } } $style = ""; if (array_key_exists($row['ticket_pri_id'], $this->priorities)) { $pri = $this->priorities[$row['ticket_pri_id']]; if ($pri['backcolor']) { $style .= "background-color: {$pri['backcolor']};"; } } $handler_highlight = "ticket_type_{$type}"; $parser->SetVar('handler_highlight', $handler_highlight); $trhl = " class='ticket_{$row['id']} ' onmouseover='highlightticket({$row['id']})' onmouseout='unhighlightticket({$row['id']})' "; if (FSF_Settings::get('support_entire_row')) { $style .= "cursor: pointer;"; $trhl .= " onclick='window.location=\"" . FSFRoute::x('&limitstart=&ticketid=' . $row['id']) . "\"' "; } $trhl .= " style='{$style}' "; $parser->SetVar('trhl', $trhl); } $parser->SetVar("showassigned", $this->showassigned); $parser->SetVar("hidehandler", FSF_Settings::get('support_hide_handler')); $parser->SetVar("candelete", FSF_Settings::get('support_delete')); $parser->SetVar("view", $this->ticket_view); }
static function Footer() { FSF_Glossary::GetGlossary(); if (count(FSF_Glossary::$fsf_glossary) == 0) { return ""; } $tail = "<div id='glossary_words' style='display:none;'>"; foreach (FSF_Glossary::$fsf_glossary as $word => $tip) { $wordl = strtolower($word); // skip any entries that we havent found a match for if (!array_key_exists($wordl, FSF_Glossary::$all_replaced)) { continue; } $wordl = preg_replace("/[^a-z0-9]/", "", $wordl); if (FSF_Settings::get('glossary_title')) { $tail .= "<div id='glossary_{$wordl}'><h4>{$word}</h4><div class='fsj_gt_inner'>{$tip}</div></div>"; } else { $tail .= "<div id='glossary_{$wordl}'><div class='fsj_gt_inner'>{$tip}</div></div>"; } } $tail .= "</div>"; return $tail; }
function display($tpl = null) { $mainframe = JFactory::getApplication(); JHTML::_('behavior.modal', 'a.fsf_modal'); //JHTML::_('behavior.mootools'); $db = JFactory::getDBO(); $aparams = FSF_Settings::GetViewSettingsObj('glossary'); $this->use_letter_bar = $aparams->get('use_letter_bar', 0); if ($this->use_letter_bar) { $this->letters = array(); if (FSF_Settings::get('glossary_all_letters')) { $letters = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'); foreach ($letters as $letter) { $this->letters[$letter] = 0; } } $qry = "SELECT UPPER(SUBSTR(word,1,1)) as letter FROM #__fsf_glossary"; $where = array(); $where[] = "published = 1"; if (FSF_Helper::Is16()) { $where[] = 'language in (' . $db->Quote(JFactory::getLanguage()->getTag()) . ',' . $db->Quote('*') . ')'; $user = JFactory::getUser(); $where[] = 'access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')'; } if (count($where) > 0) { $qry .= " WHERE " . implode(" AND ", $where); } $qry .= " GROUP BY letter ORDER BY letter"; $db->setQuery($qry); $letters = $db->loadObjectList(); foreach ($letters as $letter) { $this->letters[$letter->letter] = 1; } if (count($this->letters) == 0) { return parent::display("empty"); } } $this->curletter = ""; // if we are showing on a per letter basis only if ($this->use_letter_bar == 2) { $this->curletter = JRequest::getVar('letter', $this->letters[0]->letter); } $where = array(); $where[] = "published = 1"; $query = "SELECT * FROM #__fsf_glossary"; if ($this->curletter) { $where[] = "SUBSTR(word,1,1) = '" . FSFJ3Helper::getEscaped($db, $this->curletter) . "'"; } if (FSF_Helper::Is16()) { $where[] = 'language in (' . $db->Quote(JFactory::getLanguage()->getTag()) . ',' . $db->Quote('*') . ')'; $user = JFactory::getUser(); $where[] = 'access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')'; } if (count($where) > 0) { $query .= " WHERE " . implode(" AND ", $where); } $query .= " ORDER BY word"; $db->setQuery($query); $this->rows = $db->loadObjectList(); $pathway =& $mainframe->getPathway(); if (FSF_Helper::NeedBaseBreadcrumb($pathway, array('view' => 'glossary'))) { $pathway->addItem("Glossary"); } if (FSF_Settings::get('glossary_use_content_plugins')) { // apply plugins to article body $dispatcher =& JDispatcher::getInstance(); JPluginHelper::importPlugin('content'); $art = new stdClass(); if (FSF_Helper::Is16()) { //$aparams = new JParameter(null); } else { $aparams = new stdClass(); } $this->params =& $mainframe->getParams('com_fsf'); foreach ($this->rows as &$row) { if ($row->description) { $art->text = $row->description; $art->noglossary = 1; if (FSF_Helper::Is16()) { $results = $dispatcher->trigger('onContentPrepare', array('com_fsf.glossary', &$art, &$this->params, 0)); } else { $results = $dispatcher->trigger('onPrepareContent', array(&$art, &$this->params, 0)); } $row->description = $art->text; } if ($row->longdesc) { $art->text = $row->longdesc; $art->noglossary = 1; if (FSF_Helper::Is16()) { $results = $dispatcher->trigger('onContentPrepare', array('com_fsf.glossary.long', &$art, &$this->params, 0)); } else { $results = $dispatcher->trigger('onPrepareContent', array(&$art, &$this->params, 0)); } $row->longdesc = $art->text; } } } parent::display($tpl); }
<?php /** * @package Freestyle Joomla * @author Freestyle Joomla * @copyright (C) 2013 Freestyle Joomla * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html **/ defined('_JEXEC') or die; ?> <div style="clear:both;"></div> <?php if (!FSF_Settings::get('hide_powered')) { ?> <div align="center" style="text-align:center;padding-top:20px;"> <a href="http://www.freestyle-joomla.com/"> Powered by Freestyle FAQs <br> <img style="padding-top:2px;" border="0" src="<?php echo JURI::root(true); ?> /components/com_fsf/assets/images/logo_small.png"><br> </a> </div> <?php }
static function GetInstalledVersion() { return FSF_Settings::get('version'); }
function display($tpl = null) { $document = JFactory::getDocument(); $document->addScript(JURI::root() . 'components/com_fsf/assets/js/accordion.js'); require_once JPATH_SITE . DS . 'components' . DS . 'com_fsf' . DS . 'helper' . DS . 'content' . DS . 'faqs.php'; $this->content = new FSF_ContentEdit_FAQs(); $this->content->Init(); $model = $this->getModel(); $model->content = $this->content; $mainframe = JFactory::getApplication(); $faqid = JRequest::getVar('faqid', 0, '', 'int'); $aparams = FSF_Settings::GetViewSettingsObj('faqs'); JHTML::_('behavior.tooltip'); JHTML::_('behavior.modal', 'a.fsf_modal'); JHTML::_('behavior.framework', true); if ($faqid > 0) { $tmpl = JRequest::getVar('tmpl'); $this->assignRef('tmpl', $tmpl); $this->setLayout("faq"); $faq = $this->get("Faq"); $this->assignRef('faq', $faq); if (!$this->faq) { return JError::raiseWarning(404, JText::_('FAQ NOT FOUND')); } $pathway = $mainframe->getPathway(); if (FSF_Helper::NeedBaseBreadcrumb($pathway, array('view' => 'faq'))) { $pathway->addItem(JText::_('FREQUENTLY_ASKED_QUESTIONS'), FSFRoute::x('index.php?option=com_fsf&view=faq')); } $pathway->addItem($faq['title'], FSFRoute::x('&limitstart=&layout=&faqid=&catid=' . $faq['faq_cat_id'])); $pathway->addItem($faq['question']); if (FSF_Settings::get('faq_use_content_plugins')) { // apply plugins to article body $dispatcher = JDispatcher::getInstance(); JPluginHelper::importPlugin('content'); $art = new stdClass(); $art->text = $faq['answer']; $art->noglossary = 1; $this->params = $mainframe->getParams('com_fsf'); if (FSF_Helper::Is16()) { $results = $dispatcher->trigger('onContentPrepare', array('com_fsf.faq', &$art, &$this->params, 0)); } else { $results = $dispatcher->trigger('onPrepareContent', array(&$art, &$this->params, 0)); } $faq['answer'] = $art->text; } // load tags $db =& JFactory::getDBO(); $qry = "SELECT * FROM #__fsf_faq_tags WHERE faq_id IN (" . FSFJ3Helper::getEscaped($db, $faqid) . ") GROUP BY tag ORDER BY tag"; $db->setQuery($qry); $rows = $db->loadObjectList(); $this->tags = array(); foreach ($rows as &$row) { $id = $row->faq_id; $this->tags[] = "<a href='" . FSFRoute::_('index.php?option=com_fsf&view=faq&tag=' . urlencode($row->tag) . '&Itemid=' . JRequest::getVar('Itemid')) . "'>{$row->tag}</a>"; } //$document = JFactory::getDocument(); //$document->setTitle(JText::_("FAQS") . ' - ' . $faq['title']); parent::display(); return; } $pathway = $mainframe->getPathway(); if (FSF_Helper::NeedBaseBreadcrumb($pathway, array('view' => 'faq'))) { $pathway->addItem(JText::_('FREQUENTLY_ASKED_QUESTIONS'), FSFRoute::x('index.php?option=com_fsf&view=faq')); } $always_show_cats = $aparams->get('always_show_cats', 0); $always_show_faqs = $aparams->get('always_show_faqs', 0); $hide_allfaqs = $aparams->get('hide_allfaqs', 0); $show_featured = $aparams->get('show_featured', 0); $hide_tags = $aparams->get('hide_tags', 0); $hide_search = $aparams->get('hide_search', 0); $view_mode = $aparams->get('view_mode', 'questionwithpopup'); $view_mode_cat = $aparams->get('view_mode_cat', 'list'); $view_mode_incat = $aparams->get('view_mode_incat', 'list'); $enable_pages = $aparams->get('enable_pages', 1); $num_cat_colums = $aparams->get('num_cat_colums', 1); if ($num_cat_colums < 1 && !$num_cat_colums) { $num_cat_colums = 1; } if ($view_mode_cat != "list") { $num_cat_colums = 1; } $catlist = $this->get("CatList"); $this->assignRef('catlist', $catlist); $search = $this->get("Search"); $this->assignRef('search', $search); $curcattitle = $this->get("CurCatTitle"); $this->assignRef('curcattitle', $curcattitle); $curcatimage = $this->get("CurCatImage"); $this->assignRef('curcatimage', $curcatimage); $curcatdesc = $this->get("CurCatDesc"); $this->assignRef('curcatdesc', $curcatdesc); $curcatid = $this->get("CurCatID"); // Get data from the model if ($curcatid == -4) { return $this->listTags(); } if ($curcatid == -5) { $curcattitle = "Featured FAQs"; $curcatimage = "/components/com_fsf/assets/images/featured.png"; } $pagination = $this->get('Pagination'); $model = $this->getModel(); $search = $model->_search; if ($search || $curcatid > 0 || JRequest::getVar('catid') != "" || JRequest::getVar('tag') != "") { $view_mode_cat = ""; } if ($view_mode_cat == "inline" || $view_mode_cat == "accordian") { $alldata = $this->get("AllData"); if (FSF_Settings::get('faq_use_content_plugins_list')) { // apply plugins to article body $dispatcher = JDispatcher::getInstance(); JPluginHelper::importPlugin('content'); $art = new stdClass(); foreach ($alldata as &$item) { $art->text = $item['answer']; $art->noglossary = 1; $this->params = $mainframe->getParams('com_fsf'); if (FSF_Helper::Is16()) { $results = $dispatcher->trigger('onContentPrepare', array('com_fsf.faq', &$art, &$this->params, 0)); } else { $results = $dispatcher->trigger('onPrepareContent', array(&$art, &$this->params, 0)); } $item['answer'] = $art->text; } } foreach ($catlist as &$cat) { $catid = $cat['id']; foreach ($alldata as &$faq) { if ($faq['faq_cat_id'] == $catid) { $cat['faqs'][] =& $faq; } } } // inline mode, so if we have featured faqs listed, load the data for those $this->featured_faqs = $this->get('FeaturedFaqs'); } else { $items = $this->get('Data'); if (FSF_Settings::get('faq_use_content_plugins_list')) { // apply plugins to article body $dispatcher = JDispatcher::getInstance(); JPluginHelper::importPlugin('content'); $art = new stdClass(); foreach ($items as &$item) { $art->text = $item['answer']; $art->noglossary = 1; $this->params = $mainframe->getParams('com_fsf'); if (FSF_Helper::Is16()) { $results = $dispatcher->trigger('onContentPrepare', array('com_fsf.faq', &$art, &$this->params, 0)); } else { $results = $dispatcher->trigger('onPrepareContent', array(&$art, &$this->params, 0)); } $item['answer'] = $art->text; } } } // push data into the template $this->assignRef('items', $items); $this->assignRef('pagination', $pagination); $showfaqs = true; $showcats = true; if (JRequest::getVar('tag') != "") { // got tag selected $showfaqs = true; $showcats = false; $curcatid = -2; $pathway = $mainframe->getPathway(); $pathway->addItem(JText::_("TAGS"), FSFRoute::_('index.php?option=com_fsf&view=faq&catid=-4&Itemid=' . JRequest::getVar('Itemid'))); $pathway->addItem(JRequest::getVar('tag')); $curcattitle = JRequest::getVar('tag'); // do we have a category specified??? } else { if (JRequest::getVar('catid', '') == '' && JRequest::getVar('search', '') == '') { // no cat specified if (!$always_show_faqs) { $showfaqs = false; $curcatid = -2; } else { $pathway = $mainframe->getPathway(); $pathway->addItem($curcattitle); } } else { // got a cat specced $pathway = $mainframe->getPathway(); $pathway->addItem($curcattitle); if (!$always_show_cats) { $showcats = false; } } } // load tags $faqids = array(); if ($this->items && is_array($this->items)) { foreach ($this->items as &$item) { $faqids[] = FSFJ3Helper::getEscaped($db, $item['id']); } } $db = JFactory::getDBO(); $this->tags = array(); if (count($faqids) > 0) { $qry = "SELECT * FROM #__fsf_faq_tags WHERE faq_id IN (" . implode(", ", $faqids) . ") GROUP BY tag ORDER BY tag"; $db->setQuery($qry); $rows = $db->loadObjectList(); foreach ($rows as &$row) { $id = $row->faq_id; if (!array_key_exists($id, $this->tags)) { $this->tags[$id] = array(); } $this->tags[$id][] = "<a href='" . FSFRoute::_('index.php?option=com_fsf&view=faq&tag=' . urlencode($row->tag) . '&Itemid=' . JRequest::getVar('Itemid')) . "'>{$row->tag}</a>"; } } // hide tags if none have been set $qry = "SELECT count(*) as cnt FROM #__fsf_faq_tags"; $db->setQuery($qry); $row = $db->loadObject(); if ($row->cnt == 0) { $hide_tags = true; } $this->assign('curcatid', $curcatid); $this->assign('showcats', $showcats); $this->assign('showfaqs', $showfaqs); $this->assign('hide_allfaqs', $hide_allfaqs); $this->assign('show_featured', $show_featured); $this->assign('hide_tags', $hide_tags); $this->assign('hide_search', $hide_search); $this->assign('view_mode', $view_mode); $this->assign('num_cat_colums', $num_cat_colums); $this->assign('view_mode_cat', $view_mode_cat); $this->assign('view_mode_incat', $view_mode_incat); $this->assign('enable_pages', $enable_pages); parent::display($tpl); }
* @package Freestyle Joomla * @author Freestyle Joomla * @copyright (C) 2013 Freestyle Joomla * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html **/ defined('_JEXEC') or die; ?> <script> function ResetElement(tabid) { document.getElementById('tab_' + tabid).style.display = 'none'; document.getElementById('link_' + tabid).style.backgroundColor = ''; document.getElementById('link_' + tabid).onmouseover = function() { this.style.backgroundColor='<?php echo FSF_Settings::get('css_hl'); ?> '; } document.getElementById('link_' + tabid).onmouseout = function() { this.style.backgroundColor=''; } } function ShowTab(tabid) { ResetElement('general'); // // ##NOT_TEST_END## ResetElement('visual'); // ##NOT_TEST_START##
function __construct($total, $limitstart, $limit) { $this->skinstyle = FSF_Settings::get('skin_style'); parent::__construct($total, $limitstart, $limit); }