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


PHP NextendUri类代码示例

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


在下文中一共展示了NextendUri类的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);
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:26,代码来源:settings.php

示例2: generateOptions

 function generateOptions(&$xml)
 {
     $template = (string) $this->_xml;
     $cssfile = NextendFilesystem::translateToMediaPath(str_replace(DIRECTORY_SEPARATOR, '/', dirname($this->_form->_xmlfile)) . '/style.');
     $css = NextendCss::getInstance();
     if (NextendFilesystem::fileexists($cssfile . 'less')) {
         $css->enableLess();
         $cssfile .= 'less';
         $css->addCssFile(array($cssfile, $cssfile, array('id' => 'body')));
     } else {
         $cssfile .= 'css';
         $css->addCssFile($cssfile);
     }
     $prefix = NextendXmlGetAttribute($this->_xml, 'prefix');
     $this->_values = array();
     $html = '';
     foreach ($xml->option as $option) {
         $v = NextendXmlGetAttribute($option, 'value');
         $this->_values[] = $v;
         if ($v != -1) {
             $info = pathinfo($v);
             $class = $prefix . basename($v, '.' . $info['extension']);
             $html .= '
             <div class="nextend-radio-option nextend-imagelist-option' . $this->isSelected($v) . '">
                 ' . str_Replace('{image}', NextendUri::pathToUri($v), str_Replace('{class}', $class, $template)) . '
             </div>';
         } else {
             $html .= '<div class="nextend-radio-option' . $this->isSelected($v) . '">' . (string) $option . '</div>';
         }
     }
     return $html;
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:32,代码来源:cssimagelist.php

示例3: 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;
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:51,代码来源:generator.php

示例4: generateDynamicThumbs

function generateDynamicThumbs($controller, $path, $group, $type, $title, $configured, $full, $available)
{
    ?>

    <div class="smartslider-dynamic-thumb">
        <div><?php 
    echo $title;
    ?>
</div>
        <img src="<?php 
    echo NextendUri::pathToUri($path);
    ?>
" /><br />
        <?php 
    if ($full && !smartsliderIsFull()) {
        ?>

            <a class="button small g" href="http://www.nextendweb.com/smart-slider/" target="_blank">Get full</a>
        <?php 
    } elseif (!$configured) {
        ?>

            <a class="button small b" href="<?php 
        echo $controller->route('controller=settings&view=sliders_settings&action=' . $group);
        ?>
" target="_blank">Configure</a>
        <?php 
    } elseif ($available !== true) {
        ?>

            <a class="button small" href="<?php 
        echo $available;
        ?>
" target="_blank">Check extension</a>
        <?php 
    } else {
        ?>

            <a class="button small b" href="<?php 
        echo $controller->route('controller=sliders&view=sliders_slider&action=createdynamic&step=2&group=' . $group . '&type=' . $type);
        ?>
">Start</a>
        <?php 
    }
    ?>

    </div>
    <?php 
}
开发者ID:sangikumar,项目名称:IP,代码行数:49,代码来源:createdynamic.php

示例5: generateOptions

 function generateOptions(&$xml)
 {
     $this->_values = array();
     $html = '';
     foreach ($xml->option as $option) {
         $v = NextendXmlGetAttribute($option, 'value');
         $this->_values[] = $v;
         if ($v != -1) {
             $html .= '<div class="nextend-radio-option nextend-imagelist-option' . $this->isSelected($v) . '"><img src="' . NextendUri::pathToUri($v) . '" alt="' . (string) $option . '" /></div>';
         } else {
             $html .= '<div class="nextend-radio-option' . $this->isSelected($v) . '">' . (string) $option . '</div>';
         }
     }
     return $html;
 }
开发者ID:Nguyenkain,项目名称:Elearning,代码行数:15,代码来源:imagelist.php

示例6: getData

 function getData($number)
 {
     $data = array();
     $folder = $this->_data->get('sourcefolder', '');
     $files = NextendFilesystem::files($folder);
     $j = 0;
     for ($i = 0; $i < count($files) && $j < $number; $i++) {
         $ext = strtolower(pathinfo($files[$i], PATHINFO_EXTENSION));
         if ($ext == 'jpg' || $ext == 'jpeg' || $ext == 'png') {
             $data[$j] = array();
             $data[$j]['thumbnail'] = $data[$j]['image'] = $data[$j]['image_url'] = NextendUri::pathToUri($folder . $files[$i]);
             $data[$j]['title'] = $data[$j]['file_name'] = $files[$i];
             $j++;
         }
     }
     return $data;
 }
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:17,代码来源:generator.php

示例7: _renderAdmin

 function _renderAdmin($data, $id, $sliderid, $items)
 {
     $link = (array) NextendParse::parse($data->get('link', ''));
     if (!isset($link[1])) {
         $link[1] = '';
     }
     return '
     <div style="line-height:0; width:' . $data->get('width', '') . '; ' . htmlspecialchars($data->get('css', '')) . '" class="nextend-smartslider-flip-container ' . $data->get('flipclass', '') . '">
       ' . ($link[0] != '#' ? '<a href="' . $link[0] . '" target="' . $link[1] . '" style="background: none !important;display: block;">' : '') . '
         <div class="nextend-smartslider-flip">
             <img alt="' . htmlspecialchars($data->get('alt', '')) . '" src="' . NextendUri::fixrelative($data->get('imagefront', '')) . '" style="width: 100%;" class="nextend-smartslider-flip-front-img" > 
             <img alt="' . htmlspecialchars($data->get('alt', '')) . '" src="' . NextendUri::fixrelative($data->get('imageback', '')) . '" style="width: 100%;" class="nextend-smartslider-flip-back-img" >
         </div>
       ' . ($link[0] != '#' ? '</a>' : '') . '
     </div>
     ';
 }
开发者ID:AndyHuntDesign,项目名称:andyhuntdesign,代码行数:17,代码来源:flipper.php

示例8: generateJs

 function generateJs()
 {
     $this->generateLibraryJs();
     $document = JFactory::getDocument();
     if ($this->_cacheenabled) {
         if (count($this->_jsFiles)) {
             foreach ($this->_jsFiles as $file) {
                 if (substr($file, 0, 4) == 'http') {
                     if ($this->_echo) {
                         parent::serveJsFile($file);
                     } else {
                         $document->addScript($file);
                     }
                 } else {
                     $this->_cache->addFile($file);
                 }
             }
         }
         $this->_cache->addInline($this->_js);
         $filename = $this->_cache->getCache();
         if ($filename) {
             if ($this->_echo) {
                 parent::serveJsFile($filename);
             } else {
                 $document->addScript($filename);
             }
         }
     } else {
         if (count($this->_jsFiles)) {
             foreach ($this->_jsFiles as $file) {
                 if ($this->_echo) {
                     parent::serveJsFile(NextendUri::pathToUri($file));
                 } else {
                     $document->addScript(NextendUri::pathToUri($file));
                 }
             }
         }
         $this->serveJs();
     }
     $this->serveInlineJs();
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:41,代码来源:joomla.php

示例9: render

 static function render($slider, $id, $params)
 {
     $html = '';
     $shadowcss = $params->get('shadowcss', false);
     if ($shadowcss && $shadowcss != -1) {
         $displayclass = self::getDisplayClass($params->get('widgetshadowdisplay', '0|*|always|*|0|*|0'), false);
         list($style, $data) = self::getPosition($params->get('shadowposition', ''));
         $width = NextendParse::parse($params->get('shadowwidth', 'width'));
         if (is_numeric($width) || $width == 'auto' || substr($width, -1) == '%') {
             $style .= 'width:' . $width . ';';
         } else {
             $data .= 'data-sswidth="' . $width . '" ';
         }
         $css = NextendCss::getInstance();
         $css->addCssFile(NextendFilesystem::translateToMediaPath(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'shadow' . DIRECTORY_SEPARATOR . 'style.css'));
         $info = pathinfo($shadowcss);
         $class = 'nextend-shadow nextend-shadow-' . basename($shadowcss, '.' . $info['extension']);
         $html .= '<div class="' . $displayclass . $class . '" style="line-height:0;' . $style . '" ' . $data . '><img src="' . (nextendIsWordpress() ? plugins_url('shadow/shadow/' . $info['basename'], __FILE__) : NextendUri::pathToUri(NextendFilesystem::getBasePath() . $shadowcss)) . '"/></div>';
     }
     return $html;
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:21,代码来源:shadow.php

示例10: generateDynamicSliderThumbs

function generateDynamicSliderThumbs($controller, $image, $sliderid, $id, $data)
{
    global $layout, $sliderpreset;
    ?>

    <div class="smartslider-dynamic-thumb <?php 
    echo $sliderpreset == $id ? 'selected' : 'notselected';
    ?>
" onclick="location.href='<?php 
    echo $controller->route('controller=sliders&view=sliders_slider&action=changedynamiclayout&fontset=' . NextendRequest::getInt('fontset', 0) . '&type=' . NextendRequest::getVar('type', '') . '&sliderid=' . $sliderid . '&sliderpreset=' . ($sliderpreset == $id ? '' : $id) . '&layout=' . $layout);
    ?>
'">
        <div><?php 
    echo $data['title'];
    ?>
</div>
        <img src="<?php 
    echo NextendUri::pathToUri(NextendFilesystem::translateToMediaPath($image));
    ?>
" />
    </div>
    <?php 
}
开发者ID:sangikumar,项目名称:IP,代码行数:23,代码来源:changedynamiclayout.php

示例11: getData

 function getData($number)
 {
     nextendimport('nextend.database.database');
     $db = NextendDatabase::getInstance();
     $data = array();
     $category = array_map('intval', explode('||', $this->_data->get('phocagallerysourcecategory', '')));
     $query = 'SELECT ';
     $query .= 'con.id, ';
     $query .= 'con.title, ';
     $query .= 'con.alias, ';
     $query .= 'con.filename, ';
     $query .= 'con.description, ';
     $query .= 'con.hits, ';
     $query .= 'con.catid, ';
     $query .= 'cat.title AS cat_title, ';
     $query .= 'cat.description AS cat_description, ';
     $query .= 'cat.alias AS cat_alias ';
     $query .= 'FROM #__phocagallery AS con ';
     $query .= 'LEFT JOIN #__phocagallery_categories AS cat ON cat.id = con.catid ';
     $where = array();
     if (count($category) > 0 && !in_array('0', $category)) {
         $where[] = 'con.catid IN (' . implode(',', $category) . ') ';
     }
     if ($this->_data->get('phocagallerysourcepublished', 1)) {
         $where[] = 'con.published = 1 ';
         $where[] = 'con.approved = 1 ';
     }
     if ($this->_data->get('phocagallerysourcefeatured', 0)) {
         $where[] = 'con.featured = 1 ';
     }
     $language = $this->_data->get('phocagallerysourcelanguage', '*');
     if ($language) {
         $where[] = 'con.language = ' . $db->quote($language) . ' ';
     }
     if (count($where)) {
         $query .= ' WHERE ' . implode(' AND ', $where);
     }
     $order = NextendParse::parse($this->_data->get('phocagalleryorder1', 'con.title|*|asc'));
     if ($order[0]) {
         $query .= 'ORDER BY ' . $order[0] . ' ' . $order[1] . ' ';
         $order = NextendParse::parse($this->_data->get('phocagalleryorder2', 'con.title|*|asc'));
         if ($order[0]) {
             $query .= ', ' . $order[0] . ' ' . $order[1] . ' ';
         }
     }
     $query .= 'LIMIT 0, ' . $number . ' ';
     $db->setQuery($query);
     $result = $db->loadAssocList();
     $uri = str_replace(array('http://', 'https://'), '//', NextendUri::getBaseUri());
     for ($i = 0; $i < count($result); $i++) {
         $result[$i]['url'] = 'index.php?option=com_phocagallery&view=detail&catid=' . $result[$i]['catid'] . ':' . $result[$i]['cat_alias'] . '&id=' . $result[$i]['id'] . ':' . $result[$i]['alias'];
         $result[$i]['url_label'] = 'View image';
         $result[$i]['categoryurl'] = 'index.php?option=com_phocagallery&view=category&id=' . $result[$i]['catid'] . ':' . $result[$i]['cat_alias'];
         $result[$i]['thumbnail'] = $result[$i]['image'] = $uri . "images/phocagallery/" . $result[$i]['filename'];
         if (!$result[$i]['description']) {
             $result[$i]['description'] = '';
         }
         $result[$i]['author_name'] = '';
         $result[$i]['author_url'] = '#';
     }
     return $result;
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:62,代码来源:generator.php

示例12: initSlides

 function initSlides($slides)
 {
     if ($this->_backend) {
         if (NextendRequest::getCmd('action') == 'create') {
             array_unshift($slides, array('id' => 0, 'title' => '{_slidetitle}', 'slider' => NextendRequest::getInt('sliderid'), 'publish_up' => '0000-00-00 00:00:00', 'publish_down' => '0000-00-00 00:00:00', 'published' => 1, 'first' => 0, 'slide' => '', 'params' => '', 'thumbnail' => '', 'background' => 'ffffff00|*|', 'description' => 'Description', 'ordering' => count($slides)));
         }
         if (NextendRequest::getCmd('action') == 'generatoredit') {
             global $smartslidergeneratorslide;
             if (!$smartslidergeneratorslide) {
                 $smartslidergeneratorslide = array();
             }
             array_unshift($slides, array_merge(array('id' => 0, 'title' => '{_slidetitle}', 'slider' => NextendRequest::getInt('sliderid'), 'publish_up' => '0000-00-00 00:00:00', 'publish_down' => '0000-00-00 00:00:00', 'published' => 1, 'first' => 0, 'slide' => '', 'params' => '', 'thumbnail' => '', 'background' => 'ffffff00|*|', 'description' => 'Description', 'ordering' => count($slides)), $smartslidergeneratorslide));
         } else {
             if (NextendRequest::getCmd('controller') == 'layouts' && NextendRequest::getCmd('action') == 'edit') {
                 global $smartsliderlayout;
                 if (!$smartsliderlayout) {
                     $smartsliderlayout = '';
                 }
                 array_unshift($slides, array('id' => 0, 'title' => '{_slidetitle}', 'slide' => $smartsliderlayout, 'params' => ''));
             } else {
                 if (NextendRequest::getCmd('controller') == 'slides') {
                     $currentlyedited = NextendRequest::getInt('slideid');
                     for ($i = 0; $i < count($slides); $i++) {
                         if ($slides[$i]['id'] == $currentlyedited) {
                             $this->_activeSlide = $i;
                             break;
                         }
                     }
                 }
             }
         }
     } else {
         for ($i = 0; $i < count($slides); $i++) {
             if ($slides[$i]['first'] == 1) {
                 $this->_activeSlide = $i;
                 break;
             }
         }
     }
     nextendimport('nextend.image.color');
     for ($i = 0; $i < count($slides); $i++) {
         $params = new NextendData();
         $params->loadJSON($slides[$i]['params']);
         $slides[$i]['params'] = $params;
         $slides[$i]['classes'] = 'smart-slider-canvas';
         if (!isset($slides[$i]['background'])) {
             $slides[$i]['background'] = 'ffffff00|*|';
         }
         $bg = (array) NextendParse::parse($slides[$i]['background']);
         $style = '';
         if (isset($bg[0]) && strlen($bg[0]) == 8) {
             if (substr($bg[0], 6, 2) != '00') {
                 $style .= 'background-color: #' . substr($bg[0], 0, 6) . ';';
                 $rgba = NextendColor::hex2rgba($bg[0]);
                 $style .= 'background-color: RGBA(' . $rgba[0] . ',' . $rgba[1] . ',' . $rgba[2] . ',' . round($rgba[3] / 127, 2) . ');';
             }
         }
         $slides[$i]['style'] = $style;
         $bgmore = (array) NextendParse::parse($slides[$i]['params']->get('backgroundmore'));
         $slides[$i]['bg'] = array('desktop' => empty($bg[1]) ? 0 : NextendUri::fixrelative($bg[1]), 'desktopretina' => empty($bgmore[0]) ? 0 : NextendUri::fixrelative($bgmore[0]), 'tablet' => empty($bgmore[1]) ? 0 : NextendUri::fixrelative($bgmore[1]), 'tabletretina' => empty($bgmore[2]) ? 0 : NextendUri::fixrelative($bgmore[2]), 'mobile' => empty($bgmore[3]) ? 0 : NextendUri::fixrelative($bgmore[3]), 'mobileretina' => empty($bgmore[4]) ? 0 : NextendUri::fixrelative($bgmore[4]), 'alt' => empty($bg[2]) ? '' : $bg[2]);
         if (!empty($slides[$i]['thumbnail'])) {
             $slides[$i]['thumbnail'] = NextendUri::fixrelative($slides[$i]['thumbnail']);
         }
         $link = $params->get('link', '');
         $link = (array) NextendParse::parse($link);
         if (!$this->_backend && $link && isset($link[0]) && $link[0] != '' && $link[0] != '#') {
             if (!isset($link[1])) {
                 $link[1] = '_self';
             }
             $slides[$i]['link'] = ' onclick="' . htmlspecialchars(strpos($link[0], 'javascript:') === 0 ? $link[0] : ($link[1] == '_blank' ? "window.open('" . (nextendIsJoomla() ? JRoute::_($link[0], false) : $link[0]) . "','_blank');" : "window.location='" . (nextendIsJoomla() ? JRoute::_($link[0], false) : $link[0]) . "'")) . '" ';
             $slides[$i]['style'] .= 'cursor:pointer;';
         } else {
             $slides[$i]['link'] = '';
         }
     }
     return $slides;
 }
开发者ID:AndyHuntDesign,项目名称:andyhuntdesign,代码行数:77,代码来源:slider.php

示例13: createHash

 function createHash()
 {
     $hash = NextendUri::getBaseUri();
     for ($i = 0; $i < count($this->_files); $i++) {
         $hash .= $this->_files[$i] . filemtime($this->_files[$i]);
     }
     return md5($this->parseHash($hash) . $this->_text);
 }
开发者ID:Nguyenkain,项目名称:Elearning,代码行数:8,代码来源:cache.php

示例14: getData

 function getData($number)
 {
     nextendimport('nextend.database.database');
     $db = NextendDatabase::getInstance();
     $data = array();
     $category = array_map('intval', explode('||', $this->_data->get('sourcecategory', '')));
     $query = 'SELECT ';
     $query .= 'con.id, ';
     $query .= 'con.title, ';
     $query .= 'con.alias, ';
     $query .= 'con.introtext, ';
     $query .= 'con.fulltext, ';
     $query .= 'con.catid, ';
     $query .= 'cat.title AS cat_title, ';
     $query .= 'cat.alias AS cat_alias, ';
     $query .= 'con.created_by, ';
     $query .= 'usr.name AS created_by_alias, ';
     $query .= 'con.images ';
     $query .= 'FROM #__content AS con ';
     $query .= 'LEFT JOIN #__users AS usr ON usr.id = con.created_by ';
     $query .= 'LEFT JOIN #__categories AS cat ON cat.id = con.catid ';
     $query .= 'WHERE con.catid IN (' . implode(',', $category) . ') ';
     $sourceuserid = intval($this->_data->get('sourceuserid', ''));
     if ($sourceuserid) {
         $query .= 'AND con.created_by = ' . $sourceuserid . ' ';
     }
     if ($this->_data->get('sourcepublished', 1)) {
         $query .= 'AND con.state = 1 ';
         $jnow = JFactory::getDate();
         $now = version_compare(JVERSION, '1.6.0', '<') ? $jnow->toMySQL() : $jnow->toSql();
         $query .= "AND (con.publish_up = '0000-00-00 00:00:00' OR con.publish_up < '" . $now . "') AND (con.publish_down = '0000-00-00 00:00:00' OR con.publish_down > '" . $now . "') ";
     }
     if ($this->_data->get('sourcefeatured', 0)) {
         $query .= 'AND con.featured = 1 ';
     }
     $language = $this->_data->get('sourcelanguage', '*');
     if ($language) {
         $query .= 'AND con.language = ' . $db->quote($language) . ' ';
     }
     $order = NextendParse::parse($this->_data->get('order1', 'con.title|*|asc'));
     if ($order[0]) {
         $query .= 'ORDER BY ' . $order[0] . ' ' . $order[1] . ' ';
         $order = NextendParse::parse($this->_data->get('order2', 'con.title|*|asc'));
         if ($order[0]) {
             $query .= ', ' . $order[0] . ' ' . $order[1] . ' ';
         }
     }
     $query .= 'LIMIT 0, ' . $number . ' ';
     $db->setQuery($query);
     $result = $db->loadAssocList();
     $dispatcher = JDispatcher::getInstance();
     JPluginHelper::importPlugin('content');
     $uri = str_replace(array('http://', 'https://'), '//', NextendUri::getBaseUri());
     for ($i = 0; $i < count($result); $i++) {
         $article = new stdClass();
         $article->text = $result[$i]['introtext'];
         $_p = array();
         $dispatcher->trigger('onContentPrepare', array('com_smartslider2', &$article, &$_p, 0));
         if (!empty($article->text)) {
             $result[$i]['introtext'] = $article->text;
         }
         $result[$i]['description'] = $result[$i]['introtext'];
         $article->text = $result[$i]['fulltext'];
         $_p = array();
         $dispatcher->trigger('onContentPrepare', array('com_smartslider2', &$article, &$_p, 0));
         if (!empty($article->text)) {
             $result[$i]['fulltext'] = $article->text;
         }
         $result[$i]['url'] = ContentHelperRoute::getArticleRoute($result[$i]['id'] . ':' . $result[$i]['alias'], $result[$i]['catid'] . ':' . $result[$i]['cat_alias']);
         $result[$i]['categorylisturl'] = 'index.php?option=com_content&view=category&id=' . $result[$i]['catid'];
         $result[$i]['categoryblogurl'] = 'index.php?option=com_content&view=category&layout=blog&id=' . $result[$i]['catid'];
         $images = (array) json_decode($result[$i]['images'], true);
         $result[$i]['image'] = $result[$i]['thumbnail'] = $result[$i]['intro_image'] = isset($images['image_intro']) ? $uri . $images['image_intro'] : '';
         $result[$i]['fulltext_image'] = isset($images['image_fulltext']) ? $uri . $images['image_fulltext'] : '';
         unset($result[$i]['images']);
         $result[$i]['url_label'] = 'View article';
         $result[$i]['author_name'] = $result[$i]['created_by_alias'];
         $result[$i]['author_url'] = '#';
     }
     return $result;
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:81,代码来源:generator.php

示例15: nextendimport

nextendimport('nextend.form.form');
NextendForm::loadQtip();
$js = NextendJavascript::getInstance();
$js->loadLibrary('jquery');
nextendimport('nextend.fonts.google');
$fonts = NextendFontsGoogle::getInstance();
$fonts->addFont('Open Sans');
$fonts->addFont('Open Sans', 600);
$fonts->addFont('Open Sans', 700);
?>

<script type="text/javascript">
    window.nextendFixRelative = function(uri){
        if(uri.substr(0, 1) == '/' || uri.indexOf('://') != -1) return uri;
        return '<?php 
echo NextendUri::getRelative();
?>
'+uri;
    }
    
    window.nextendimageurl = <?php 
echo nextendIsJoomla() ? intval(NextendSmartSliderJoomlaSettings::get('imageurl', 1)) : 0;
?>
;
</script>

<div id="smartslider-admin" class="nextend-nowindow smartslider-advanced-layers-simple-active smartslider-device-all-active ni">

    <div class="smartslider-head">
        <div class="smartslider-logo" style="cursor: pointer;" onclick="location.href='<?php 
echo $this->route('controller=sliders');
开发者ID:JonathanAJ,项目名称:Seara-da-Ciencia-UFC,代码行数:31,代码来源:headerstart.php


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