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


PHP n2_函数代码示例

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


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

示例1: onSmartsliderDefaultSettings

 public static function onSmartsliderDefaultSettings(&$settings)
 {
     self::initDefaultFont();
     $settings['font'][] = '<param name="item-text-font" type="font" previewmode="paragraph" label="' . n2_('Item') . ' - ' . n2_('Text') . '" default="' . self::$font . '" />';
     self::initDefaultStyle();
     $settings['style'][] = '<param name="item-text-style" type="style" set="heading" previewmode="heading" label="' . n2_('Item') . ' - ' . n2_('Text') . '" default="' . self::$style . '" />';
 }
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:7,代码来源:text.php

示例2: extend

 public static function extend($params)
 {
     $params['labelButton'] = 'WordPress';
     $params['labelDescription'] = n2_('Select a page or a blog post from your WordPress site.');
     $params['image'] = '/element/link_platform.png';
     return $params;
 }
开发者ID:MBerguer,项目名称:wp-demo,代码行数:7,代码来源:url.php

示例3: getLightboxFoldersFunction

 public static function getLightboxFoldersFunction()
 {
     return 'function (callback) {
         this.joomlaModal = new NextendModal({
             zero: {
                 fit: true,
                 size: [
                     980,
                     680
                 ],
                 title: "' . n2_('Images') . '",
                 controlsClass: "n2-modal-controls-side",
                 controls: [\'<a href="#" class="n2-button n2-button-big n2-button-green n2-uc n2-h4">' . n2_('Select') . '</a>\'],
                 content: \'\',
                 fn: {
                     show: function () {
                         this.content.append(nextend.browse.getNode("folder"));
                         this.controls.find(".n2-button-green")
                             .on("click", $.proxy(function (e) {
                                 e.preventDefault();
                                 this.hide(e);
                                 callback(nextend.browse.getCurrentFolder());
                             }, this));
                     }
                 }
             }
         }, true);
     }';
 }
开发者ID:RenatoToasa,项目名称:Pagina-Web,代码行数:29,代码来源:helper.php

示例4: post

 protected function post()
 {
     if (!N2Platform::$hasPosts && !N2PRO) {
         return '';
     }
     return N2Html::tag('a', array('href' => '#', 'class' => 'n2-form-element-clear'), N2Html::tag('i', array('class' => 'n2-i n2-it n2-i-empty n2-i-grey-opacity'), '')) . '<a id="' . $this->_id . '_button" class="n2-form-element-button n2-h5 n2-uc" href="#">' . n2_('Link') . '</a>';
 }
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:7,代码来源:url.php

示例5: isMultiple

 function isMultiple()
 {
     if ($this->_multiple) {
         return ' multiple="multiple" class="nextend-element-hastip" title="' . n2_('Hold down the ctrl (Windows) or command (MAC) button to select multiple options.') . '" ';
     }
     return '';
 }
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:7,代码来源:list.php

示例6: fetchElement

 function fetchElement()
 {
     $min = N2XmlHelper::getAttribute($this->_xml, 'min');
     if ($min == '') {
         $min = '-Number.MAX_VALUE';
     }
     $max = N2XmlHelper::getAttribute($this->_xml, 'max');
     if ($max == '') {
         $max = 'Number.MAX_VALUE';
     }
     N2JS::addInline('new NextendElementNumber("' . $this->_id . '", ' . $min . ', ' . $max . ');');
     $html = N2Html::openTag('div', array('class' => 'n2-form-element-text ' . $this->getClass() . ($this->_xml->unit ? 'n2-text-has-unit ' : '') . 'n2-border-radius', 'style' => $this->fieldType == 'hidden' ? 'display: none;' : ''));
     $subLabel = N2XmlHelper::getAttribute($this->_xml, 'sublabel');
     if ($subLabel) {
         $html .= N2Html::tag('div', array('class' => 'n2-text-sub-label n2-h5 n2-uc'), n2_($subLabel));
     }
     $html .= $this->pre();
     $html .= N2Html::tag('input', array('type' => $this->fieldType, 'id' => $this->_id, 'name' => $this->_inputname, 'value' => $this->_form->get($this->_name, $this->_default), 'class' => 'n2-h5', 'style' => $this->getStyle(), 'autocomplete' => 'off'), false);
     $html .= $this->post();
     if ($this->_xml->unit) {
         $html .= N2Html::tag('div', array('class' => 'n2-text-unit n2-h5 n2-uc'), n2_((string) $this->_xml->unit));
     }
     $html .= "</div>";
     return $html;
 }
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:25,代码来源:number.php

示例7: render

    function render($control_name)
    {
        $this->initTabs();
        $id = 'n2-form-matrix-' . $this->_name;
        $active = intval(N2XmlHelper::getAttribute($this->_xml, 'active'));
        $active = $active > 0 ? $active - 1 : 0;
        $underlined = N2XmlHelper::getAttribute($this->_xml, 'underlined');
        $classes = N2XmlHelper::getAttribute($this->_xml, 'classes');
        ?>

        <div id="<?php 
        echo $id;
        ?>
" class="n2-form-tab n2-form-matrix">
            <div
                class="n2-h2 n2-content-box-title-bg n2-form-matrix-views <?php 
        echo $classes;
        ?>
">
                <?php 
        $i = 0;
        $class = ($underlined ? 'n2-underline' : '') . ' n2-h4 n2-uc n2-has-underline n2-form-matrix-menu';
        foreach ($this->_tabs as $tabName => $tab) {
            echo N2Html::tag("div", array("class" => $class . ($i == $active ? ' n2-active' : '') . ' n2-fm-' . $tabName), N2Html::tag("span", array("class" => "n2-underline"), n2_(N2XmlHelper::getAttribute($tab->_xml, 'label'))));
            $i++;
        }
        ?>
            </div>

            <div class="n2-tabs">
                <?php 
        $i = 0;
        foreach ($this->_tabs as $tabName => $tab) {
            echo N2Html::openTag('div', array('class' => 'n2-form-matrix-pane' . ($i == $active ? ' n2-active' : '') . ' n2-fm-' . $tabName));
            $tab->render($control_name);
            echo N2Html::closeTag('div');
            $i++;
        }
        ?>
            </div>
        </div>

        <?php 
        N2JS::addInline('
            (function(){
                var matrix = $("#' . $id . '"),
                    views = matrix.find("> .n2-form-matrix-views > div"),
                    panes = matrix.find("> .n2-tabs > div");
                views.on("click", function(){
                    views.removeClass("n2-active");
                    panes.removeClass("n2-active");
                    var i = views.index(this);
                    views.eq(i).addClass("n2-active");
                    panes.eq(i).addClass("n2-active");
                });
            })()
        ');
        ?>
    <?php 
    }
开发者ID:MBerguer,项目名称:wp-demo,代码行数:60,代码来源:tabbed.php

示例8: fetchElement

 function fetchElement()
 {
     $html = parent::fetchElement();
     $html .= '<a id="' . $this->_id . '_manage" class="n2-button n2-button-medium n2-button-grey n2-h5 n2-uc n2-expert" href="#">' . n2_('Manage') . '</a>';
     N2JS::addInline('new NextendElementImageManager("' . $this->_id . '", {});');
     return $html;
 }
开发者ID:RenatoToasa,项目名称:Pagina-Web,代码行数:7,代码来源:imagemanager.php

示例9: fetchElement

 function fetchElement()
 {
     $db = JFactory::getDBO();
     $query = 'SELECT
                 m.id, 
                 m.title AS name, 
                 m.title, 
                 m.parent_id AS parent, 
                 m.parent_id
             FROM #__categories m
             WHERE m.published = 1 AND (m.extension = "com_content" OR m.extension = "system")
             ORDER BY m.lft';
     $db->setQuery($query);
     $menuItems = $db->loadObjectList();
     $children = array();
     if ($menuItems) {
         foreach ($menuItems as $v) {
             $pt = $v->parent_id;
             $list = isset($children[$pt]) ? $children[$pt] : array();
             array_push($list, $v);
             $children[$pt] = $list;
         }
     }
     $this->_xml->addChild('option', htmlspecialchars(n2_('All')))->addAttribute('value', '0');
     jimport('joomla.html.html.menu');
     $options = JHTML::_('menu.treerecurse', 1, '', array(), $children, 9999, 0, 0);
     if (count($options)) {
         foreach ($options as $option) {
             $this->_xml->addChild('option', htmlspecialchars($option->treename))->addAttribute('value', $option->id);
         }
     }
     return parent::fetchElement();
 }
开发者ID:RenatoToasa,项目名称:Pagina-Web,代码行数:33,代码来源:joomlacategories.php

示例10: fetchElement

 function fetchElement()
 {
     $easings = array("dojo.fx.easing.linear" => "Linear", "dojo.fx.easing.quadIn" => "Quad_In", "dojo.fx.easing.quadOut" => "Quad_Out", "dojo.fx.easing.quadInOut" => "Quad_In_Out", "dojo.fx.easing.cubicIn" => "Cubic_In", "dojo.fx.easing.cubicOut" => "Cubic_Out", "dojo.fx.easing.cubicInOut" => "Cubic_In_Out", "dojo.fx.easing.quartIn" => "Quart_In", "dojo.fx.easing.quartOut" => "Quart_Out", "dojo.fx.easing.quartInOut" => "Quart_In_Out", "dojo.fx.easing.quintIn" => "Quint_In", "dojo.fx.easing.quintOut" => "Quint_Out", "dojo.fx.easing.quintInOut" => "Quint_In_Out", "dojo.fx.easing.sineIn" => "Sine_In", "dojo.fx.easing.sineOut" => "Sine_Out", "dojo.fx.easing.sineInOut" => "Sine_In_Out", "dojo.fx.easing.expoIn" => "Expo_In", "dojo.fx.easing.expoOut" => "Expo_Out", "dojo.fx.easing.expoInOut" => "Expo_In_Out", "dojo.fx.easing.circIn" => "Circ_In", "dojo.fx.easing.circOut" => "Circ_Out", "dojo.fx.easing.circInOut" => "Circ_In_Out", "dojo.fx.easing.backIn" => "Back_In", "dojo.fx.easing.backOut" => "Back_Out", "dojo.fx.easing.backInOut" => "Back_In_Out", "dojo.fx.easing.bounceIn" => "Bounce_In", "dojo.fx.easing.bounceOut" => "Bounce_Out", "dojo.fx.easing.bounceInOut" => "Bounce_In_Out");
     foreach ($easings as $k => $easing) {
         $this->_xml->addChild('option', n2_($easing))->addAttribute('value', $k);
     }
     return parent::fetchElement();
 }
开发者ID:MBerguer,项目名称:wp-demo,代码行数:8,代码来源:easing.php

示例11: lastCheck

 public function lastCheck()
 {
     $time = $this->storage->get('update', 'lastcheck');
     if (empty($time)) {
         return n2_('never');
     }
     return date("Y-m-d H:i", $time);
 }
开发者ID:MBerguer,项目名称:wp-demo,代码行数:8,代码来源:Update.php

示例12: fetchElement

 function fetchElement()
 {
     $html = N2Html::tag('div', array('class' => 'n2-form-element-text n2-form-element-icon n2-border-radius'), N2Html::image(N2Image::base64Transparent(), '', array('class' => 'n2-form-element-preview')) . '<a id="' . $this->_id . '_edit" class="n2-form-element-button n2-h5 n2-uc" href="#">' . n2_('Choose') . '</a>' . parent::fetchElement());
     N2JS::addInline('
         new NextendElementIconManager("' . $this->_id . '");
     ');
     return $html;
 }
开发者ID:MBerguer,项目名称:wp-demo,代码行数:8,代码来源:iconmanager.php

示例13: generateOptions

 function generateOptions(&$xml)
 {
     $html = '';
     $html .= '<option value="0" ' . $this->isSelected(0) . '>' . n2_('All') . '</option>';
     $html .= '<option value="1" ' . $this->isSelected(1) . '>' . $this->_label . '</option>';
     $html .= '<option value="-1" ' . $this->isSelected(-1) . '>' . sprintf(n2_('Not %s'), $this->_label) . '</option>';
     return $html;
 }
开发者ID:MBerguer,项目名称:wp-demo,代码行数:8,代码来源:filter.php

示例14: onGeneratorList

 function onGeneratorList(&$group, &$list)
 {
     $group[self::$group] = self::$groupLabel;
     if (!isset($list[self::$group])) {
         $list[self::$group] = array();
     }
     $list[self::$group]['article'] = N2GeneratorInfo::getInstance(self::$groupLabel, n2_('Articles'), $this->getPath() . 'article')->setType('article');
     $list[self::$group]['category'] = N2GeneratorInfo::getInstance(self::$groupLabel, n2_('Categories'), $this->getPath() . 'category')->setType('article');
 }
开发者ID:RenatoToasa,项目名称:Pagina-Web,代码行数:9,代码来源:joomlacontent.php

示例15: onGeneratorList

 function onGeneratorList(&$group, &$list)
 {
     $group[self::$_group] = 'Posts';
     if (!isset($list[self::$_group])) {
         $list[self::$_group] = array();
     }
     $list[self::$_group]['posts'] = N2GeneratorInfo::getInstance(self::$groupLabel, n2_('Posts by filter'), $this->getPath() . 'posts')->setType('article');
     $list[self::$_group]['postsbyids'] = N2GeneratorInfo::getInstance(self::$groupLabel, n2_('Posts by IDs'), $this->getPath() . 'postsbyids')->setType('article');
 }
开发者ID:MBerguer,项目名称:wp-demo,代码行数:9,代码来源:posts.php


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