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


PHP FD::language方法代码示例

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


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

示例1: getResource

 /**
  * Processes .view and .language from the javascript calls.
  *
  * @since	1.0
  * @access	public
  * @param	string
  * @return
  */
 public function getResource()
 {
     $resources = JRequest::getVar('resource');
     if ($resources) {
         // Load language files
         $lang = FD::language();
         $lang->loadSite();
         $lang->loadAdmin();
         foreach ($resources as &$resource) {
             $resource = (object) $resource;
             $result = false;
             if ($resource->type == 'view') {
                 $result = $this->getView($resource->name);
             }
             if ($resource->type == 'language') {
                 $result = $this->getLanguage($resource->name);
             }
             if ($result !== false) {
                 $resource->content = $result;
             }
         }
     }
     header('Content-type: text/x-json; UTF-8');
     echo json_encode($resources);
     exit;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:34,代码来源:foundry.php

示例2: display

 public function display($tpl = null)
 {
     $auth = JRequest::getString('auth');
     // Get the current logged in user's information
     $model = FD::model('Users');
     $id = $model->getUserIdFromAuth($auth);
     $userId = JRequest::getInt('userid');
     // If user id is not passed in, return logged in user
     if (!$userId) {
         $userId = $id;
     }
     // If we still can't find user's details, throw an error
     if (!$userId) {
         $this->set('code', 403);
         $this->set('message', JText::_('Invalid user id provided.'));
         return parent::display();
     }
     $me = FD::user($id);
     $user = FD::user($userId);
     $this->set('id', $userId);
     $this->set('isself', $id == $userId);
     $this->set('isfriend', $user->isFriends($id));
     $this->set('isfollower', $user->isFollowed($id));
     $this->set('username', $user->username);
     $this->set('friend_count', $user->getTotalFriends());
     $this->set('follower_count', $user->getTotalFollowing());
     $this->set('badges', $user->getTotalBadges());
     $this->set('points', $user->getPoints());
     $this->set('avatar_thumb', $user->getAvatar());
     $birthday = $user->getFieldValue('BIRTHDAY');
     if (!empty($birthday)) {
         $this->set('age', $birthday->value->toAge());
     }
     $gender = $user->getFieldValue('GENDER');
     $this->set('gender', !empty($gender) ? $gender->data : 0);
     // Prepare DISPLAY custom fields
     FD::language()->loadAdmin();
     // FD::apps()->loadAllLanguages();
     $steps = FD::model('steps')->getSteps($user->profile_id, SOCIAL_TYPE_PROFILES, SOCIAL_PROFILES_VIEW_DISPLAY);
     $fields = FD::model('fields')->getCustomFields(array('profile_id' => $user->profile_id, 'data' => true, 'dataId' => $user->id, 'dataType' => SOCIAL_TYPE_USER, 'visible' => SOCIAL_PROFILES_VIEW_DISPLAY));
     $library = FD::fields();
     $args = array(&$user);
     $library->trigger('onGetValue', SOCIAL_FIELDS_GROUP_USER, $fields, $args);
     // Get the step mapping first
     $profileSteps = array();
     foreach ($steps as $step) {
         $profileSteps[$step->id] = JText::_($step->title);
     }
     $profileFields = array();
     foreach ($fields as $field) {
         $value = (string) $field->value;
         if (!empty($value)) {
             $data = array('group_id' => $field->step_id, 'group_name' => $profileSteps[$field->step_id], 'field_id' => $field->id, 'field_name' => JText::_($field->title), 'field_value' => (string) $field->value);
             $profileFields[] = $data;
         }
     }
     $this->set('more_info', $profileFields);
     $this->set('code', 200);
     parent::display();
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:60,代码来源:view.json.php

示例3: getInput

 protected function getInput()
 {
     FD::language()->loadAdmin();
     FD::language()->loadSite();
     FD::page()->start();
     JFactory::getDocument()->addStylesheet(rtrim(JURI::root(), '/') . '/administrator/components/com_easysocial/themes/default/styles/style.css');
     $theme = FD::themes();
     $label = (string) $this->element['label'];
     $name = (string) $this->name;
     if ($this->value) {
         $category = FD::table('EventCategory');
         $category->load($this->value);
         $label = $category->get('title');
     }
     $theme->set('name', $name);
     $theme->set('id', $this->id);
     $theme->set('value', $this->value);
     $theme->set('label', $label);
     $output = $theme->output('admin/jfields/eventcategory');
     // We do not want to process stylesheets on Joomla 2.5 and below.
     $options = array();
     if (FD::version()->getVersion() < 3) {
         $options['processStylesheets'] = false;
     }
     FD::page()->end($options);
     return $output;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:27,代码来源:eventcategory.php

示例4: getResource

 /**
  * Processes .view and .language from the javascript calls.
  *
  * @since	1.0
  * @access	public
  * @param	string
  * @return
  */
 public function getResource()
 {
     $resources = JRequest::getVar('resource');
     if ($resources) {
         // Load language support for front end and back end.
         $lang = FD::language();
         $lang->loadSite();
         $lang->loadAdmin();
         foreach ($resources as &$resource) {
             $resource = (object) $resource;
             // Get the current method.
             $method = 'get' . ucfirst($resource->type);
             if (!method_exists($this, $method)) {
                 continue;
             }
             // Pass the resource over.
             $result = self::$method($resource->name);
             if ($result !== false) {
                 $resource->content = $result;
             }
         }
     }
     header('Content-type: text/x-json; UTF-8');
     echo FD::json()->encode($resources);
     exit;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:34,代码来源:foundry.php

示例5: getInput

 /**
  * Method to get the field input markup.
  *
  * @return  string	The field input markup.
  * @since   1.6
  */
 protected function getInput()
 {
     // Load the language file.
     FD::language()->loadAdmin();
     // Render the headers
     FD::page()->start();
     // Attach dialog's css file.
     JFactory::getDocument()->addStylesheet(rtrim(JURI::root(), '/') . '/administrator/components/com_easysocial/themes/default/styles/style.css');
     $theme = FD::themes();
     $label = (string) $this->element['label'];
     $name = (string) $this->name;
     $title = JText::_('COM_EASYSOCIAL_JFIELD_SELECT_BADGE');
     if ($this->value) {
         $badge = FD::table('Badge');
         $badge->load($this->value);
         $title = $badge->get('title');
     }
     $theme->set('name', $name);
     $theme->set('id', $this->id);
     $theme->set('value', $this->value);
     $theme->set('label', $label);
     $theme->set('title', $title);
     $output = $theme->output('admin/jfields/badge');
     // We do not want to process stylesheets on Joomla 2.5 and below.
     $options = array();
     if (FD::version()->getVersion() < 3) {
         $options['processStylesheets'] = false;
     }
     FD::page()->end($options);
     return $output;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:37,代码来源:badge.php

示例6: getInput

 protected function getInput()
 {
     FD::language()->loadAdmin();
     FD::language()->loadSite();
     FD::page()->start();
     JFactory::getDocument()->addStylesheet(rtrim(JURI::root(), '/') . '/administrator/components/com_easysocial/themes/default/styles/style.css');
     $theme = FD::themes();
     $label = (string) $this->element['label'];
     $name = (string) $this->name;
     $title = JText::_('COM_EASYSOCIAL_JFIELD_SELECT_EVENT');
     if ($this->value) {
         $id = explode(':', $this->value);
         $id = $id[0];
         $group = FD::group($id);
         $title = $group->getName();
     }
     $theme->set('name', $name);
     $theme->set('id', $this->id);
     $theme->set('value', $this->value);
     $theme->set('label', $label);
     $theme->set('title', $title);
     $output = $theme->output('admin/jfields/event');
     // We do not want to process stylesheets on Joomla 2.5 and below.
     $options = array();
     if (FD::version()->getVersion() < 3) {
         $options['processStylesheets'] = false;
     }
     FD::page()->end($options);
     return $output;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:30,代码来源:event.php

示例7: request

 /**
  * Displays the registration request
  *
  * @since   1.3
  * @access  public
  * @param   string
  * @return
  */
 public function request()
 {
     $id = $this->input->getInt('id');
     $table = JTable::getInstance('Module');
     $table->load($id);
     FD::language()->load('mod_easysocial_registration_requester', JPATH_SITE);
     $params = FD::registry($table->params);
     $profileId = $params->get('profile_id');
     // If there's no profile id, then we automatically assign the default profile id
     if (empty($profileId)) {
         $profileModel = FD::model('profiles');
         $defaultProfile = $profileModel->getDefaultProfile();
         $profileId = $defaultProfile->id;
     }
     $fieldsModel = FD::model('fields');
     $options = array('visible' => SOCIAL_PROFILES_VIEW_MINI_REGISTRATION, 'profile_id' => $profileId);
     $fields = $fieldsModel->getCustomFields($options);
     if (!empty($fields)) {
         FD::language()->loadAdmin();
         $fieldsLib = FD::fields();
         $session = JFactory::getSession();
         $registration = FD::table('Registration');
         $registration->load($session->getId());
         $data = $registration->getValues();
         $args = array(&$data, &$registration);
         $fieldsLib->trigger('onRegisterMini', SOCIAL_FIELDS_GROUP_USER, $fields, $args);
     }
     $theme = FD::themes();
     $theme->set('params', $params);
     $theme->set('config', FD::config());
     $theme->set('fields', $fields);
     $output = $theme->output('site/registration/dialog.request');
     return $this->ajax->resolve($output);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:42,代码来源:view.ajax.php

示例8: getInput

 protected function getInput()
 {
     // Load the language file.
     FD::language()->loadAdmin();
     // Render the headers
     FD::page()->start();
     $theme = FD::themes();
     $label = (string) $this->element['label'];
     $name = (string) $this->name;
     $title = JText::_('COM_EASYSOCIAL_JFIELD_SELECT_PROFILE');
     if ($this->value) {
         $profile = FD::table('Profile');
         $profile->load($this->value);
         $title = $profile->get('title');
     }
     $theme->set('name', $name);
     $theme->set('id', $this->id);
     $theme->set('value', $this->value);
     $theme->set('label', $label);
     $theme->set('title', $title);
     $output = $theme->output('admin/jfields/profile');
     // We do not want to process stylesheets on Joomla 2.5 and below.
     $options = array();
     if (FD::version()->getVersion() < 3) {
         $options['processStylesheets'] = false;
     }
     FD::page()->end($options);
     return $output;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:29,代码来源:profile.php

示例9: display

 /**
  * Default user listings page.
  *
  * @since	1.0
  * @access	public
  * @param	null
  * @return	null
  */
 public function display($tpl = null)
 {
     $this->setHeading('COM_EASYSOCIAL_HEADING_ALBUMS');
     $this->setDescription('COM_EASYSOCIAL_DESCRIPTION_ALBUMS');
     // Get the model
     $model = FD::model('Albums', array('initState' => true));
     // Get filter states.
     $ordering = JRequest::getVar('ordering', $model->getState('ordering'));
     $direction = JRequest::getVar('direction', $model->getState('direction'));
     $limit = $model->getState('limit');
     $published = $model->getState('published');
     $search = JRequest::getVar('search', $model->getState('search'));
     // Add Joomla buttons
     JToolbarHelper::deleteList();
     // Get albums
     $albums = $model->getDataWithState();
     // Load frontend language files
     FD::language()->loadSite();
     // Get pagination from model
     $pagination = $model->getPagination();
     $callback = JRequest::getVar('callback', '');
     $this->set('ordering', $ordering);
     $this->set('limit', $limit);
     $this->set('direction', $direction);
     $this->set('callback', $callback);
     $this->set('search', $search);
     $this->set('published', $published);
     $this->set('pagination', $pagination);
     $this->set('albums', $albums);
     echo parent::display('admin/albums/default');
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:39,代码来源:view.html.php

示例10: display

 /**
  * Responsible to display the generic login form.
  *
  * @since	1.0
  * @access	public
  */
 public function display($tpl = null)
 {
     $my = FD::user();
     // If user is already logged in, they should not see this page.
     if ($my->id > 0) {
         return $this->redirect(FRoute::dashboard(array(), false));
     }
     // Add page title
     FD::page()->title(JText::_('COM_EASYSOCIAL_LOGIN_PAGE_TITLE'));
     // Add breadcrumb
     FD::page()->breadcrumb(JText::_('COM_EASYSOCIAL_LOGIN_PAGE_BREADCRUMB'));
     // Facebook codes.
     $facebook = FD::oauth('Facebook');
     $config = FD::config();
     $loginMenu = $config->get('general.site.login');
     // Get any callback urls.
     $return = FD::getCallback();
     // If return value is empty, always redirect back to the dashboard
     if (!$return) {
         // Determine if there's a login redirection
         $urlFromCaller = FD::input()->getVar('return', '');
         if ($urlFromCaller) {
             $return = $urlFromCaller;
         } else {
             if ($loginMenu != 'null') {
                 $return = FRoute::getMenuLink($loginMenu);
             } else {
                 $return = FRoute::dashboard(array(), false);
             }
             $return = base64_encode($return);
         }
     } else {
         $return = base64_encode($return);
     }
     if ($config->get('registrations.enabled')) {
         $profileId = $config->get('registrations.mini.profile', 'default');
         if ($profileId === 'default') {
             $profileId = Foundry::model('profiles')->getDefaultProfile()->id;
         }
         $options = array('visible' => SOCIAL_PROFILES_VIEW_MINI_REGISTRATION, 'profile_id' => $profileId);
         $fieldsModel = Foundry::model('fields');
         $fields = $fieldsModel->getCustomFields($options);
         if (!empty($fields)) {
             FD::language()->loadAdmin();
             $fieldsLib = FD::fields();
             $session = JFactory::getSession();
             $registration = FD::table('Registration');
             $registration->load($session->getId());
             $data = $registration->getValues();
             $args = array(&$data, &$registration);
             $fieldsLib->trigger('onRegisterMini', SOCIAL_FIELDS_GROUP_USER, $fields, $args);
             $this->set('fields', $fields);
         }
     }
     $this->set('return', $return);
     $this->set('facebook', $facebook);
     return parent::display('site/login/default');
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:64,代码来源:view.html.php

示例11: getInstance

 /**
  * The notification class is always a singleton object.
  *
  * @since	1.0
  * @access	public
  */
 public static function getInstance()
 {
     if (is_null(self::$instance)) {
         // Just to be sure that the language files on the front end is loaded
         FD::language()->loadSite();
         self::$instance = new self();
     }
     return self::$instance;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:15,代码来源:notification.php

示例12: loadStoryForm

 public function loadStoryForm()
 {
     FD::checkToken();
     FD::requireLogin();
     FD::language()->loadAdmin();
     $categoryid = FD::input()->getInt('id', 0);
     $category = FD::table('EventCategory');
     $category->load($categoryid);
     $db = FD::db();
     $sql = $db->sql();
     $sql->select('#__social_fields', 'a');
     $sql->column('a.*');
     $sql->column('d.element');
     $sql->leftjoin('#__social_fields_steps', 'b');
     $sql->on('a.step_id', 'b.id');
     $sql->leftjoin('#__social_clusters_categories', 'c');
     $sql->on('b.uid', 'c.id');
     $sql->leftjoin('#__social_apps', 'd');
     $sql->on('a.app_id', 'd.id');
     $sql->where('b.type', SOCIAL_TYPE_CLUSTERS);
     $sql->where('c.id', $category->id);
     $sql->where('d.group', SOCIAL_FIELDS_GROUP_EVENT);
     $sql->where('d.type', SOCIAL_APPS_TYPE_FIELDS);
     $sql->where('d.element', array('startend', 'title', 'description'), 'in');
     $db->setQuery($sql);
     $result = $db->loadObjectList();
     $theme = FD::themes();
     foreach ($result as $row) {
         $field = FD::table('Field');
         $field->bind($row);
         $params = $field->getParams();
         if ($row->element === 'startend') {
             $dateFormat = $params->get('date_format', 'DD-MM-YYYY');
             if ($params->get('allow_time', true)) {
                 $dateFormat .= ' ' . $params->get('time_format', 'hh:mm A');
             }
             if ($params->get('allow_timezone', true)) {
                 $theme->set('timezones', $this->getTimezones());
             }
             $theme->set('dateFormat', $dateFormat);
             $theme->set('allowTimezone', $params->get('allow_timezone', 1));
             $theme->set('allowTime', $params->get('allow_time', 1));
             $theme->set('yearfrom', $params->get('yearfrom'));
             $theme->set('yearto', $params->get('yearto'));
             $theme->set('disallowPast', $params->get('disallow_past', 0));
             $theme->set('minuteStepping', $params->get('minute_stepping', 15));
         }
         if ($row->element === 'title') {
             $theme->set('titlePlaceholder', $field->get('title'));
         }
         if ($row->element === 'description') {
             $theme->set('descriptionPlaceholder', $field->get('description'));
         }
     }
     FD::ajax()->resolve($theme->output('apps/user/events/story/panel.form'));
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:56,代码来源:events.php

示例13: preview

 /**
  * Previews an email
  *
  * @since	1.0
  * @access	public
  */
 public function preview()
 {
     // Get the id.
     $id = JRequest::getInt('id');
     $mail = FD::table('Mailer');
     $mail->load($id);
     // Load front end language file
     FD::language()->loadSite();
     echo $mail->preview();
     exit;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:17,代码来源:view.html.php

示例14: getCount

 /**
  * Renders the comment count for Komento
  *
  * @since	5.0
  * @access	public
  * @param	string
  * @return	
  */
 public function getCount(EasyBlogPost $post)
 {
     if (!$this->exists()) {
         return;
     }
     FD::language()->load('com_easysocial', JPATH_ROOT);
     $url = $post->getPermalink();
     $comments = FD::comments($post->id, 'blog', SOCIAL_APPS_GROUP_USER, $url);
     $count = $comments->getCount();
     return $count;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:19,代码来源:easysocial.php

示例15: getTnc

 /**
  * Retrieves the terms and conditions for the app
  *
  * @since	1.0
  * @access	public
  * @param	string
  * @return
  */
 public function getTnc()
 {
     // User's need to be logged in
     FD::requireLogin();
     // Load back end language files
     FD::language()->loadAdmin();
     $ajax = FD::ajax();
     $theme = FD::themes();
     $output = $theme->output('site/apps/dialog.install');
     return $ajax->resolve($output);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:19,代码来源:view.ajax.php


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