本文整理汇总了PHP中FD::import方法的典型用法代码示例。如果您正苦于以下问题:PHP FD::import方法的具体用法?PHP FD::import怎么用?PHP FD::import使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FD
的用法示例。
在下文中一共展示了FD::import方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: defined
<?php
/**
* @package EasySocial
* @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* EasySocial is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
FD::import('fields:/user/cover/ajax');
class SocialFieldsGroupCover extends SocialFieldsUserCover
{
public function upload()
{
// Get the ajax library
$ajax = FD::ajax();
$tmp = JRequest::getVar($this->inputName, '', 'FILES');
$file = array();
foreach ($tmp as $k => $v) {
$file[$k] = $v['file'];
}
if (!isset($file['tmp_name']) || empty($file['tmp_name'])) {
return $ajax->reject(JText::_('PLG_FIELDS_COVER_VALIDATION_INVALID_IMAGE'));
}
// Get user access
$access = FD::access($this->uid, SOCIAL_TYPE_CLUSTERS);
// Check if the filesize is too large
示例2: defined
<?php
/**
* @package EasySocial
* @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* EasySocial is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
FD::import('fields:/user/datetime/datetime');
class SocialFieldsEventDatetime extends SocialFieldsUserDatetime
{
}
示例3: defined
<?php
/**
* @package EasySocial
* @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* EasySocial is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
// Extend from user boolean
FD::import('fields:/user/boolean/boolean');
class SocialFieldsGroupBoolean extends SocialFieldsUserBoolean
{
}
示例4: defined
<?php
/**
* @package EasySocial
* @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* EasySocial is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
FD::import('fields:/user/multitextbox/multitextbox');
class SocialFieldsEventMultitextbox extends SocialFieldsUserMultitextbox
{
}
示例5: defined
<?php
/**
* @package EasySocial
* @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* EasySocial is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
FD::import('admin:/includes/group/group');
class SocialUserAppStory extends SocialAppItem
{
/**
* event onLiked on story
*
* @since 1.0
* @access public
* @param object $params A standard object with key / value binding.
*
* @return none
*/
public function onAfterLikeSave(&$likes)
{
if (!$likes->type) {
return;
}
// Set the default element.
示例6: defined
<?php
/**
* @package EasySocial
* @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* EasySocial is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
FD::import('admin:/includes/fields/dependencies');
FD::import('fields:/event/permalink/helper');
class SocialFieldsEventPermalink extends SocialFieldItem
{
/**
* Displays the field for creation.
*
* @author Jason Rey <jasonrey@stackideas.com>
* @since 1.3
* @access public
* @param array $post The posted data.
* @param SocialTableStepSession $session The session table.
* @return string The html codes for this field.
*/
public function onRegister(&$post, &$session)
{
$value = !empty($post[$this->inputName]) ? $post[$this->inputName] : '';
$error = $session->getErrors($this->inputName);
示例7: defined
<?php
/**
* @package EasySocial
* @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* EasySocial is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
// Include the fields library
FD::import('admin:/includes/fields/dependencies');
// Include helper lib
require_once dirname(__FILE__) . '/helper.php';
/**
* Processes ajax calls for the Joomla_Email field.
*
* @since 1.0
* @author Jason Rey <jasonrey@stackideas.com>
*/
class SocialFieldsUserJoomla_Email extends SocialFieldItem
{
/**
* Determines if the email address is valid.
*
* @since 1.0
* @access public
*/
示例8: defined
<?php
/**
* @package EasySocial
* @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* EasySocial is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
FD::import('admin:/includes/maintenance/dependencies');
class SocialMaintenanceScriptFixPrivacyState extends SocialMaintenanceScript
{
public static $title = 'Fix privacy state column';
public static $description = 'Update privacy state column to be published by default.';
public function main()
{
$db = FD::db();
$sql = $db->sql();
// Update all privacy column for the `state` to be published
$sql->update('#__social_privacy')->set('state', 1)->set('core', 1);
$db->setQuery($sql);
$db->query();
return true;
}
}
示例9: defined
<?php
/**
* @package EasySocial
* @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* EasySocial is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
FD::import('fields:/user/file/file');
/**
* Field application for File
*
* @since 1.0
* @author Jason Rey <jasonrey@stackideas.com>
*/
class SocialFieldsGroupFile extends SocialFieldsUserFile
{
}
示例10: defined
/**
* @package EasySocial
* @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* EasySocial is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
// Include the fields library
FD::import('admin:/includes/fields/dependencies');
// Include helper file.
FD::import('fields:/user/joomla_username/helper');
/**
* Processes ajax calls for the Joomla_Username field.
*
* @since 1.0
* @author Jason Rey <jasonrey@stackideas.com>
*/
class SocialFieldsUserJoomla_Username extends SocialFieldItem
{
/**
* Validates the username.
*
* @since 1.0
* @access public
* @param null
* @return JSON A jsong encoded string.
示例11: defined
/**
* @package EasySocial
* @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* EasySocial is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
// Include the fields library
FD::import('admin:/includes/fields/dependencies');
// Include helper file.
FD::import('fields:/user/permalink/helper');
/**
* Field application for Gender
*
* @since 1.0
* @author Jason Rey <jasonrey@stackideas.com>
*/
class SocialFieldsUserPermalink extends SocialFieldItem
{
/**
* Saves the permalink
*
* @since 1.0
* @access public
* @param string
* @return
示例12: defined
<?php
/**
* @package EasySocial
* @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* EasySocial is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
// Include helper file.
FD::import('fields:/user/address/helper');
/**
* Profile view for Notes app.
*
* @since 1.0
* @access public
*/
class AddressFieldWidgetsProfile
{
public function profileHeaderB($key, $user, $field)
{
// Get the data
$data = $field->data;
if (!$data) {
return;
}
$my = FD::user();
示例13: defined
<?php
/**
* @package EasySocial
* @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* EasySocial is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
FD::import('admin:/includes/location/provider');
class SocialLocationProvidersPlaces extends SocialLocationProviders
{
protected $queries = array('location' => '', 'radius' => 800, 'key' => '', 'query' => '', 'keyword' => '');
public function __construct()
{
$key = FD::config()->get('location.places.api');
if (empty($key)) {
return $this->setError(JText::_('COM_EASYSOCIAL_LOCATION_PROVIDERS_PLACES_MISSING_APIKEY'));
}
$this->setQuery('key', $key);
}
public function setCoordinates($lat, $lng)
{
return $this->setQuery('location', $lat . ',' . $lng);
}
public function setSearch($search = '')
{
示例14: defined
<?php
/**
* @package EasySocial
* @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* EasySocial is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
FD::import('admin:/includes/themes/themes');
class SocialRepostHelperStream
{
private $title = null;
private $content = null;
public function __construct($uid, $group, $element)
{
$stream = FD::stream();
$data = $stream->getItem($uid);
$item = $data[0];
$this->title = $item->title;
$this->content = $item->content;
if (isset($item->preview) && $item->preview) {
$this->content = $item->preview;
}
}
public function getTitle()
{
示例15: defined
* @package EasySocial
* @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* EasySocial is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
// Load triggers for fields.
FD::import('admin:/includes/fields/triggers');
// Load handlers for triggers
FD::import('admin:/includes/fields/handlers');
// Load apps dependencies.
FD::import('admin:/includes/apps/apps');
/**
* Responsible to manage the field items including
* event triggers.
*
* @since 1.0
* @author Mark Lee <mark@stackideas.com>
*/
class SocialFields
{
/**
* The triggerer object for fields.
* @var SocialFieldTriggers
*/
private $triggerer = null;
/**