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


PHP FD::themes方法代码示例

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


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

示例1: item

 /**
  * Default method to display the registration page.
  *
  * @since	1.0
  * @access	public
  * @author	Mark Lee <mark@stackideas.com>
  */
 function item($tpl = null)
 {
     // Check for user profile completeness
     FD::checkCompleteProfile();
     $config = FD::config();
     if (!$config->get('badges.enabled')) {
         return $this->redirect(FRoute::dashboard(array(), false));
     }
     // Get id of badge
     $id = JRequest::getInt('id');
     $badge = FD::table('Badge');
     $badge->load($id);
     if (!$id || !$badge->id) {
         FD::info()->set(JText::_('COM_EASYSOCIAL_BADGES_INVALID_BADGE_ID_PROVIDED'), SOCIAL_MSG_ERROR);
         $this->redirect(FRoute::badges());
         $this->close();
     }
     // Load the badge language
     $badge->loadLanguage();
     // Set the page title
     FD::page()->title($badge->get('title'));
     // Set the page breadcrumb
     FD::page()->breadcrumb(JText::_('COM_EASYSOCIAL_PAGE_TITLE_BADGES'), FRoute::badges());
     FD::page()->breadcrumb($badge->get('title'));
     // Get the badges model
     $options = array('start' => 0, 'limit' => FD::themes()->getConfig()->get('achieverslimit', 50));
     $achievers = $badge->getAchievers($options);
     $totalAchievers = $badge->getTotalAchievers();
     $this->set('totalAchievers', $totalAchievers);
     $this->set('achievers', $achievers);
     $this->set('badge', $badge);
     parent::display('site/badges/default.item');
 }
开发者ID:ppantilla,项目名称:bbninja,代码行数:40,代码来源:view.html.php

示例2: profileHeaderB

 public function profileHeaderB($key, $user, $field)
 {
     // Get the data
     $data = $field->data;
     if (!$data) {
         return;
     }
     $my = FD::user();
     $privacyLib = FD::privacy($my->id);
     if (!$privacyLib->validate('core.view', $field->id, SOCIAL_TYPE_FIELD, $user->id)) {
         return;
     }
     $obj = FD::makeObject($data);
     $theme = FD::themes();
     $hide = true;
     foreach ($obj as $k => &$v) {
         $v = $theme->html('string.escape', $v);
         if (!empty($v)) {
             $hide = false;
         }
     }
     if ($hide) {
         return true;
     }
     $params = $field->getParams();
     // Convert country to full text
     if (!empty($obj->country)) {
         $obj->country_code = $obj->country;
         $obj->country = SocialFieldsUserAddressHelper::getCountryName($obj->country, $params->get('data_source'));
     }
     $theme->set('value', $obj);
     $theme->set('params', $field->getParams());
     echo $theme->output('fields/user/address/widgets/display');
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:34,代码来源:view.html.php

示例3: confirmDelete

 /**
  * Displays confirmation before deleting an album
  *
  * @since	1.0
  * @access	public
  * @param	string
  * @return
  */
 public function confirmDelete()
 {
     $ajax = FD::ajax();
     $theme = FD::themes();
     $output = $theme->output('admin/albums/dialog.delete');
     return $ajax->resolve($output);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:15,代码来源:view.ajax.php

示例4: editor

 /**
  * Displays the markitup html
  *
  * @since	1.2
  * @access	public
  * @param	string
  * @return
  */
 public function editor($nameAttribute, $value = '', $config = array(), $attributes = array())
 {
     $theme = FD::themes();
     $uniqueId = uniqid();
     $attr = '';
     if (!empty($attributes)) {
         foreach ($attributes as $key => $val) {
             $attr .= ' ' . $key . '="' . $val . '"';
         }
     }
     // Determines if we should display the file browser
     $files = isset($config['files']) && $config['files'] ? true : false;
     // Determine the correct uid and type
     $uid = isset($config['uid']) ? $config['uid'] : FD::user()->id;
     $type = isset($config['type']) ? $config['type'] : SOCIAL_TYPE_USER;
     if (isset($config['controllerName'])) {
         $theme->set('controllerName', $config['controllerName']);
     }
     $theme->set('uid', $uid);
     $theme->set('type', $type);
     $theme->set('files', $files);
     $theme->set('value', $value);
     $theme->set('attr', $attr);
     $theme->set('nameAttribute', $nameAttribute);
     $theme->set('uniqueId', $uniqueId);
     $output = $theme->output('site/bbcode/editor');
     return $output;
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:36,代码来源:bbcode.php

示例5: getLoginButton

 /**
  * Renders a login button.
  *
  * @since	1.0
  * @access	public
  */
 public function getLoginButton($uid, $type, $callback = '', $permissions = array(), $display = 'popup')
 {
     $theme = FD::themes();
     // Check if the user has already authenticated.
     $table = FD::table('OAuth');
     $exists = $table->load(array('uid' => $uid, 'type' => $type));
     if ($exists) {
         $output = $theme->output('site/login/linkedin.authenticated');
     } else {
         $callback = urlencode($callback);
         // Ensure that the callback is urlencoded
         $callback = trim(JURI::root(), '/') . '/administrator/index.php?option=com_easysocial&controller=oauth&task=grant&client=linkedin&uid=' . $uid . '&type=' . $type . '&callback=' . $callback;
         $this->setCallbackUrl($callback);
         $requestToken = $this->retrieveTokenRequest();
         $_SESSION['oauth']['linkedin']['request'] = $requestToken['linkedin'];
         $url = LINKEDIN::_URL_AUTH . $requestToken['linkedin']['oauth_token'];
         $theme->set('url', $url);
         $theme->set('appId', $this->appId);
         $theme->set('appSecret', $this->appSecret);
         $theme->set('callback', $callback);
         $theme->set('permissions', $permissions);
         $output = $theme->output('site/login/linkedin');
     }
     return $output;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:31,代码来源:consumer.php

示例6: confirmRestore

 public function confirmRestore()
 {
     $ajax = FD::ajax();
     $theme = FD::themes();
     $output = $theme->output('admin/stream/dialog.restore');
     return $ajax->resolve($output);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:7,代码来源:view.ajax.php

示例7: getGroups

 /**
  * Retrieves the list of groups
  *
  * @since	1.2
  * @access	public
  * @param	string
  * @return
  */
 public function getGroups($user, $params)
 {
     $model = FD::model('Groups');
     $isUserAViewer = FD::user()->id == $user->id ? true : false;
     $groupOptions = array('uid' => $user->id, 'state' => SOCIAL_CLUSTER_PUBLISHED);
     // if $user is the current viewer, we will get all the groups
     if ($isUserAViewer) {
         $groupOptions['types'] = 'all';
     }
     $groups = $model->getGroups($groupOptions);
     $limit = $params->get('widget_profile_total', 5);
     // Get the total groups the user owns
     $groupCntOptions = array('types' => 'open');
     // if $user is the current viewer, we will get all the groups
     if ($isUserAViewer) {
         $groupCntOptions = array();
     }
     $total = $user->getTotalGroups($groupCntOptions);
     $theme = FD::themes();
     $theme->set('user', $user);
     $theme->set('limit', $limit);
     $theme->set('groups', $groups);
     $theme->set('total', $total);
     return $theme->output('themes:/apps/user/groups/widgets/profile/groups');
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:33,代码来源:view.html.php

示例8: sidebarBottom

 public function sidebarBottom($groupId)
 {
     $params = $this->getParams();
     if (!$params->get('widget', true)) {
         return;
     }
     $my = FD::user();
     $days = $params->get('widgets_days', 14);
     $total = $params->get('widgets_total', 5);
     $date = FD::date();
     $now = $date->toSql();
     $future = FD::date($date->toUnix() + $days * 24 * 60 * 60)->toSql();
     $options = array();
     $options['start-after'] = $now;
     $options['start-before'] = $future;
     $options['limit'] = $total;
     $options['state'] = SOCIAL_STATE_PUBLISHED;
     $options['ordering'] = 'start';
     $options['group_id'] = $groupId;
     $events = FD::model('Events')->getEvents($options);
     if (empty($events)) {
         return;
     }
     $theme = FD::themes();
     $theme->set('events', $events);
     $theme->set('app', $this->app);
     echo $theme->output('themes:/apps/user/events/widgets/dashboard/upcoming');
 }
开发者ID:ppantilla,项目名称:bbninja,代码行数:28,代码来源:view.html.php

示例9: heading

 public function heading()
 {
     $theme = FD::themes();
     $theme->set('event', $this->event);
     $output = $theme->output('site/albums/header.event');
     return $output;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:7,代码来源:event.php

示例10: onPrepareStoryPanel

 public function onPrepareStoryPanel($story)
 {
     if ($story->clusterType != SOCIAL_TYPE_GROUP) {
         return;
     }
     $params = $this->getParams();
     // Determine if we should attach ourselves here.
     if (!$params->get('story_event', true)) {
         return;
     }
     if (!FD::config()->get('events.enabled')) {
         return;
     }
     // Create plugin object
     $plugin = $story->createPlugin('event', 'panel');
     // Get the theme class
     $theme = FD::themes();
     // Get the available event category
     $categories = FD::model('EventCategories')->getCreatableCategories(FD::user()->getProfile()->id);
     $theme->set('categories', $categories);
     $plugin->button->html = $theme->output('apps/user/events/story/panel.button');
     $plugin->content->html = $theme->output('apps/user/events/story/panel.content');
     $script = FD::get('Script');
     $plugin->script = $script->output('apps:/user/events/story');
     return $plugin;
 }
开发者ID:ppantilla,项目名称:bbninja,代码行数:26,代码来源:events.php

示例11: 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

示例12: 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

示例13: amazon

 /**
  * Displays the amazon settings form
  *
  * @since	1.0
  * @access	public
  * @param	string
  * @return
  */
 public function amazon()
 {
     $ajax = FD::ajax();
     $theme = FD::themes();
     $contents = $theme->output('admin/settings/forms/dialog.storage.amazon');
     $ajax->resolve($contents);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:15,代码来源:view.ajax.php

示例14: heading

 public function heading()
 {
     $theme = FD::themes();
     $theme->set('group', $this->group);
     $output = $theme->output('site/albums/header.group');
     return $output;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:7,代码来源:group.php

示例15: getContent

 public function getContent()
 {
     $source = explode('.', $this->share->element);
     $element = $source[0];
     $group = $source[1];
     $message = $this->formatContent($this->share->content);
     $preview = "";
     $content = "";
     $title = "";
     $stream = FD::stream();
     $data = $stream->getItem($this->share->uid);
     if ($data !== true && !empty($data)) {
         $title = $data[0]->title;
         $content = $data[0]->content;
         if (isset($data[0]->preview) && $data[0]->preview) {
             $preview = $data[0]->preview;
         }
     }
     $theme = FD::themes();
     $theme->set('message', $message);
     $theme->set('content', $content);
     $theme->set('preview', $preview);
     $theme->set('title', $title);
     $html = $theme->output('apps/user/shares/streams/stream/content');
     return $html;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:26,代码来源:stream.php


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