当前位置: 首页>>代码示例>>PHP>>正文


PHP FSS_Helper::langEnabled方法代码示例

本文整理汇总了PHP中FSS_Helper::langEnabled方法的典型用法代码示例。如果您正苦于以下问题:PHP FSS_Helper::langEnabled方法的具体用法?PHP FSS_Helper::langEnabled怎么用?PHP FSS_Helper::langEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FSS_Helper的用法示例。


在下文中一共展示了FSS_Helper::langEnabled方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getLink

 function getLink($item)
 {
     if (!FSS_Helper::langEnabled()) {
         $link = $item['link'];
         if ($item['itemid'] > 0) {
             $link .= '&Itemid=' . $item['itemid'];
         }
         $link = JRoute::_($link);
         return $link;
     }
     // if we are a multi language site, then we need to ignore the itemid paramter, and let FSSRoute
     // track down the correct link.
     // for manually added items, just use the link we have stored.
     switch ($item['itemtype']) {
         case FSS_IT_KB:
             $item['link'] = FSSRoute::_('index.php?option=com_fss&view=kb', false);
             break;
         case FSS_IT_FAQ:
             $item['link'] = FSSRoute::_('index.php?option=com_fss&view=faq', false);
             break;
         case FSS_IT_TEST:
             $item['link'] = FSSRoute::_('index.php?option=com_fss&view=test', false);
             break;
         case FSS_IT_NEWTICKET:
             $item['link'] = FSSRoute::_('index.php?option=com_fss&view=ticket&layout=open', false);
             break;
         case FSS_IT_VIEWTICKETS:
             $item['link'] = FSSRoute::_('index.php?option=com_fss&view=ticket', false);
             break;
         case FSS_IT_ANNOUNCE:
             $item['link'] = FSSRoute::_('index.php?option=com_fss&view=announce', false);
             break;
         case FSS_IT_GLOSSARY:
             $item['link'] = FSSRoute::_('index.php?option=com_fss&view=glossary', false);
             break;
         case FSS_IT_ADMIN:
             $item['link'] = FSSRoute::_('index.php?option=com_fss&view=admin', false);
             break;
         case FSS_IT_GROUPS:
             $item['link'] = FSSRoute::_('index.php?option=com_fss&view=admin_groups', false);
             break;
     }
     return $item['link'];
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:44,代码来源:view.html.php

示例2: __construct

 function __construct()
 {
     $this->id = "kb";
     $this->descs = JText::_("KNOWLEDGE_BASE_ARTICLES");
     $this->has_products = 1;
     $this->has_modified = 1;
     $this->has_ordering = 1;
     $this->table = "#__fss_kb_art";
     $this->fields = array();
     $field = new FSS_Content_Field("title", JText::_("TITLE"));
     $field->link = 1;
     $field->search = 1;
     $this->AddField($field);
     $field = new FSS_Content_Field("body", JText::_("ARTICLE"), "text");
     $this->AddField($field);
     $field = new FSS_Content_Field("kb_cat_id", JText::_("CATEGORY"), "lookup");
     $field->lookup_table = "#__fss_kb_cat";
     $field->lookup_required = 1;
     $field->lookup_id = "id";
     $field->lookup_order = "title";
     $field->lookup_title = "title";
     $field->lookup_extra[0] = JText::_('UNCATEGORIZED');
     $field->lookup_select_msg = JText::_("PLEASE_SELECT_A_CATEGORY");
     $field->lookup_nested = true;
     $this->AddField($field);
     // products
     $field = new FSS_Content_Field("allprods", JText::_("SHOW_FOR_ALL_PRODUCTS"), "products");
     $field->required = 0;
     $field->prod_table = "#__fss_kb_art_prod";
     $field->prod_artid = "kb_art_id";
     $field->prod_prodid = "prod_id";
     $field->default = 1;
     $field->prod_msg = JText::_('SHOW_FOR_ALL_PRODUCTS');
     $this->AddField($field);
     // related
     $field = new FSS_Content_Field("related", JText::_("RELATED_ARTICLES"), "related");
     $field->required = 0;
     $field->rel_table = "#__fss_kb_art_related";
     $field->rel_id = "kb_art_id";
     $field->rel_relid = "related_id";
     $field->rel_button_txt = JText::_('ADD_RELATED_ARTICLE');
     // define the lookup form
     $field->rel_lookup_table = "#__fss_kb_art";
     $field->rel_lookup_table_alias = "a";
     $field->rel_lookup_join[] = array('table' => '#__fss_kb_cat', 'source' => 'kb_cat_id', 'dest' => 'id', 'alias' => 'c');
     $field->rel_lookup_join[] = array('table' => '#__users', 'source' => 'author', 'dest' => 'id', 'alias' => 'u');
     $field->rel_lookup_id = "id";
     $field->rel_lookup_display = array('a.title' => array('desc' => JText::_('TITLE'), 'alias' => 'title'), 'c.title' => array('desc' => JText::_('CATEGORY'), 'alias' => 'category'), 'a.published' => array('desc' => JText::_('PUBLISHED'), 'alias' => 'published', 'type' => 'published'), 'u.name' => array('desc' => JText::_('USER'), 'alias' => 'user'));
     $field->rel_lookup_search = array("a.title", 'a.body');
     $field->rel_lookup_pick_field = "a.title";
     $field->rel_lookup_order = "a.title";
     $field->AddFilter(new FSS_Content_Filter("kb_cat_id", "id", "title", "#__fss_kb_cat", "title", "CATEGORY", "", "", true));
     $field->rel_display = "title";
     $this->AddField($field);
     if (empty(FSSAdminHelper::$langs)) {
         FSSAdminHelper::LoadLanguages();
         FSSAdminHelper::LoadAccessLevels();
     }
     $filter_langs = array();
     $filter_access = array();
     $field = new FSS_Content_Field("language", JText::_("LANGUAGE"), "lookup", "lang_art");
     $field->lookup_required = 1;
     $field->lookup_id = "id";
     $field->lookup_title = "title";
     $field->default = "*";
     foreach (FSSAdminHelper::$langs as $lang) {
         $filter_langs[$lang->value] = $lang->text;
         $field->lookup_extra[$lang->value] = $lang->text;
     }
     if (!FSS_Helper::langEnabled()) {
         $field->hide = 1;
     }
     $this->AddField($field);
     $field = new FSS_Content_Field("access", JText::_("Access"), "lookup");
     $field->lookup_required = 1;
     $field->lookup_id = "id";
     $field->lookup_title = "title";
     $field->default = 1;
     foreach (FSSAdminHelper::$access_levels as $lang) {
         $filter_access[$lang->value] = $lang->text;
         $field->lookup_extra[$lang->value] = $lang->text;
     }
     $this->AddField($field);
     $this->list = array();
     $this->list[] = "title";
     $this->list[] = "kb_cat_id";
     if (FSS_Helper::langEnabled()) {
         $this->list[] = "language";
     }
     $this->list[] = "access";
     $this->edit = array();
     $this->edit[] = "kb_cat_id";
     $this->edit[] = "title";
     $this->edit[] = "allprods";
     $this->edit[] = "language";
     $this->edit[] = "access";
     $this->edit[] = "body";
     $this->edit[] = "related";
     $this->order = "modified DESC";
     $this->link = "index.php?option=com_fss&view=kb&kbartid=%ID%";
//.........这里部分代码省略.........
开发者ID:vstorm83,项目名称:propertease,代码行数:101,代码来源:kb.php

示例3: __construct

 function __construct()
 {
     $this->id = "announce";
     $this->descs = JText::_("Announcements");
     $this->table = "#__fss_announce";
     $this->has_added = 1;
     $this->fields = array();
     $field = new FSS_Content_Field("title", JText::_("TITLE"));
     $field->link = 1;
     $field->search = 1;
     $this->AddField($field);
     $field = new FSS_Content_Field("subtitle", JText::_("DESCRIPTION_FOR_MODULE"));
     $field->search = 1;
     $field->required = 0;
     $this->AddField($field);
     $field = new FSS_Content_Field("featured", JText::_("Featured"));
     $this->AddField($field);
     if (empty(FSSAdminHelper::$langs)) {
         FSSAdminHelper::LoadLanguages();
         FSSAdminHelper::LoadAccessLevels();
     }
     $filter_langs = array();
     $filter_access = array();
     $field = new FSS_Content_Field("language", JText::_("LANGUAGE"), "lookup", "lang_art");
     $field->lookup_required = 1;
     $field->lookup_id = "id";
     $field->lookup_title = "title";
     foreach (FSSAdminHelper::$langs as $lang) {
         $filter_langs[$lang->value] = $lang->text;
         $field->lookup_extra[$lang->value] = $lang->text;
     }
     if (!FSS_Helper::langEnabled()) {
         $field->hide = 1;
     }
     $this->AddField($field);
     $field = new FSS_Content_Field("access", JText::_("Access"), "lookup");
     $field->lookup_required = 1;
     $field->lookup_id = "id";
     $field->lookup_title = "title";
     $field->default = 1;
     foreach (FSSAdminHelper::$access_levels as $lang) {
         $filter_access[$lang->value] = $lang->text;
         $field->lookup_extra[$lang->value] = $lang->text;
     }
     $this->AddField($field);
     $field = new FSS_Content_Field("body", JText::_("ARTICLE"), "text");
     $field->show_pagebreak = 1;
     $field->more = "fulltext";
     $this->AddField($field);
     $this->list = array();
     $this->list[] = "title";
     if (FSS_Helper::langEnabled()) {
         $this->list[] = "language";
     }
     $this->list[] = "access";
     $this->edit = array();
     $this->edit[] = "title";
     $this->edit[] = "subtitle";
     $this->edit[] = "language";
     $this->edit[] = "access";
     $this->edit[] = "body";
     $this->order = "added DESC";
     $this->link = "index.php?option=com_fss&view=announce&announceid=%ID%";
     $this->list_added = 1;
     if (FSS_Helper::langEnabled()) {
         $filter = new FSS_Content_Filter("language", "id", "title", "", "", "SELECT_LANGUAGE", "lang_filter", $filter_langs);
         $this->AddFilter($filter);
     }
     $filter = new FSS_Content_Filter("access", "id", "title", "", "", "SELECT_ACCESS", "", $filter_access);
     $this->AddFilter($filter);
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:71,代码来源:announce.php

示例4: __construct

 function __construct()
 {
     $this->id = "glossary";
     $this->descs = JText::_("Glossary");
     $this->table = "#__fss_glossary";
     $this->fields = array();
     $field = new FSS_Content_Field("word", JText::_("Word"));
     $field->link = 1;
     $field->search = 1;
     $this->AddField($field);
     if (empty(FSSAdminHelper::$langs)) {
         FSSAdminHelper::LoadLanguages();
         FSSAdminHelper::LoadAccessLevels();
     }
     $filter_langs = array();
     $filter_access = array();
     $field = new FSS_Content_Field("language", JText::_("LANGUAGE"), "lookup", "lang_art");
     $field->lookup_required = 1;
     $field->lookup_id = "id";
     $field->lookup_title = "title";
     foreach (FSSAdminHelper::$langs as $lang) {
         $filter_langs[$lang->value] = $lang->text;
         $field->lookup_extra[$lang->value] = $lang->text;
     }
     if (!FSS_Helper::langEnabled()) {
         $field->hide = 1;
     }
     $this->AddField($field);
     $field = new FSS_Content_Field("access", JText::_("Access"), "lookup");
     $field->lookup_required = 1;
     $field->lookup_id = "id";
     $field->lookup_title = "title";
     $field->default = 1;
     foreach (FSSAdminHelper::$access_levels as $lang) {
         $filter_access[$lang->value] = $lang->text;
         $field->lookup_extra[$lang->value] = $lang->text;
     }
     $this->AddField($field);
     $field = new FSS_Content_Field("description", JText::_("DESCRIPTION"), "text");
     $field->show_pagebreak = 0;
     $this->AddField($field);
     $field = new FSS_Content_Field("longdesc", JText::_("Long Description"), "text");
     $field->show_pagebreak = 1;
     $field->required = false;
     $this->AddField($field);
     $this->list = array();
     $this->list[] = "word";
     if (FSS_Helper::langEnabled()) {
         $this->list[] = "language";
     }
     $this->list[] = "access";
     $this->edit = array();
     $this->edit[] = "word";
     $this->edit[] = "language";
     $this->edit[] = "access";
     $this->edit[] = "description";
     $this->edit[] = "longdesc";
     $this->order = "word ASC";
     $this->link = "";
     $this->list_added = 0;
     if (FSS_Helper::langEnabled()) {
         $filter = new FSS_Content_Filter("language", "id", "title", "", "", "SELECT_LANGUAGE", "lang_filter", $filter_langs);
         $this->AddFilter($filter);
     }
     $filter = new FSS_Content_Filter("access", "id", "title", "", "", "SELECT_ACCESS", "", $filter_access);
     $this->AddFilter($filter);
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:67,代码来源:glossary.php

示例5: __construct

 function __construct()
 {
     $this->id = "faqs";
     $this->descs = JText::_("FAQS");
     $this->has_ordering = 1;
     $this->table = "#__fss_faq_faq";
     $this->fields = array();
     $field = new FSS_Content_Field("question", JText::_("QUESTION"), "long");
     $field->link = 1;
     $field->search = 1;
     $this->AddField($field);
     $field = new FSS_Content_Field("faq_cat_id", JText::_("CATEGORY"), "lookup");
     $field->lookup_table = "#__fss_faq_cat";
     $field->lookup_required = 1;
     $field->lookup_id = "id";
     $field->lookup_order = "title";
     $field->lookup_title = "title";
     $field->lookup_select_msg = JText::_("PLEASE_SELECT_A_CATEGORY");
     $this->AddField($field);
     $field = new FSS_Content_Field("answer", JText::_("ANSWER"), "text");
     $field->search = 1;
     $field->more = "fullanswer";
     $this->AddField($field);
     $field = new FSS_Content_Field("featured", JText::_("Featured"), "checkbox");
     $field->required = false;
     $this->AddField($field);
     $field = new FSS_Content_Field("tags", JText::_("Tags"), "tags");
     $field->tags_table = "#__fss_faq_tags";
     $field->tags_key = "faq_id";
     $field->required = 0;
     $this->AddField($field);
     if (empty(FSSAdminHelper::$langs)) {
         FSSAdminHelper::LoadLanguages();
         FSSAdminHelper::LoadAccessLevels();
     }
     $filter_langs = array();
     $filter_access = array();
     $field = new FSS_Content_Field("language", JText::_("LANGUAGE"), "lookup", "lang_art");
     $field->lookup_required = 1;
     $field->lookup_id = "id";
     $field->lookup_title = "title";
     foreach (FSSAdminHelper::$langs as $lang) {
         $filter_langs[$lang->value] = $lang->text;
         $field->lookup_extra[$lang->value] = $lang->text;
     }
     if (!FSS_Helper::langEnabled()) {
         $field->hide = 1;
     }
     $this->AddField($field);
     $field = new FSS_Content_Field("access", JText::_("Access"), "lookup");
     $field->lookup_required = 1;
     $field->lookup_id = "id";
     $field->lookup_title = "title";
     $field->default = 1;
     foreach (FSSAdminHelper::$access_levels as $lang) {
         $filter_access[$lang->value] = $lang->text;
         $field->lookup_extra[$lang->value] = $lang->text;
     }
     $this->AddField($field);
     $this->list = array();
     $this->list[] = "question";
     $this->list[] = "faq_cat_id";
     $this->list[] = "featured";
     if (FSS_Helper::langEnabled()) {
         $this->list[] = "language";
     }
     $this->list[] = "access";
     $this->edit = array();
     $this->edit[] = "faq_cat_id";
     $this->edit[] = "question";
     $this->edit[] = "featured";
     $this->edit[] = "language";
     $this->edit[] = "access";
     $this->edit[] = "answer";
     $this->edit[] = "tags";
     $this->order = "ordering DESC";
     $this->link = "index.php?option=com_fss&view=faq&faqid=%ID%";
     $filter = new FSS_Content_Filter("faq_cat_id", "id", "title", "#__fss_faq_cat", "title", "CATEGORY");
     $this->AddFilter($filter);
     if (FSS_Helper::langEnabled()) {
         $filter = new FSS_Content_Filter("language", "id", "title", "", "", "SELECT_LANGUAGE", "lang_filter", $filter_langs);
         $this->AddFilter($filter);
     }
     $filter = new FSS_Content_Filter("access", "id", "title", "", "", "SELECT_ACCESS", "", $filter_access);
     $this->AddFilter($filter);
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:86,代码来源:faqs.php


注:本文中的FSS_Helper::langEnabled方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。