コード例 #1
0
ファイル: zt_accordion.php プロジェクト: spikart/LDMU.UA
/**
 * Zt Shortcodes
 * A powerful Joomla plugin to help effortlessly customize your own content and style without HTML code knowledge
 * 
 * @name        Zt Shortcodes
 * @version     2.0.0
 * @package     Plugin
 * @subpackage  System
 * @author      ZooTemplate 
 * @email       support@zootemplate.com 
 * @link        http://www.zootemplate.com 
 * @copyright   Copyright (c) 2015 ZooTemplate
 * @license     GPL v2 
 */
defined('_JEXEC') or die('Restricted access');
$contentId = ZtShortcodesHelperCommon::getUniqueString('zt-content-');
?>
<div class="accordion-section">
    <a class="accordion-section-title<?php 
echo $attributes->get('active') == "yes" ? ' active' : '';
?>
" href="#<?php 
echo $contentId;
?>
"><i class="fa <?php 
echo $attributes->get('active') == "yes" ? 'fa-minus' : 'fa-plus';
?>
"></i><?php 
echo $attributes->get('title');
?>
</a>
コード例 #2
0
ファイル: zt_carousel.php プロジェクト: spikart/LDMU.UA
 * @name        Zt Shortcodes
 * @version     2.0.0
 * @package     Plugin
 * @subpackage  System
 * @author      ZooTemplate 
 * @email       support@zootemplate.com 
 * @link        http://www.zootemplate.com 
 * @copyright   Copyright (c) 2015 ZooTemplate
 * @license     GPL v2 
 */
defined('_JEXEC') or die('Restricted access');
?>

<div class="carousel-wrap">
    <div class="carousel-slider" id="<?php 
echo ZtShortcodesHelperCommon::getUniqueString('zt-carousel-');
?>
"
         data-items="<?php 
echo $attributes->get('showItem');
?>
"
         data-duration="<?php 
echo $attributes->get('duration');
?>
"
         data-responsinve="<?php 
echo $attributes->get('enableReponsive');
?>
">
コード例 #3
0
ファイル: zt_accordions.php プロジェクト: spikart/LDMU.UA
/**
 * Zt Shortcodes
 * A powerful Joomla plugin to help effortlessly customize your own content and style without HTML code knowledge
 * 
 * @name        Zt Shortcodes
 * @version     2.0.0
 * @package     Plugin
 * @subpackage  System
 * @author      ZooTemplate 
 * @email       support@zootemplate.com 
 * @link        http://www.zootemplate.com 
 * @copyright   Copyright (c) 2015 ZooTemplate
 * @license     GPL v2 
 */
defined('_JEXEC') or die('Restricted access');
$parentId = ZtShortcodesHelperCommon::getUniqueString('zt-accordion-');
?>
<div class="accordion<?php 
echo ' accordion-' . $attributes->get('type');
?>
" id="<?php 
echo $parentId;
?>
">

    <!-- Sub content -->
    <?php 
echo $content;
?>
    
</div>
コード例 #4
0
ファイル: zt_tabs.php プロジェクト: spikart/LDMU.UA
 /**
  * Prepare attributes for this tag
  * @param array $atts
  * @param type $tag
  * @return type
  */
 public function init($atts, $tag)
 {
     $atts['id'] = ZtShortcodesHelperCommon::getUniqueString($tag);
     return $atts;
 }
コード例 #5
0
ファイル: parser.php プロジェクト: spikart/LDMU.UA
 /**
  * Regular Expression callable for do_shortcode() for calling shortcode hook.
  * @see get_shortcode_regex for details of the match array contents.
  *
  * @since 2.5.0
  * @access private
  * @uses $shortcode_tags
  *
  * @param array $m Regular expression match array
  * @return mixed False on failure.
  */
 public function do_shortcode_tag($m)
 {
     // Provide caching for same shortcodes
     $cacheId = ZtShortcodesHelperCommon::getCacheId($m);
     $cache = JFactory::getCache('ztshortcodes', '');
     $html = $cache->get($cacheId);
     if ($html === false) {
         // allow [[foo]] syntax for escaping a tag
         if ($m[1] == '[' && $m[6] == ']') {
             return substr($m[0], 1, -1);
         }
         $tag = $m[2];
         // Get attributes of this shortcode instance
         $attr = $this->shortcode_parse_atts($m[3]);
         // Callback for parent prepare
         $callback = $this->shortcode_tags[$tag];
         // Do init for asked tag
         if (method_exists($callback[0], 'init')) {
             $attr = call_user_func(array($callback[0], 'init'), $attr, $tag);
         }
         // Shortcode data exists
         if (isset($this->_shortcodes[$tag])) {
             // Process for subTags if needed
             if (isset($this->_shortcodes[$tag]['subTag'])) {
                 foreach ($this->_shortcodes[$tag]['subTag'] as $subTag => $subData) {
                     $subParser = ZtShortcodesParser::getInstance();
                     $subData['attributes']['_parent'] = $attr;
                     $subParser->add_shortcode($subTag, $subData);
                     if (isset($m[5])) {
                         $m[5] = $subParser->do_shortcode($m[5]);
                     }
                 }
             }
             // Have attributes than we merge with default
             if (is_array($attr)) {
                 if (isset($this->_shortcodes[$tag]['attributes'])) {
                     $attr = array_merge($this->_shortcodes[$tag]['attributes'], $attr);
                 }
             } else {
                 if (isset($this->_shortcodes[$tag]['attributes'])) {
                     $attr = $this->_shortcodes[$tag]['attributes'];
                 }
             }
         }
         if (isset($m[5])) {
             // Recursive shortcodes in content
             if ($this->hasShortcodes($m[5])) {
                 $m[5] = $this->do_shortcode($m[5]);
             }
             // enclosing tag - extra parameter
             $html = $m[1] . call_user_func($this->shortcode_tags[$tag], $attr, $m[5], $tag) . $m[6];
         } else {
             // self-closing tag
             $html = $m[1] . call_user_func($this->shortcode_tags[$tag], $attr, null, $tag) . $m[6];
         }
         // Store cache
         $cache->store($html, $cacheId);
     }
     return $html;
 }
コード例 #6
0
    $this->load('Shortcodes://html/admin/form.php', array('data' => $data, 'class' => 'zt-form parent', 'shortcode' => $shortcode));
    ?>
                        <?php 
    if (isset($data['subTag'])) {
        ?>
                        <!-- Sub tag -->
                        <div class="container-child">

                                <?php 
        $subTag = $data['subTag'];
        ?>
                                <?php 
        foreach ($subTag as $subShortcode => $data) {
            ?>
                                    <?php 
            $subShortcodeAlias = ZtShortcodesHelperCommon::getAlias($subShortcode);
            ?>
                                    <div class="zt-sub">
                                        <?php 
            $this->load('Shortcodes://html/admin/form.php', array('data' => $data, 'class' => 'zt-form child', 'shortcode' => $subShortcode));
            ?>
                                    </div>

                                <?php 
        }
        ?>

                                <button
                                    type="button"
                                    class="btn btn-default"
                                    onClick="zt.shortcode.cloneChildForm('#<?php 
コード例 #7
0
ファイル: form.php プロジェクト: spikart/LDMU.UA
<?php

/**
 * @name        Zt Shortcodes
 * @package     Plugin
 * @subpackage  System
 * @author      Viet Vu <*****@*****.**>
 * @link        http://jooservices.com
 * @copyright   JOOservices Ltd
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 * 
 * @version    1.0.2
 * @since      1.0.0
 */
defined('_JEXEC') or die('Restricted access');
$id = ZtShortcodesHelperCommon::getAlias($shortcode);
?>
<form 
    class="<?php 
echo $class;
?>
" 
    id="<?php 
echo $id;
?>
"
    data-tag="<?php 
echo $shortcode;
?>
"
    >
コード例 #8
0
ファイル: zt_tabs.php プロジェクト: spikart/LDMU.UA
    $tabs = $ztShortcodes['tabs'][$attributes->get('id')];
    $hrefs = array();
    ?>
    <div role="tabpanel" class="zt-tabs zt-tab-<?php 
    echo $attributes->get('type');
    ?>
">
        <?php 
    if ($attributes->get('type') != 'bottom-tabs') {
        ?>
            <ul
                class="nav nav-tabs">
                    <?php 
        foreach ($tabs as $key => $tab) {
            $tabkey = str_replace(" ", "-", $tab['attributes']->get('title'));
            $hrefs[$key] = ZtShortcodesHelperCommon::getUniqueString(strtolower($tabkey));
            ?>
                    <li class="<?php 
            echo $tab['attributes']->get('active') == 'yes' ? 'active' : '';
            ?>
">
                        <a
                            href="#<?php 
            echo $hrefs[$key];
            ?>
"
                            data-toggle="tab">
                                <?php 
            echo $tab['attributes']->get('title');
            ?>
                        </a>