本文整理汇总了PHP中nextendimport函数的典型用法代码示例。如果您正苦于以下问题:PHP nextendimport函数的具体用法?PHP nextendimport怎么用?PHP nextendimport使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了nextendimport函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
function render($xmlpath, $data)
{
$css = NextendCss::getInstance();
$js = NextendJavascript::getInstance();
$css->addCssLibraryFile('common.css');
$css->addCssLibraryFile('window.css');
$css->addCssLibraryFile('configurator.css');
$js->loadLibrary('dojo');
nextendimport('nextend.form.form');
$form = new NextendForm();
$form->loadArray($data);
$form->loadXMLFile($xmlpath);
echo $form->render('settings');
$js->addLibraryJsAssetsFile('dojo', 'form.js');
$js->addLibraryJs('dojo', '
new NextendForm({
container: "smartslider-form",
data: ' . json_encode($form->_data) . ',
xml: "' . NextendFilesystem::toLinux(NextendFilesystem::pathToRelativePath($xmlpath)) . '",
control_name: "settings",
url: "' . NextendUri::ajaxUri('nextend', 'smartslider') . '",
loadedJSS: ' . json_encode($js->generateArrayJs()) . ',
loadedCSS: ' . json_encode($css->generateArrayCSS()) . '
});
', true);
}
示例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: nextend_smart_slider2_load
function nextend_smart_slider2_load()
{
if (!defined('NEXTENDLIBRARY') && file_exists(dirname(__FILE__) . '/nextend/wp-library.php')) {
require_once dirname(__FILE__) . '/nextend/wp-library.php';
}
if (defined('NEXTENDLIBRARY')) {
add_action('wp_enqueue_scripts', 'nextend_ss2_jquery');
if (is_admin()) {
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'admin.php';
}
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'shortcode.php';
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'widget.php';
if (!function_exists('nextend_plugin_api_call')) {
nextendimport('nextend.wordpress.pluginupdatechecker');
$updateChecker = new PluginUpdateChecker('http://www.nextendweb.com/update2/wordpress/index.php?action=get_metadata&slug=nextend-smart-slider2-full&api-key=' . get_option('nextend_smart_slider2_license', ''), __FILE__);
} else {
function nextend_smart_slider_plugin_notice()
{
?>
<div class="error">
<p>Please update the Nextend plugin to the latest version!</p>
</div>
<?php
}
add_action('admin_notices', 'nextend_smart_slider_plugin_notice');
}
}
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'tinymce' . DIRECTORY_SEPARATOR . 'shortcode.php';
}
示例4: onInitNextendLibrary
function onInitNextendLibrary()
{
nextendimport('nextend.data.data');
$this->_data = new NextendData();
$config = $this->params->toArray();
if (!isset($config['config'])) {
$config['config'] = array();
}
$this->_data->loadArray(version_compare(JVERSION, '1.6.0', 'l') ? $config : $config['config']);
$cachetime = $this->_data->get('cachetime', 900);
if ($cachetime != 0) {
setNextend('cachetime', $cachetime);
}
$cachepath = '/' . trim($this->_data->get('cachepath', '/media/nextend/cache/'), '/') . '/';
if ($cachepath != '') {
$cachepath = rtrim(JPATH_SITE, DIRECTORY_SEPARATOR) . str_replace('/', DIRECTORY_SEPARATOR, $cachepath);
setNextend('cachepath', $cachepath);
}
setNextend('gzip', $this->_data->get('gzip', 0));
setNextend('debuglng', $this->_data->get('debuglng', 0));
if (isset($_GET['nextendclearcache'])) {
$app = JFactory::getApplication();
if ($app->isAdmin()) {
nextendimport('nextend.uri.uri');
nextendimport('nextend.filesystem.filesystem');
nextendimport('nextend.cache.cache');
$cache = new NextendCache();
$cache->deleteCacheFolder();
}
}
}
示例5: initConfig
function initConfig()
{
parent::initConfig();
$this->loadposition = $this->_data->get('loadposition', 0);
if ($this->loadposition) {
nextendimport('nextend.accordionmenu.joomla.loadmodule');
}
}
示例6: getData
function getData($number)
{
require_once JPATH_ADMINISTRATOR . '/components/com_igallery/defines.php';
nextendimport('nextend.database.database');
$db = NextendDatabase::getInstance();
$data = array();
$category = array_map('intval', explode('||', $this->_data->get('ignitegallerysourcecategory', '')));
$query = 'SELECT ';
$query .= 'con.id, ';
$query .= 'con.filename, ';
$query .= 'con.description, ';
$query .= 'con.alt_text, ';
$query .= 'con.link, ';
$query .= 'con.hits, ';
$query .= 'con.rotation, ';
$query .= 'con.gallery_id, ';
$query .= 'cat.name AS cat_title, ';
$query .= 'cat.alias AS cat_alias ';
$query .= 'FROM #__igallery_img AS con ';
$query .= 'LEFT JOIN #__igallery AS cat ON cat.id = con.gallery_id ';
$where = array();
if (count($category) > 0 && !in_array('0', $category)) {
$where[] = 'con.gallery_id IN (' . implode(',', $category) . ') ';
}
if ($this->_data->get('ignitegallerysourcepublished', 1)) {
$where[] = 'con.published = 1 ';
}
if (count($where)) {
$query .= ' WHERE ' . implode(' AND ', $where);
}
$order = NextendParse::parse($this->_data->get('ignitegalleryorder1', 'con.ordering|*|asc'));
if ($order[0]) {
$query .= 'ORDER BY ' . $order[0] . ' ' . $order[1] . ' ';
$order = NextendParse::parse($this->_data->get('ignitegalleryorder2', 'con.ordering|*|asc'));
if ($order[0]) {
$query .= ', ' . $order[0] . ' ' . $order[1] . ' ';
}
}
$query .= 'LIMIT 0, ' . $number . ' ';
$db->setQuery($query);
$result = $db->loadAssocList();
for ($i = 0; $i < count($result); $i++) {
$fileHashNoExt = JFile::stripExt($result[$i]['filename']);
$fileHashNoRef = substr($fileHashNoExt, 0, strrpos($fileHashNoExt, '-'));
$result[$i]['url'] = 'index.php?option=com_igallery&view=category&igid=' . $result[$i]['gallery_id'] . '#!' . $fileHashNoRef;
$result[$i]['categoryurl'] = 'index.php?option=com_igallery&view=category&igid=' . $result[$i]['gallery_id'];
$increment = igFileHelper::getIncrementFromFilename($result[$i]['filename']);
$folderName = igFileHelper::getFolderName($increment);
$sourceFile = IG_ORIG_PATH . '/' . $folderName . '/' . $result[$i]['filename'];
$size = getimagesize($sourceFile);
$fileArray = igFileHelper::originalToResized($result[$i]['filename'], $size[0], $size[1], 100, 0, $result[$i]['rotation'], 0, 0);
$result[$i]['thumbnail'] = $result[$i]['image'] = IG_IMAGE_HTML_RESIZE . $fileArray['folderName'] . '/' . $fileArray['fullFileName'];
$result[$i]['title'] = $result[$i]['alt_text'];
$result[$i]['author_name'] = '';
$result[$i]['author_url'] = '#';
}
return $result;
}
示例7: enableLess
function enableLess($group = null)
{
nextendimport('nextend.cache.less');
if (!$group) {
$this->_lesscache = new NextendCacheLess();
} else {
$this->_lesscacheGroup[$group] = new NextendCacheLess();
}
}
示例8: generateFonts
function generateFonts()
{
$file = $this->getFontUrl();
if ($file) {
nextendimport('nextend.css.css');
$css = NextendCss::getInstance();
$css->addCssFile($this->getFontUrl());
}
}
示例9: fetchElement
function fetchElement()
{
$css = NextendCss::getInstance();
$css->addCssLibraryFile('element/mixed.css');
$js = NextendJavascript::getInstance();
$js->addLibraryJsAssetsFile('dojo', 'element.js');
$js->addLibraryJsAssetsFile('dojo', 'element/mixed.js');
$this->_translateable = NextendXmlGetAttribute($this->_xml, 'translateable');
$this->_translateable = $this->_translateable === '0' ? false : true;
$default = explode($this->_separator, $this->_default);
$this->_value = $this->_form->get($this->_name, $this->_default);
$value = explode($this->_separator, $this->_value);
$value = $value + $default;
$html = "<div class='nextend-mixed' style='" . NextendXmlGetAttribute($this->_xml, 'style') . "'>";
$this->_elements = array();
$i = 0;
foreach ($this->_xml->param as $element) {
$html .= "<div class='nextend-mixed-group' style='" . NextendXmlGetAttribute($element, 'mixedstyle') . "'>";
$type = NextendXmlGetAttribute($element, 'type');
$class = 'NextendElement' . $type;
if (!class_exists($class, false)) {
if (!nextendimportpath($this->_form->_xmlfolder . 'element/' . $type)) {
nextendimport('nextend.form.element.' . $type);
}
}
$element->addAttribute('name', $this->_name . '_' . $i);
$element->addAttribute('hidename', 1);
if (isset($value[$i])) {
$element->addAttribute('default', $value[$i]);
}
$el = new $class($this->_form, $this, $element);
$el->parent =& $this;
$elementHtml = $el->render($this->_name . $this->control_name, $this->_translateable);
$html .= "<div class='nextend-mixed-label'>";
$html .= $elementHtml[0];
$html .= "</div>";
$html .= "<div class='nextend-mixed-element'>";
$html .= $elementHtml[1];
$html .= "</div>";
$this->_elements[$i] = $el->_id;
$i++;
$html .= "</div>";
}
$this->_form->set($this->_name, $this->_value);
$hidden = new NextendElementHidden($this->_form, $this->_tab, $this->_xml);
$hiddenhtml = $hidden->render($this->control_name, false);
$html .= $hiddenhtml[1];
$html .= "</div>";
$js->addLibraryJs('dojo', '
new NextendElementMixed({
hidden: "' . $this->_id . '",
elements: ' . json_encode($this->_elements) . ',
separator: "' . $this->_separator . '"
});
');
return $html;
}
示例10: loadLibrary
function loadLibrary($library)
{
if (!isset($this->_loadedLibraries[$library])) {
nextendimport('nextend.javascript.' . $library . '.' . $library);
$class = 'NextendJavascript' . $library;
$class = new $class();
$this->_loadedLibraries[$library] = $class->getInstance();
}
}
示例11: render
function render()
{
if ($this->_form) {
return;
}
$html = '';
$css = NextendCss::getInstance();
$css->addCssLibraryFile('fontmanager.css');
$js = NextendJavascript::getInstance();
nextendimport('nextend.form.form');
$form = new NextendForm();
$form->loadXMLFile(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'fontmanager' . DIRECTORY_SEPARATOR . 'form.xml');
$this->_form =& $form;
$js->addLibraryJsLibraryFile('dojo', 'dojo/window.js');
$js->addLibraryJsAssetsFile('dojo', 'window.js');
$js->addLibraryJsAssetsFile('dojo', 'element.js');
$js->addLibraryJsAssetsFile('dojo', 'fontmanager.js');
$id = 'nextend-fontmanager-lightbox-' . md5(time());
$html .= '<div id="' . $id . '" class="gk_hack nextend-window ' . $this->_currentform->get('class', isset($_REQUEST['view']) && $_REQUEST['view'] == 'sliders_settings' ? 'smartslider' : '') . '">';
$html .= '<div class="gk_hack nextend-window-container">';
$html .= '<div class="gk_hack nextend-topbar"><div class="gk_hack nextend-topbar-logo"></div>';
$manual = $this->_currentform->get('manual');
if ($manual != "") {
$html .= '<a href="' . $manual . '" target="_blank" class="gk_hack nextend-topbar-button nextend-topbar-manual">' . NextendText::_('Manual') . '</a>';
}
$support = $this->_currentform->get('support');
if ($support != "") {
$html .= '<a href="' . $support . '" target="_blank" class="gk_hack nextend-topbar-button nextend-topbar-support">' . NextendText::_('Support') . '</a>';
}
$html .= '<div id="nextend-fontmanager-save" class="nextend-window-save"><div class="NextendWindowSave">' . NextendText::_('APPLY') . '</div></div>';
$html .= '</div>';
$html .= '<div class="gk_hack nextend-window-container-inner">';
$html .= '<fieldset id="nextend-fontmanager-panels" class="gk_hack panelform">';
$html .= '<div id="nextend-fontmanager-tabs" class="gk_hack"></div>';
$html .= '<div id="nextend-fontmanager-panel" class="gk_hack pane-sliders">';
$html .= '<h3>' . NextendText::_('FONTMANAGER_Font_manager') . '</h3>';
ob_start();
//echo '<form method="post" name="nextend-fontmanager" id="nextend-fontmanager" action="" onsubmit="return false;">';
$form->render('fontmanager');
//echo '</form>';
$html .= ob_get_clean();
$html .= '</div>';
$html .= '<p id="nextend-fontmanager-preview" style="background-color: #d0d0d0;">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>';
$html .= '<div class="fontcolorpickerinput"><div><input id="nextend-fontmanager-backgroundcolor" value="#d0d0d0" name="nextend-fontmanager-backgroundcolor" /></div></div>';
$html .= '<div id="nextend-fontmanager-cleartab" style="float:right;">' . NextendText::_('FONTMANAGER_Clear_this_tab') . '</div>';
$html .= '</fieldset>';
$html .= '</div>';
$html .= '</div>';
$html .= '</div>';
$js->addLibraryJs('dojo', '
new NextendFontmanager({
node: "' . $id . '"
});
');
return $html;
}
示例12: initElements
function initElements()
{
$this->_elements = array();
foreach ($this->_xml->param as $element) {
$type = NextendXmlGetAttribute($element, 'type');
$name = NextendXmlGetAttribute($element, 'name');
nextendimport('nextend.form.element.' . $type);
$class = 'NextendElement' . ucfirst($type);
$this->_elements[$name] = new $class($this->_form, $this, $element);
}
}
示例13: getData
function getData($number)
{
nextendimport('nextend.database.database');
$db = NextendDatabase::getInstance();
require_once JPATH_ADMINISTRATOR . '/components/com_redshop/helpers/redshop.cfg.php';
require_once JPATH_ADMINISTRATOR . '/components/com_redshop/helpers/configuration.php';
require_once JPATH_ADMINISTRATOR . '/components/com_redshop/helpers/template.php';
require_once JPATH_ADMINISTRATOR . '/components/com_redshop/helpers/stockroom.php';
require_once JPATH_ADMINISTRATOR . '/components/com_redshop/helpers/economic.php';
require_once JPATH_SITE . '/components/com_redshop/helpers/product.php';
$Redconfiguration = new Redconfiguration();
$data = array();
$where = array();
$category = array_map('intval', explode('||', $this->_data->get('redshopproductssourcecategory', '')));
if (!in_array(0, $category) && count($category) > 0) {
$where[] = 'pr_cat.category_id IN (' . implode(',', $category) . ') ';
}
if ($this->_data->get('redshopproductssourcepublished', 1)) {
$where[] = ' pr.published = 1 ';
}
if ($this->_data->get('redshopproductssourcespecial', 0)) {
$where[] = ' (pr.product_special = 1) ';
}
if ($this->_data->get('redshopproductssourceonsale', 0)) {
$where[] = ' (pr.product_on_sale = 1) ';
}
$o = '';
$order = NextendParse::parse($this->_data->get('redshopproductsorder1', 'pr.product_name|*|asc'));
if ($order[0]) {
$o .= 'ORDER BY ' . $order[0] . ' ' . $order[1] . ' ';
$order = NextendParse::parse($this->_data->get('redshopproductsorder2', 'pr.product_name|*|asc'));
if ($order[0]) {
$o .= ', ' . $order[0] . ' ' . $order[1] . ' ';
}
}
$query = "SELECT \r\n pr.product_id, \r\n pr.published, \r\n pr_cat.ordering, \r\n pr.product_name as name, \r\n pr.product_s_desc as short_description, \r\n pr.product_desc as description, \r\n man.manufacturer_name as man_name,\r\n pr.product_full_image as image, \r\n pr.product_thumb_image as image_thumbnail, \r\n pr.product_price,\r\n cat.category_id,\r\n cat.category_name, \r\n cat.category_short_description , \r\n cat.category_description\r\n FROM `#__redshop_product` AS pr\r\n LEFT JOIN `#__redshop_product_category_xref` AS pr_cat USING (product_id)\r\n LEFT JOIN `#__redshop_category` AS cat USING (category_id)\r\n LEFT JOIN `#__redshop_manufacturer` AS man USING(manufacturer_id)\r\n WHERE pr.product_parent_id=0 " . (count($where) ? ' AND ' . implode(' AND ', $where) : '') . " " . $o . " LIMIT 0, " . $number;
$db->setQuery($query);
$result = $db->loadAssocList();
$uri = str_replace(array('http://', 'https://'), '//', NextendUri::getBaseUri());
for ($i = 0; $i < count($result); $i++) {
$product = new producthelper();
$result[$i]['title'] = $result[$i]['name'];
$result[$i]['price'] = $product->getProductFormattedPrice($product->getProductPrice($result[$i]['product_id']));
$result[$i]['addtocart'] = $result[$i]['url'] = 'index.php?option=com_redshop&view=product&pid=' . $result[$i]['product_id'] . '&cid=' . $result[$i]['category_id'];
$result[$i]['addtocart_label'] = 'View product';
$result[$i]['category_url'] = 'index.php?option=com_redshop&view=category&cid=' . $result[$i]['category_id'] . '&layout=detail';
$result[$i]['thumbnail'] = $result[$i]['image_thumbnail'] = $uri . REDSHOP_FRONT_IMAGES_ABSPATH . "product/" . $result[$i]['image_thumbnail'];
$result[$i]['image'] = $uri . REDSHOP_FRONT_IMAGES_ABSPATH . "product/" . $result[$i]['image'];
}
return $result;
}
示例14: initTabs
function initTabs()
{
if (count($this->_tabs) == 0 && $this->_xml->params && count($this->_xml->params)) {
foreach ($this->_xml->params as $tab) {
$type = NextendXmlGetAttribute($tab, 'type');
if ($type == '') {
$type = 'default';
}
nextendimport('nextend.form.tabs.' . $type);
$class = 'NextendTab' . ucfirst($type);
$this->_tabs[NextendXmlGetAttribute($tab, 'name')] = new $class($this, $tab);
}
}
}
示例15: renderForm
function renderForm($data = array())
{
$css = NextendCss::getInstance();
$js = NextendJavascript::getInstance();
$css->addCssLibraryFile('common.css');
$css->addCssLibraryFile('window.css');
$css->addCssLibraryFile('configurator.css');
$configurationXmlFile = dirname(__FILE__) . '/forms/layer.xml';
$js->loadLibrary('dojo');
nextendimport('nextend.form.form');
$form = new NextendForm();
$form->loadArray($data);
$form->loadXMLFile($configurationXmlFile);
echo $form->render('layer');
}