本文整理汇总了PHP中FSS_Settings::Get方法的典型用法代码示例。如果您正苦于以下问题:PHP FSS_Settings::Get方法的具体用法?PHP FSS_Settings::Get怎么用?PHP FSS_Settings::Get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FSS_Settings
的用法示例。
在下文中一共展示了FSS_Settings::Get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
function __construct()
{
parent::__construct();
$mainframe = JFactory::getApplication();
global $option;
$aparams = FSS_Settings::GetViewSettingsObj('kb');
$this->_enable_prod_pages = $aparams->get('main_prod_pages', 0);
if ($this->_enable_prod_pages == 1) {
$limit = $mainframe->getUserStateFromRequest('global.list.limit_prod', 'limit', FSS_Settings::Get('kb_prod_per_page'), 'int');
$limitstart = FSS_Input::getInt('limitstart');
// In case limit has been changed, adjust it
$limitstart = $limit != 0 ? floor($limitstart / $limit) * $limit : 0;
$this->setState('limit_prod', $limit);
$this->setState('limitstart', $limitstart);
}
$this->_enable_art_pages = $aparams->get('cat_art_pages', 0);
if ($this->_enable_art_pages == 1) {
$limit = $mainframe->getUserStateFromRequest('global.list.limit_art', 'limit', FSS_Settings::Get('kb_art_per_page'), 'int');
$limitstart = FSS_Input::getInt('limitstart');
// In case limit has been changed, adjust it
$limitstart = $limit != 0 ? floor($limitstart / $limit) * $limit : 0;
$this->setState('limit_art', $limit);
$this->setState('limitstart', $limitstart);
}
//$aparams = new stdClass();
}
示例2: onContentPrepare
public function onContentPrepare($context, &$row, &$params, $page = 0)
{
if (is_object($row)) {
if (property_exists($row, "id")) {
$context .= "." . $row->id;
}
} else {
if (is_array($row)) {
if (array_key_exists("id", $row)) {
$context .= "." . $row['id'];
}
}
}
FSS_Glossary::$context = $context;
$ignore = FSS_Settings::Get('glossary_ignore');
$option = FSS_Input::getCmd('option');
if (trim($ignore) != "") {
$ignore = explode("\n", $ignore);
foreach ($ignore as $ign) {
$ign = trim($ign);
if ($ign == "") {
continue;
}
if (stripos($context, $ign) !== FALSE) {
return true;
}
if ($option) {
if (stripos($option, $ign) !== FALSE) {
return true;
}
}
}
}
// skip plugin on freestyle components
if (strpos($context, "_fss") > 0) {
return true;
}
// Don't run this plugin when the content is being indexed
if (strpos($context, 'finder.indexer') > 0) {
return true;
}
if (is_object($row)) {
if (!empty($row->noglossary)) {
// skip glossary plugin on fss content
return true;
}
//$row->text .= "\n\n\n<div style='display:none;' id='fss_glossary_context'>$context</div>\n\n\n";
return $this->_glossary($row->text, $params);
} else {
if (is_array($row)) {
//$row['text'] .= "\n\n\n<div style='display:none;' id='fss_glossary_context'>$context</div>\n\n\n";
return $this->_glossary($row['text'], $params);
}
}
//$row .= "<div style='display:none;' id='fss_glossary_context'>$context</div>";
return $this->_glossary($row, $params);
}
示例3: HandleRefresh
function HandleRefresh()
{
$this->do_refresh = FSS_Settings::Get('support_admin_refresh');
if (FSS_Input::getInt("refresh") > 0) {
$output = array();
$output['count'] = $this->count;
header("Content-Type: application/json");
echo json_encode($output);
exit;
}
}
示例4: __construct
function __construct()
{
parent::__construct();
$mainframe = JFactory::getApplication();
global $option;
$limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', FSS_Settings::Get('announce_per_page'), 'int');
$limitstart = FSS_Input::getInt('limitstart', 0);
// In case limit has been changed, adjust it
$limitstart = $limit != 0 ? floor($limitstart / $limit) * $limit : 0;
$this->setState('limit', $limit);
$this->setState('limitstart', $limitstart);
}
示例5: display
function display($tpl = null)
{
if (FSS_Settings::Get('support_only_admin_open')) {
return $this->noPermission("Access Denied", "CREATING_NEW_TICKETS_BY_USERS_IS_CURRENTLY_DISABLED");
}
if (!FSS_Permission::auth("fss.ticket.open", "com_fss.support_user")) {
return FSS_Helper::NoPerm();
}
$mainframe = JFactory::getApplication();
$user = JFactory::getUser();
$userid = $user->get('id');
$this->assign('userid', $userid);
$this->assign('email', '');
// defaults for blank ticket
$this->ticket = new stdClass();
$this->ticket->prodid = FSS_Input::getInt('prodid');
$this->ticket->deptid = FSS_Input::getInt('deptid');
$this->ticket->catid = FSS_Input::getInt('catid');
$this->ticket->priid = FSS_Input::getInt('priid');
$this->ticket->subject = FSS_Input::getString('subject');
$this->ticket->body = FSS_Input::getBBCode('body');
$this->errors['subject'] = '';
$this->errors['body'] = '';
$this->errors['cat'] = '';
$what = FSS_Input::getCmd('what');
// done with ticket, try and save, if not, display any errors
if ($what == "add") {
if ($this->saveTicket()) {
echo "Saved OK!";
exit;
$link = 'index.php?option=com_fss&view=ticket&layout=view&Itemid=' . FSS_Input::getInt('Itemid') . '&ticketid=' . $this->ticketid;
$mainframe->redirect($link);
return;
}
}
$this->product = $this->get('Product');
$this->dept = $this->get('Department');
$this->cats = SupportHelper::getCategories();
$this->pris = SupportHelper::getPriorities();
$this->support_user_attach = FSS_Settings::get('support_user_attach');
$this->fields = FSSCF::GetCustomFields(0, $prodid, $deptid);
parent::display();
}
示例6: __construct
function __construct()
{
parent::__construct();
$mainframe = JFactory::getApplication();
global $option;
// Get pagination request variables
$aparams = FSS_Settings::GetViewSettingsObj('faqs');
$this->_enable_pages = $aparams->get('enable_pages', 1);
$limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', FSS_Settings::Get('faq_per_page'), 'int');
if ($this->_enable_pages == 0) {
$limit = 999999;
}
$limitstart = FSS_Input::getInt('limitstart', 0);
// In case limit has been changed, adjust it
$limitstart = $limit != 0 ? floor($limitstart / $limit) * $limit : 0;
$this->setState('limit', $limit);
$this->setState('limitstart', $limitstart);
$this->_curcatid = FSS_Input::getInt('catid', '');
$this->_search = FSS_Input::getString('search', '');
$this->_catlist = $this->_getCatList();
if ($this->_search != "") {
$this->_curcattitle = JText::_("SEARCH_RESULTS");
$this->_curcatid = -1;
$this->_curcatimage = "/components/com_fss/assets/images/search.png";
} else {
if ($this->_curcatid == "0") {
$this->_curcattitle = JText::_("ALL_FAQS");
$this->_curcatimage = "/components/com_fss/assets/images/allfaqs.png";
} else {
foreach ($this->_catlist as $cat) {
if ($cat['id'] == $this->_curcatid) {
$this->_curcattitle = $cat['title'];
$this->_curcatimage = $cat['image'];
$this->_curcatdesc = $cat['description'];
}
}
}
}
}
示例7: Admin_ForwardHandler
function Admin_ForwardHandler($ticket, $params)
{
$handler_msg = $params['handler_message'];
$user_msg = $params['user_message'];
if (FSS_Settings::Get('support_email_send_empty_handler')) {
if (!$user_msg) {
$user_msg = JText::_("THIS_TICKET_HAS_BEEN_FORWARDED_TO_ANOTHER_HANDLER");
}
// translation message missing, provide english version just in case
if (!$user_msg || $user_msg == "THIS_TICKET_HAS_BEEN_FORWARDED_TO_ANOTHER_HANDLER") {
$user_msg = 'This ticket has been forwarded to another handler';
}
}
if ($handler_msg) {
FSS_EMail::Admin_Forward($ticket, $params['subject'], $handler_msg, $params['files']);
} else {
if ($user_msg) {
FSS_EMail::Admin_Forward($ticket, $params['subject'], $user_msg, $params['files']);
}
}
if ($user_msg) {
FSS_EMail::Admin_Reply($ticket, $params['subject'], $user_msg, $params['files']);
}
}
示例8: listTickets
function listTickets()
{
// load list of tickets to display and then do the generic ticket list page
$pathway = JFactory::getApplication()->getPathway();
$pathway->addItem(JText::_("SUPPORT"));
$def_open = FSS_Ticket_Helper::GetStatusID('def_open');
$tickets = FSS_Input::getCmd('tickets', $def_open);
$this->ticket_list = new SupportTickets();
$this->ticket_list->limitstart = $this->limitstart;
$this->ticket_list->limit = $this->limit;
$this->ticket_list->loadTicketsByStatus($tickets);
$this->ticket_count = $this->ticket_list->ticket_count;
// get refresh settings
$this->refresh = FSS_Input::getInt("refresh");
$this->do_refresh = FSS_Settings::Get('support_admin_refresh');
$this->pagination = new JPaginationEx($this->ticket_count, $this->limitstart, $this->limit);
if (!$this->refresh) {
FSS_Helper::IncludeModal();
}
$this->displayTicketList();
if ($this->refresh) {
exit;
}
}
示例9:
<ul class="nav nav-tabs">
<?php
if (FSS_Input::getString('search') != "") {
?>
<li class="active">
<a href='#' onclick="return false;">
Search
</a>
</li>
<?php
}
?>
<?php
if (!FSS_Settings::Get('support_only_admin_open')) {
?>
<li class='<?php
if (FSS_Input::getCmd('layout') == 'open') {
echo 'active';
}
?>
'>
<a href='<?php
echo FSSRoute::_('index.php?option=com_fss&view=ticket&layout=open');
?>
' style="color: #0049b7 !important;">
<?php
echo JText::_("OPEN_NEW_TICKET");
?>
</a>
示例10: saveReply
function saveReply()
{
$this->removeDraft(FSS_Input::getInt('draft'));
// get posted data
$ticketid = FSS_Input::getInt('ticketid');
$reply_type = FSS_Input::getCmd('reply_type');
$user_message = FSS_Input::getBBCode('body');
$handler_message = FSS_Input::getBBCode('body2');
$subject = FSS_Input::getString('subject');
// load ticket
$ticket = new SupportTicket();
if (!$ticket->load($ticketid)) {
exit;
}
// set up some variables
$user_id = JFactory::getUser()->id;
$handler_id = $user_id;
$old_st = $ticket->getStatus();
$action_name = "";
$action_params = array();
$message_id = 0;
$files_private = 0;
// add signatures to messages
if (FSS_Input::getInt('signature')) {
if ($user_message) {
$user_message .= SupportCanned::AppendSig(FSS_Input::getInt('signature'), $ticket);
}
if ($handler_message) {
$handler_message .= SupportCanned::AppendSig(FSS_Input::getInt('signature'), $ticket);
}
}
$extra_time = 0;
$timestart = 0;
$timeend = 0;
if (FSS_Settings::Get('time_tracking') != "") {
if (FSS_Settings::get('time_tracking_type') == 'se') {
$timestart = strtotime("1970-01-01 " . FSS_Input::getString('timetaken_start'));
$timeend = strtotime("1970-01-01 " . FSS_Input::getString('timetaken_end'));
$extra_time = (int) (($timeend - $timestart) / 60);
} elseif (FSS_Settings::get('time_tracking_type') == 'tm') {
$timestart = strtotime(FSS_Input::getString('timetaken_start'));
$timeend = strtotime(FSS_Input::getString('timetaken_end'));
$extra_time = (int) (($timeend - $timestart) / 60);
} else {
$extra_time = (int) (FSS_Input::getInt('timetaken_hours') * 60 + FSS_Input::getInt('timetaken_mins'));
}
}
// different reply types
switch ($reply_type) {
case 'reply':
// post reply to user
if ($user_message) {
$message_id = $ticket->addMessage($user_message, $subject, $user_id, TICKET_MESSAGE_ADMIN, $extra_time, $timestart, $timeend);
$ticket->addTime($extra_time);
} elseif ($extra_time > 0) {
// no message, add time if needed
$ticket->addTime($extra_time, "", true, $timestart, $timeend);
}
// update status
$new_status = FSS_Input::getInt('reply_status');
$ticket->updateStatus($new_status);
// reassign ticket if needed
if (FSS_Settings::get('support_assign_reply') == 1 && FSS_Input::getInt('dontassign') == 0) {
$ticket->assignHandler($handler_id, TICKET_ASSIGN_TOOK_OWNER);
} elseif (FSS_Settings::get('support_autoassign') == 3 && $ticket->admin_id == 0 && FSS_Input::getInt('dontassign') == 0) {
$ticket->assignHandler($handler_id, TICKET_ASSIGN_ASSIGNED);
}
// call SupportActions handler for admin reply
$action_name = "Admin_Reply";
$action_params = array('subject' => $subject, 'user_message' => $user_message, 'status' => $new_status);
break;
case 'private':
// add message to ticket
if ($handler_message) {
$message_id = $ticket->addMessage($handler_message, $subject, $user_id, TICKET_MESSAGE_PRIVATE, $extra_time, $timestart, $timeend);
$ticket->addTime($extra_time);
} else {
if ($extra_time > 0) {
$ticket->addTime($extra_time, "", true, $timestart, $timeend);
}
}
$files_private = 1;
// call support actions for private comment
$action_name = "Admin_Private";
$action_params = array('subject' => $subject, 'handler_message' => $handler_message);
break;
case 'user':
// update user on ticket
$new_user_id = FSS_Input::getInt("user_id");
$ticket->updateUser($new_user_id);
if ($user_message) {
$message_id = $ticket->addMessage($user_message, $subject, $user_id, TICKET_MESSAGE_ADMIN, $extra_time, $timestart, $timeend);
$ticket->addTime($extra_time);
} else {
if ($extra_time > 0) {
$ticket->addTime($extra_time, "", true, $timestart, $timeend);
$extra_time = 0;
}
}
$action_name = "Admin_ForwardUser";
//.........这里部分代码省略.........
示例11: AddSCEditor
static function AddSCEditor()
{
if (!FSS_Helper::$sceditor) {
if (FSS_Settings::Get('support_sceditor')) {
$document = JFactory::getDocument();
$document->addScript(JURI::root(true) . '/components/com_fss/assets/js/sceditor/jquery.sceditor.bbcode.js');
$document->addScript(JURI::root(true) . '/components/com_fss/assets/js/sceditor/include.sceditor.js');
$document->addScriptDeclaration("var sceditor_emoticons_root = '" . JURI::root(true) . "/components/com_fss/assets/';");
$document->addScriptDeclaration("var sceditor_style_root = '" . JURI::root(true) . "/components/com_fss/assets/js/sceditor/';");
$document->addScriptDeclaration("var sceditor_style_type = '" . FSS_Settings::get('sceditor_content') . "';");
$button_exclude = array();
if (!FSS_Settings::get('sceditor_emoticons')) {
$button_exclude[] = "emoticon";
}
if (FSS_Settings::get('sceditor_buttonhide')) {
$button_exclude[] = str_replace(" ", "", FSS_Settings::get('sceditor_buttonhide'));
}
$document->addScriptDeclaration("var sceditor_toolbar_exclude = '" . implode(",", $button_exclude) . "';");
$document->addStyleSheet(JURI::root(true) . '/components/com_fss/assets/js/sceditor/themes/' . FSS_Settings::get('sceditor_theme') . '.css');
//$document->addStyleSheet(JURI::root(true).'/components/com_fss/assets/js/sceditor/themes/square.css');
}
FSS_Helper::$sceditor = true;
}
}
示例12: doOpenTicket
function doOpenTicket()
{
if (!FSS_Permission::auth("fss.ticket.open", "com_fss.support_user")) {
return FSS_Helper::NoPerm();
}
$mainframe = JFactory::getApplication();
$user = JFactory::getUser();
$userid = $user->get('id');
$this->userid = $userid;
$this->email = '';
$this->admin_create = 0;
$session = JFactory::getSession();
if (FSS_Input::getInt('admincreate') > 0) {
$session->Set("admin_create", FSS_Input::getInt('admincreate'));
if ($session->Get("admin_create") == 1 && FSS_Input::getInt('user_id') > 0) {
$session->Set('admin_create_user_id', FSS_Input::getInt('user_id'));
} else {
if ($session->Get("admin_create") == 2 && (FSS_Input::getString('admin_create_email') || FSS_Input::getString('admin_create_name'))) {
$session->Set('ticket_email', FSS_Input::getEMail('admin_create_email'));
$session->Set('ticket_name', FSS_Input::getString('admin_create_name'));
}
}
}
if ($session->Get("admin_create") == 1) {
$this->admin_create = 1;
$model = $this->getModel();
$this->user = $model->getUser($session->Get('admin_create_user_id'));
} else {
if ($session->Get("admin_create") == 2) {
$this->unreg_email = $session->Get('ticket_email');
$this->unreg_name = $session->Get('ticket_name');
$this->admin_create = 2;
}
}
if (FSS_Settings::Get('support_only_admin_open') && $this->admin_create < 1) {
return $this->noPermission("Access Denied", "CREATING_NEW_TICKETS_BY_USERS_IS_CURRENTLY_DISABLED");
}
// store in session and data for an unregistered ticket
$type = FSS_Input::getCmd('type');
if ($type == "without") {
$email = FSS_Input::getEMail('email');
$name = FSS_Input::getString('name');
if ($name == "") {
$name = $email;
}
if ($email != "") {
$session->Set('ticket_email', $email);
$session->Set('ticket_name', $name);
}
}
if (!$this->ValidateUser('open')) {
return;
}
// defaults for blank ticket
$ticket['priid'] = FSS_Input::getInt('priid', FSS_Settings::get('support_default_priority'));
$ticket['body'] = FSS_Input::GetString('body');
$ticket['subject'] = FSS_Input::GetString('subject');
$ticket['handler'] = FSS_Input::getInt('handler', 0);
$this->ticket = $ticket;
$errors['subject'] = '';
$errors['body'] = '';
$errors['cat'] = '';
$errors['captcha'] = '';
$this->errors = $errors;
$prodid = FSS_Input::getInt('prodid');
// prod id not set, should we display product list???
if ($prodid < 1) {
$this->products = $this->get('Products');
if (count($this->products) > 1) {
$this->search = "";
$pagination = $this->get('ProdPagination');
$this->pagination = $pagination;
$this->limit = $this->get("ProdLimit");
parent::display("product");
return;
} else {
if (count($this->products) == 1) {
$prodid = $this->products[0]['id'];
JRequest::setVar('prodid', $prodid);
//echo "Setting prodid to $prodid<br>";
}
}
}
$this->assign('prodid', $prodid);
$deptid = FSS_Input::getInt('deptid');
// dept id not set, should we display department list?
if ($deptid < 1) {
$this->search = "";
$this->depts = $this->get('Departments');
$this->limit = $this->get("ProdLimit");
if (count($this->depts) > 1) {
$this->pagination = $this->get('DeptPagination');
$this->product = $this->get('Product');
parent::display("department");
return;
} else {
if (count($this->depts) == 1) {
$deptid = $this->depts[0]['id'];
JRequest::setVar('deptid', $deptid);
//echo "Setting deptid to $deptid<br>";
//.........这里部分代码省略.........
示例13: jimport
require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'j3helper.php';
require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'helper.php';
require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'parser.php';
FSS_Helper::StylesAndJS(array('autoscroll'));
$db = JFactory::getDBO();
jimport('joomla.utilities.date');
$query = "SELECT * FROM #__fss_announce";
$where = array();
$where[] = "published = 1";
$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 added DESC ";
if ($params->get('listall') == 0) {
$query .= " LIMIT " . $params->get('dispcount');
}
$maxheight = (int) $params->get('maxheight');
$db->setQuery($query);
$rows = $db->loadAssocList();
$parser = new FSSParser();
$type = FSS_Settings::Get('announcemod_use_custom') ? 2 : 3;
$parser->Load("announcemod", $type);
$parser->SetVar('showdate', $params->get('show_date'));
if ($params->get('viewannounce')) {
$parser->SetVar('readmore', JText::_("READ_MORE"));
}
require JModuleHelper::getLayoutPath('mod_fss_announce');
}
示例14:
<div class="fss_spacer"></div>
<div class="media">
<a class="pull-left" href="#" onclick="return false;">
<img class="media-object" src='<?php
echo JURI::root(true);
?>
/components/com_fss/assets/images/tags-64x64.png' width='64' height='64'>
</a>
<div class="media-body">
<div style="min-height: 64px">
<h4 class="media-heading">
<?php
if (FSS_Settings::Get('faq_cat_prefix')) {
?>
<?php
echo JText::_("FAQS");
?>
<?php
}
?>
<?php
echo JText::_('TAGS');
?>
</h4>
</div>
示例15: displaySingleProduct
function displaySingleProduct()
{
$this->product = $this->get('Product');
$this->products = $this->get('Products');
FSS_Translate_Helper::TrSingle($this->product);
FSS_Translate_Helper::Tr($this->products);
$mainframe = JFactory::getApplication();
$pathway = $mainframe->getPathway();
if (FSS_Helper::NeedBaseBreadcrumb($pathway, array('view' => 'test'))) {
$pathway->addItem(JText::_('TESTIMONIALS'), FSSRoute::_('index.php?option=com_fss&view=test'));
}
$pathway->addItem($this->product['title']);
// no product then general testimonials
if (!$this->product && count($this->products) > 0) {
$this->product = array();
$this->product['title'] = JText::_('GENERAL_TESTIMONIALS');
$this->product['id'] = 0;
$this->product['description'] = '';
$this->product['image'] = '/components/com_fss/assets/images/generaltests.png';
}
if ($this->test_always_prod_select) {
$this->comments->show_item_select = 1;
} else {
$this->comments->show_item_select = 0;
}
$this->comments->PerPage(FSS_Settings::Get('test_comments_per_page'));
parent::display("single");
}