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


PHP N2Html::link方法代码示例

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


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

示例1: getTemplate

 public function getTemplate($slider)
 {
     return N2Html::tag("div", array("class" => "nextend-smartslider-button-container {fontclass}", "style" => "cursor: pointer; display: {display}; {extrastyle};"), N2Html::link("{content}", "{url}", array("onclick" => 'return false;', "target" => "{target}", "style" => "display: {display}", "class" => "{styleclass} {class} n2-ow")));
 }
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:4,代码来源:button.php

示例2: n2GetBox

        <?php 
function n2GetBox($class, $image, $html, $hasBorder = true)
{
    echo N2Html::tag('div', array('class' => 'n2-box n2-box-title ' . $class . ($hasBorder ? ' n2-box-border' : '')), N2Html::image(N2ImageHelper::fixed('$ss$/admin/images/' . $image)) . N2Html::tag("div", array('class' => 'n2-box-placeholder'), N2Html::tag("table", array(), N2Html::tag("tr", array(), N2Html::tag("td", array('class' => 'n2-box-button'), $html)))));
}
n2GetBox('n2-ss-demo-slider', 'add-demo.png', '<div>' . n2_('100+ Sample slide with one click.') . '</div><a href="#" class="n2-button n2-button-small n2-button-green n2-uc n2-h5">' . n2_('add sample slider') . '</a>');
ob_start();
$this->widget->init("buttonmenu", array("content" => N2Html::tag('div', array('class' => 'n2-button-menu'), N2Html::tag('div', array('class' => 'n2-button-menu-inner n2-border-radius'), N2Html::link(n2_('Import by upload'), $this->appType->router->createUrl(array('sliders/importbyupload')), array('class' => 'n2-h4')) . N2Html::link(n2_('Restore by upload'), $this->appType->router->createUrl(array('sliders/restorebyupload')), array('class' => 'n2-h4')) . N2Html::link(n2_('Import from server'), $this->appType->router->createUrl(array('sliders/importfromserver')), array('class' => 'n2-h4')) . N2Html::link(n2_('Restore from server'), $this->appType->router->createUrl(array('sliders/restorefromserver')), array('class' => 'n2-h4')) . N2Html::link(n2_('Export all slider'), $this->appType->router->createUrl(array('sliders/exportall')), array('class' => 'n2-h4', 'target' => '_blank'))))));
n2GetBox('', 'import-upload.png', '<div>' . n2_('Import slider from different sources.') . '</div>' . N2Html::tag('div', array('class' => 'n2-button n2-button-with-menu n2-button-small n2-button-green'), N2Html::link(n2_('Import by upload'), $this->appType->router->createUrl(array('sliders/importbyupload')), array('class' => 'n2-button-inner n2-uc n2-h5')) . ob_get_clean()));
n2GetBox('n2-box-wide n2-box-overflow n2-box-free', 'free/box2.png', N2Html::tag('div', array(), 'Take your slider to the next level with Smart Slider 3 PRO!') . N2Html::link('See all features', N2SS3::getWhyProUrl(), array('target' => '_blank', 'class' => 'n2-button n2-button-blue n2-button-medium n2-h5 n2-uc')), false);
n2GetBox('', 'Documentation.png', N2Html::tag('div', array(), n2_('Interactive online documentation.')) . N2Html::link(n2_('Read'), 'http://doc.smartslider3.com', array('target' => '_blank', 'class' => 'n2-button n2-button-grey n2-button-small n2-h5 n2-uc')));
n2GetBox('', 'Videos.png', N2Html::tag('div', array(), n2_('Helpful tutorial videos.')) . N2Html::link(n2_('Watch'), 'https://www.youtube.com/watch?v=MKmIwHAFjSU&list=PLSawiBnEUNfvzcI3pBHs4iKcbtMCQU0dB', array('target' => '_blank', 'class' => 'n2-button n2-button-grey n2-button-small n2-h5 n2-uc')));
n2GetBox('', 'Help.png', N2Html::tag('div', array(), n2_('First class support with real people.')) . N2Html::link(n2_('Write'), 'http://smartslider3.com/contact-us/', array('target' => '_blank', 'class' => 'n2-button n2-button-grey n2-button-small n2-h5 n2-uc')));
n2GetBox('', 'Newsletter.png', N2Html::tag('div', array(), n2_('Receive the latest news.')) . N2Html::link(n2_('Subscribe'), 'http://eepurl.com/bDp_8b', array('target' => '_blank', 'class' => 'n2-button n2-button-grey n2-button-small n2-h5 n2-uc')));
n2GetBox('', 'Facebook.png', N2Html::tag('div', array(), n2_('Join the community on Facebook.')) . N2Html::link(n2_('Join'), 'https://www.facebook.com/nextendweb', array('class' => 'n2-button n2-button-grey n2-button-small n2-h5 n2-uc', 'target' => '_blank')));
n2GetBox('', 'Love.png', N2Html::tag('div', array(), n2_('Are you satisfied with Smart Slider 3?')) . N2Html::link(n2_('Yes'), 'http://smartslider3.com/satisfied-customer/', array('target' => '_blank', 'class' => 'n2-button n2-button-green n2-button-small n2-h5 n2-uc')) . N2Html::link(n2_('No'), 'http://smartslider3.com/suggestion/', array('target' => '_blank', 'class' => 'n2-button n2-button-red n2-button-small n2-h5 n2-uc')));
n2GetBox('n2-box-add-license', 'AddLicense.png', '<div>' . n2_('You got the PRO license key?') . '</div><a href="http://doc.smartslider3.com/article/484-updating-the-free-version-to-the-full" target="_blank" class="n2-button n2-button-small n2-button-blue n2-uc n2-h5">' . n2_('Install PRO version') . '</a>');
?>

        <div class="n2-clear"></div>
    </div>

<?php 
if (intval(N2SmartSliderSettings::get('discover', 1)) == 1) {
    N2SmartSliderSettings::set('discover', 0);
    ?>

    <script type="text/javascript">
        n2(window).ready(function () {
            new NextendModal({
                zero: {
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:31,代码来源:index.php

示例3: getLink

 protected function getLink($slide, $data, $content, $attributes = array(), $renderEmpty = false)
 {
     N2Loader::import('libraries.link.link');
     list($link, $target) = (array) N2Parse::parse($data->get('link', '#|*|'));
     if (!$target) {
         $target = '';
     }
     if ($link != '#' || $renderEmpty === true) {
         $link = N2LinkParser::parse($slide->fill($link), $attributes, $this->isEditor);
         return N2Html::link($content, $link, $attributes + array("target" => $target));
     }
     return $content;
 }
开发者ID:RenatoToasa,项目名称:Pagina-Web,代码行数:13,代码来源:N2SliderItemAbstract.php

示例4: _renderGroupOption

 public function _renderGroupOption($group, $sources)
 {
     $options = array();
     foreach ($sources as $type => $info) {
         /**
          * @var $info N2GeneratorInfo
          */
         $options[$type] = $info->title;
         if ($info->hasConfiguration) {
             $button = N2Html::link("Next", $this->appType->router->createUrl(array("generator/checkConfiguration", array("sliderid" => N2Request::getInt('sliderid'), "group" => $group))), array("onclick" => "var el = n2(this); el.attr('href', el.attr('href') + '&type='+el.parents('.n2-box-placeholder').find('select').val());", "class" => "n2-button n2-button-small n2-button-blue"));
         } elseif (!$info->installed) {
             $button = N2Html::link("Check extension", $info->readMore, array("target" => "_blank", "class" => "n2-button n2-button-small n2-button-grey"));
         } else {
             $button = N2Html::link("Next", $this->appType->router->createUrl(array("generator/createSettings", array("sliderid" => N2Request::getInt('sliderid'), "group" => $group))), array("onclick" => "var el = n2(this); el.attr('href', el.attr('href') + '&type='+el.parents('.n2-box-placeholder').find('select').val());", "class" => "n2-button n2-button-small n2-button-blue"));
         }
     }
     $optionsHTML = '';
     foreach ($options as $k => $v) {
         $optionsHTML .= N2Html::tag('option', array('value' => $k), $v);
     }
     echo N2Html::tag('div', array('class' => 'n2-box'), N2Html::image(N2Uri::pathToUri(N2Filesystem::translate($info->path . '/../dynamic.png'))) . N2Html::tag("div", array('class' => 'n2-box-placeholder'), N2Html::tag("table", array(), N2Html::tag("tr", array(), N2Html::tag("td", array('class' => 'n2-box-label'), N2Html::tag('select', array('name' => 'generator-type'), $optionsHTML)) . N2Html::tag("td", array('class' => 'n2-box-button'), $button)))));
 }
开发者ID:MBerguer,项目名称:wp-demo,代码行数:22,代码来源:_view.php

示例5: box

 /**
  * @param $slide  N2SmartSliderSlide
  * @param $slider N2SmartSliderAbstract
  * @param $widget
  * @param $appType
  *
  * @throws Exception
  */
 public static function box($slide, $slider, $widget, $appType)
 {
     $lt = array();
     if ($slide->isStatic()) {
         $lt[] = N2Html::tag('div', array('class' => 'n2-button-tag n2-button n2-button-x-small n2-sidebar-list-bg n2-uc n2-h5'), n2_('Static slide'));
     } else {
         $lt[] = N2Html::tag('div', array('class' => 'n2-button-tag n2-button n2-button-x-small n2-button-green n2-uc n2-h5 n2-slide-is-first'), n2_('First'));
         $lt[] = N2Html::tag('a', array('class' => 'n2-button n2-button-x-small n2-sidebar-list-bg n2-uc n2-h5 n2-slide-first', 'href' => $appType->router->createUrl(array('slides/first', array('sliderid' => $slider->sliderId, 'slideid' => $slide->id) + N2Form::tokenizeUrl()))), n2_('Set First'));
     }
     $rt = array();
     $rt[] = N2Html::tag('a', array('class' => 'n2-button n2-button-small n2-sidebar-list-bg n2-sidebar-list-bg n2-slide-duplicate', 'href' => $appType->router->createUrl(array('slides/duplicate', array('sliderid' => $slider->sliderId, 'slideid' => $slide->id) + N2Form::tokenizeUrl()))), N2Html::tag('i', array('class' => 'n2-i n2-it n2-i-duplicate'), ''));
     $rt[] = N2Html::tag('a', array('class' => 'n2-button n2-button-small n2-sidebar-list-bg n2-slide-delete', 'href' => $appType->router->createUrl(array('slides/delete', array('sliderid' => $slider->sliderId, 'slideid' => $slide->id) + N2Form::tokenizeUrl()))), N2Html::tag('i', array('class' => 'n2-i n2-it n2-i-delete'), ''));
     $rt[] = N2Html::tag('div', array('class' => 'n2-button n2-button-small n2-button-blue n2-slide-selected'), N2Html::tag('i', array('class' => 'n2-i n2-it n2-i-tick'), ''));
     $rb = array();
     if ($slide->hasGenerator()) {
         $rb[] = N2Html::tag('a', array('class' => 'n2-button n2-button-x-small n2-sidebar-list-bg n2-uc n2-h5 n2-slide-generator' . (N2Request::getVar('generator_id') == $slide->generator_id ? ' n2-button-blue' : ''), 'href' => $appType->router->createUrl(array('generator/edit', array('generator_id' => $slide->generator_id)))), 'Edit generator');
     }
     $image = $slide->getThumbnail();
     if (empty($image)) {
         $image = '$system$/images/placeholder/image.png';
     }
     $editUrl = $appType->router->createUrl(array('slides/edit', array('sliderid' => $slider->sliderId, 'slideid' => $slide->id)));
     $widget->init("box", array('attributes' => array('class' => 'n2-box-slide n2-box-overflow' . ($slide->isFirst() ? ' n2-first-slide' : '') . ($slide->isCurrentlyEdited() ? ' n2-ss-slide-active' : ''), 'data-slideid' => $slide->id, 'data-title' => $slide->getRawTitle(), 'data-description' => $slide->getRawDescription(), 'data-link' => $slide->getRawLink(), 'data-image' => N2ImageHelper::fixed($image), 'data-editUrl' => $editUrl), 'image' => N2ImageHelper::fixed($image), 'firstCol' => N2Html::link($slide->getTitle() . ($slide->hasGenerator() ? ' [' . $slide->getSlideStat() . ']' : ''), $editUrl, array('class' => 'n2-h4')), 'lt' => implode('', $lt), 'rt' => implode('', $rt), 'rtAttributes' => array('class' => 'n2-on-hover'), 'rb' => implode('', $rb), 'placeholderContent' => N2Html::tag('a', array('class' => 'n2-slide-published' . ($slide->published ? ' n2-active' : ''), 'href' => $appType->router->createUrl(array('slides/publish', array('sliderid' => $slider->sliderId, 'slideid' => $slide->id) + N2Form::tokenizeUrl()))), N2Html::tag('i', array('class' => 'n2-i n2-it n2-i-unpublished'), ''))));
 }
开发者ID:MBerguer,项目名称:wp-demo,代码行数:32,代码来源:Slides.php

示例6: defined

* @author    Roland Soos
* @copyright (C) 2015 Nextendweb.com
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
**/
defined('_JEXEC') or die('Restricted access');
?>
<div class="n2-table n2-table-fixed n2-ss-slider-publish">
    <div class="n2-tr">
        <div class="n2-td n2-first">
            <div class="n2-h2">Module</div>

            <div class="n2-h4">Create a module to display the slider in template module position:</div>
            <br />
            <br />
            <?php 
echo N2Html::link("Create module", 'index.php?option=com_modules&view=select', array('class' => 'n2-button n2-button-big n2-button-green n2-h3', 'target' => '_blank'));
?>
        </div>
        <div class="n2-td">
            <div class="n2-h2">Articles</div>

            <div class="n2-h4">Paste the code into article:</div>
            <code><div onclick="return selectText(this);">smartslider3[<?php 
echo $sliderid;
?>
]</div></code>
        </div>
        <div class="n2-td n2-last">
            <div class="n2-h2">PHP code</div>

            <div class="n2-h4">Paste the PHP code into source code:</div>
开发者ID:RenatoToasa,项目名称:Pagina-Web,代码行数:31,代码来源:publish.php

示例7: array

         $this->widget->init("buttonmenu", array("content" => N2Html::tag('div', array('class' => 'n2-button-menu'), N2Html::tag('div', array('class' => 'n2-button-menu-inner n2-border-radius'), N2Html::link(n2_('Add images'), '#', array('class' => 'n2-add-quick-image n2-h4')) . N2Html::link(n2_('Add video'), '#', array('class' => 'n2-add-quick-video n2-h4' . (N2Platform::$hasPosts ? '' : ' n2-separator'))) . (N2Platform::$hasPosts ? N2Html::link(n2_('Add post'), '#', array('class' => 'n2-add-quick-post n2-h4')) : '') . N2Html::link(n2_('Create empty slide'), $app->router->createUrl(array("slides/create", array("sliderid" => N2Request::getInt('sliderid'), "static" => 0))), array('class' => 'n2-h4 n2-separator')) . N2Html::link(n2_('Create static slide'), $app->router->createUrl(array("slides/create", array("sliderid" => N2Request::getInt('sliderid'), "static" => 1))), array('class' => 'n2-h4')) . N2Html::link(n2_('Create dynamic slides'), $app->router->createUrl(array("generator/create", array("sliderid" => N2Request::getInt('sliderid')))), array('class' => 'n2-h4'))))));
         $buttonMenu = ob_get_clean();
         ob_start();
         $this->widget->init("buttonmenu", array("content" => N2Html::tag('div', array('class' => 'n2-button-menu'), N2Html::tag('div', array('class' => 'n2-button-menu-inner n2-border-radius'), N2Html::link(n2_('Select all'), '#', array('class' => 'n2-h4')) . N2Html::link(n2_('Select none'), '#', array('class' => 'n2-h4')) . N2Html::link(n2_('Select published'), '#', array('class' => 'n2-h4')) . N2Html::link(n2_('Select unpublished'), '#', array('class' => 'n2-h4'))))));
         $selectButtonMenu = ob_get_clean();
         ob_start();
         $this->widget->init("buttonmenu", array("content" => N2Html::tag('div', array('class' => 'n2-button-menu'), N2Html::tag('div', array('class' => 'n2-button-menu-inner n2-border-radius'), N2Html::link(n2_('Duplicate'), '#', array('class' => 'n2-h4')) . N2Html::link(n2_('Publish'), '#', array('class' => 'n2-h4')) . N2Html::link(n2_('Unpublish'), '#', array('class' => 'n2-h4'))))));
         $actionButtonMenu = ob_get_clean();
         ob_start();
         ?>
             <div class="n2-sidebar-list-bg n2-ss-slides-control">
                 <?php 
         echo N2Html::tag('div', array('class' => 'n2-button n2-button-big n2-button-grey n2-slides-bulk'), N2Html::tag('i', array('class' => 'n2-i n2-i-bulk n2-it'), ''));
         echo N2Html::tag('div', array('class' => 'n2-button n2-button-with-menu n2-button-big n2-button-green n2-slides-add'), N2Html::link(n2_('Add image slide'), '#', array('class' => 'n2-button-inner n2-add-quick-image n2-uc n2-h3')) . $buttonMenu);
         echo N2Html::tag('div', array('class' => 'n2-button n2-button-with-menu n2-button-big n2-button-grey n2-bulk-select'), N2Html::link(n2_('Select'), '#', array('class' => 'n2-button-inner n2-uc n2-h4')) . $selectButtonMenu);
         echo N2Html::tag('div', array('class' => 'n2-button n2-button-with-menu n2-button-big n2-button-grey n2-bulk-action'), N2Html::link(n2_('Delete'), '#', array('class' => 'n2-button-inner n2-uc n2-h4')) . $actionButtonMenu);
         echo N2Html::tag('div', array('class' => 'n2-button n2-button-big n2-button-red n2-bulk-cancel n2-uc n2-h4'), n2_('Cancel'));
         ?>
             </div>
             <?php 
         $preUl = ob_get_clean();
     }
     $actions = '';
     if ($accessEdit) {
         $actions .= N2Html::tag('a', array("href" => $this->appType->router->createUrl(array('slider/duplicate', array('sliderid' => $slider["id"]) + N2Form::tokenizeUrl()))), N2Html::tag('i', array('class' => 'n2-i n2-i-16 n2-i-duplicate n2-i-grey-opacity'), ''));
     }
     if ($accessDelete) {
         $actions .= N2Html::tag('a', array("onclick" => "return NextendDeleteModalLink(this, 'slider-delete', " . json_encode($slider['title']) . ");", "href" => $this->appType->router->createUrl(array('slider/delete', array('sliderid' => $slider["id"]) + N2Form::tokenizeUrl()))), N2Html::tag('i', array('class' => 'n2-i n2-i-16 n2-i-delete n2-i-grey-opacity'), ''));
     }
     $dl[] = array('title' => '<i class="n2-i n2-i-slider"></i><span>' . $slider['title'] . '</span><span class="n2-id n2-h5">#' . $slider['id'] . '</span>', 'link' => $this->appType->router->createUrl(array('slider/edit', array('sliderid' => $slider["id"]))), 'class' => 'n2-ss-slide2-list ' . ($active ? 'n2-open ' : '') . ($active && $controller == 'sliders' ? 'active ' : ''), 'preUl' => $preUl, 'tooltip' => null, 'actions' => $actions);
 }
开发者ID:rfulwell,项目名称:transitionalresources.org,代码行数:31,代码来源:_sliders.php


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