本文整理汇总了PHP中NextendPlugin类的典型用法代码示例。如果您正苦于以下问题:PHP NextendPlugin类的具体用法?PHP NextendPlugin怎么用?PHP NextendPlugin使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了NextendPlugin类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fetchElement
function fetchElement()
{
$v = (array) NextendParse::parse($this->parent->_value);
$_REQUEST['fbpage'] = $v[0];
$this->_xml->addChild('option', 'Please choose')->addAttribute('value', 0);
$js = NextendJavascript::getInstance();
$js->addLibraryJsAssetsFile('dojo', 'element.js');
$js->addLibraryJsFile('dojo', dirname(__FILE__) . '/facebookalbumsbypage.js');
$js->addLibraryJs('dojo', '
new NextendElementFacebookAlbumsbyPage({
val: "' . $v[0] . '",
hidden: "' . $this->parent->_id . '",
listhidden: "' . $this->_id . '",
group: "nextendslidergenerator",
method: "onNextendFacebookPageAlbums"
});
');
ob_start();
$list = null;
NextendPlugin::callPlugin('nextendslidergenerator', 'onNextendFacebookPageAlbums', array(&$list));
if ($list) {
ob_end_clean();
if (count($list)) {
foreach ($list as $id => $name) {
$this->_xml->addChild('option', htmlentities($name))->addAttribute('value', $id);
}
}
}
$this->_value = $this->_form->get($this->_name, $this->_default);
$html = parent::fetchElement();
if (!$list) {
$html .= ob_get_clean();
}
return $html;
}
示例2: loadWordpressList
function loadWordpressList()
{
nextendimport('nextend.plugin.plugin');
require_once NEXTEND_ACCORDION_MENU . 'types' . DIRECTORY_SEPARATOR . 'loadplugin.php';
$this->_list = array();
NextendPlugin::callPlugin('nextendmenu', 'onNextendMenuList', array(&$this->_list));
}
示例3: NextendSliderWidgets
function NextendSliderWidgets($slider, $id)
{
$this->_slider = $slider;
$this->_id = $id;
$this->_widgets = array();
$this->_enabledWidgets = array();
$params = $this->_slider->_sliderParams;
if ($slider->_backend) {
return;
}
$plugins = array();
NextendPlugin::callPlugin('nextendsliderwidget', 'onNextendSliderWidgetList', array(&$plugins));
foreach ($plugins as $k => $v) {
$widget = $params->get('widget' . $k);
$display = NextendParse::parse($params->get('widget' . $k . 'display', '0|*|always|*|0|*|0'));
if ($widget != '' && (isset($display[0]) && intval($display[0]) || isset($display[2]) && intval($display[2]) || isset($display[3]) && intval($display[3]))) {
$this->_enabledWidgets[$k] = $widget;
}
}
foreach ($this->_enabledWidgets as $k => $v) {
if (nextendIsJoomla()) {
JPluginHelper::importPlugin('nextendsliderwidget' . $k);
}
$class = 'plgNextendSliderWidget' . $k . $v;
if (class_exists($class, false)) {
$this->_widgets[$k] = call_user_func(array($class, 'render'), $slider, $id, $params);
}
}
}
示例4: getOptions
function getOptions()
{
if ($this->_list == null) {
$this->_list = array();
NextendPlugin::callPlugin('nextendsliderwidget', 'onNextendSliderWidgetList', array(&$this->_list));
}
uasort($this->_list, array($this, 'sort'));
return $this->_list;
}
示例5: NextendSliderItems
function NextendSliderItems($id, $slider, $admin)
{
$this->id = $id;
$this->slider = $slider;
$this->admin = $admin;
$this->items = array();
if (!isset(self::$i[$id])) {
self::$i[$id] = 0;
}
NextendPlugin::callPlugin('nextendslideritem', 'onNextendSliderItemShortcode', array(&$this->items));
}
示例6: loadList
function loadList()
{
if ($this->_list == null) {
$this->_group = array();
$this->_list = array();
NextendPlugin::callPlugin(NextendXmlGetAttribute($this->_xml, 'plugingroup'), NextendXmlGetAttribute($this->_xml, 'method'), array(&$this->_group, &$this->_list));
$v = explode('_', $this->_value);
if (!isset($this->_list[$v[0]][$this->_value])) {
$keys = array_keys($this->_list);
$ks = array_keys($this->_list[$keys[0]]);
$this->_value = $this->_list[$keys[0]][$ks[0]];
}
}
}
示例7: pluginAction
function pluginAction($tpl)
{
$plugin = NextendRequest::getVar('action');
$path = null;
NextendPlugin::callPlugin('nextendslidergenerator', 'onNextendGeneratorConfiguration', array(&$plugin, &$path));
if ($path) {
$path .= 'configuration.xml';
$this->xml = $path;
$this->group = $plugin;
$this->render('plugin');
} else {
$this->defaultAction($tpl);
}
}
示例8: getNextendFlickr
/**
* @return phpFlickr
*/
function getNextendFlickr()
{
$flickr = null;
NextendPlugin::callPlugin('nextendslidergenerator', 'onNextendFlickr', array(&$flickr));
if ($flickr->auth_checkToken() === false) {
if (NextendSmartSliderSettings::get('debugmessages', 1)) {
global $smartslidercontroller;
echo "<span style='line-height: 24px; padding: 0 10px;'>";
echo NextendText::_('There_are_some_configuration_issues_with_Flickr_API_Please_check_the_settings') . ' <a href="' . $smartslidercontroller->route('controller=settings&view=sliders_settings&action=flickr') . '">' . NextendText::_('settings') . '</a>!<br />';
echo "</span>";
}
return false;
}
return $flickr;
}
示例9: fetchElement
function fetchElement()
{
static $options;
if (!$options) {
$options = array(0 => 'No_animation', 'fade' => 'Fade', 'slidelefttoright' => 'Slide_left_to_right', 'sliderighttoleft' => 'Slide_right_to_left', 'slidetoptobottom' => 'Slide_top_to_bottom', 'slidebottomtotop' => 'Slide_bottom_to_top', 'flipx' => 'Flip_X', 'fadeup' => 'Fade_up', 'fadedown' => 'Fade_down', 'fadeleft' => 'Fade_left', 'faderight' => 'Fade_right', 'bounce' => 'Bounce', 'rotate' => 'Rotate', 'rotateupleft' => 'Rotate_up_left', 'rotatedownleft' => 'Rotate_down_left', 'rotateupright' => 'Rotate_up_right', 'rotatedownright' => 'Rotate_down_right', 'rollin' => 'Roll_in', 'rollout' => 'Roll_out', 'scale' => 'Scale');
NextendPlugin::callPlugin('nextendslider', 'onNextendSliderLayerAnimations', array(&$options));
}
if (count($options)) {
foreach ($options as $k => $v) {
$this->_xml->addChild('option', $v)->addAttribute('value', $k);
}
}
$this->_value = $this->_form->get($this->_name, $this->_default);
$html = parent::fetchElement();
return $html;
}
示例10: getNextendTwitter
function getNextendTwitter()
{
$twitter = null;
NextendPlugin::callPlugin('nextendslidergenerator', 'onNextendTwitter', array(&$twitter));
$test = $twitter->request('GET', 'https://api.twitter.com/1.1/statuses/user_timeline.json', array());
if ($test != 200) {
if (NextendSmartSliderSettings::get('debugmessages', 1)) {
global $smartslidercontroller;
echo "<span style='line-height: 24px; padding: 0 10px;'>";
echo NextendText::_('There_are_some_configuration_issues_with_Twitter_API_Please_check_the') . ' <a href="' . $smartslidercontroller->route('controller=settings&view=sliders_settings&action=twitter') . '">' . NextendText::_('settings') . '</a>!<br />';
echo "</span>";
}
return false;
}
return $twitter;
}
示例11: getNextendInstagram
/**
* @return Instagram
*/
function getNextendInstagram()
{
$instagram = null;
NextendPlugin::callPlugin('nextendslidergenerator', 'onNextendInstagram', array(&$instagram));
$test = json_decode($instagram->getUserFeed(), true);
if ($test['meta']['code'] != 200) {
if (NextendSmartSliderSettings::get('debugmessages', 1)) {
global $smartslidercontroller;
echo "<span style='line-height: 24px; padding: 0 10px;'>";
echo NextendText::_('There_are_some_configuration_issues_with_Instagram_API_Please_check_the') . ' <a href="' . $smartslidercontroller->route('controller=settings&view=sliders_settings&action=instagram') . '">' . NextendText::_('settings') . '</a>!<br />';
echo "</span>";
}
return false;
}
return $instagram;
}
示例12: getNextendYoutube
/**
* @return array(Google_Client,Google_Client_YouTube)
*/
function getNextendYoutube()
{
static $google = null, $youtube = null;
if ($google === null) {
NextendPlugin::callPlugin('nextendslidergenerator', 'onNextendYoutube', array(&$google, &$youtube));
}
if ($google->isAccessTokenExpired()) {
if (NextendSmartSliderSettings::get('debugmessages', 1)) {
global $smartslidercontroller;
echo "<span style='line-height: 24px; padding: 0 10px;'>";
echo NextendText::_('There are some configuration issues with Youtube API. Please check the') . ' <a href="' . $smartslidercontroller->route('controller=settings&view=sliders_settings&action=youtube') . '">' . NextendText::_('settings') . '</a>!<br />';
echo "</span>";
}
return false;
}
return array($google, $youtube);
}
示例13: getNextendFacebook
/**
* @return Facebook
*/
function getNextendFacebook()
{
$facebook = null;
NextendPlugin::callPlugin('nextendslidergenerator', 'onNextendFacebook', array(&$facebook));
try {
$test = $facebook->api('/me');
} catch (Exception $e) {
if (NextendSmartSliderSettings::get('debugmessages', 1)) {
global $smartslidercontroller;
echo "<span style='line-height: 24px; padding: 0 10px;'>";
echo NextendText::_('There_are_some_configuration_issues_with_Facebook_API_Please_check_the') . ' <a href="' . $smartslidercontroller->route('controller=settings&view=sliders_settings&action=facebook') . '">' . NextendText::_('settings') . '</a>!<br />';
echo "</span>";
}
return false;
}
return $facebook;
}
示例14: scale
div#' . $id . ' .nextend-smartslider-caption:HOVER .img-scale-top{
-moz-transform: scale(1.4);
-o-transform: scale(1.4);
-webkit-transform: scale(1.4);
transform: scale(1.4);
}
div#' . $id . ' .nextend-smartslider-caption:HOVER .caption.nextend-smartslider-caption-scale-top{
top: 0;
}';
case 'fade':
return 'div#' . $id . ' .nextend-smartslider-caption .caption.nextend-smartslider-caption-fade{
opacity: 0;
}
div#' . $id . ' .nextend-smartslider-caption:HOVER .caption.nextend-smartslider-caption-fade{
opacity: 1;
}';
}
}
function getValues()
{
return array('image' => NextendSmartSliderSettings::get('placeholder'), 'alt' => 'Image not available', 'link' => '#|*|_self', 'size' => '130|*|130', 'content' => 'Title', 'description' => 'Here comes the description text.', 'captionclass' => 'simple-bottom', 'fontclasstitle' => 'sliderfont1', 'fontclass' => 'sliderfont11', 'color' => '00000080', 'customcaptionclass' => '', 'onmouseclick' => '', 'onmouseenter' => '', 'onmouseleave' => '');
}
function getPath()
{
return dirname(__FILE__) . DIRECTORY_SEPARATOR . $this->_identifier . DIRECTORY_SEPARATOR;
}
}
NextendPlugin::addPlugin('nextendslideritem', 'plgNextendSliderItemCaption');
示例15: htmlspecialchars
if (!empty($leave)) {
$attr .= ' data-leave="' . htmlspecialchars($leave) . '"';
}
return '<p class="' . $data->get('fontclass', '') . ' ' . $data->get('class', '') . '" style="' . $fontsize . $fontcolor . htmlspecialchars($data->get('css', '')) . '" ' . $attr . '>' . $data->get('content', '') . '</p>';
}
function _renderAdmin($data, $id, $sliderid, $items)
{
$fontsize = $data->get('fontsize', '');
if (!empty($fontsize)) {
$fontsize = 'font-size:' . $fontsize . '%;';
}
$fontcolors = (array) NextendParse::parse($data->get('fontcolor', ''));
$fontcolor = '';
if (isset($fontcolors[0]) && $fontcolors[0]) {
if (!empty($fontcolors[1])) {
$fontcolor = 'color:#' . $fontcolors[1] . ';';
}
}
return '<p class="' . $data->get('fontclass', '') . ' ' . $data->get('class', '') . '" style="' . $fontsize . $fontcolor . htmlspecialchars($data->get('css', '')) . '">' . $data->get('content', '') . '</p>';
}
function getValues()
{
return array('content' => NextendText::_('Empty_paragraph'), 'fontclass' => 'sliderfont6', 'fontsize' => 'auto', 'fontcolor' => '0|*|000000', 'css' => '', 'class' => '', 'onmouseclick' => '', 'onmouseenter' => '', 'onmouseleave' => '');
}
function getPath()
{
return dirname(__FILE__) . DIRECTORY_SEPARATOR . $this->_identifier . DIRECTORY_SEPARATOR;
}
}
NextendPlugin::addPlugin('nextendslideritem', 'plgNextendSliderItemParagraph');