Your IP : 216.73.216.190


Current Path : /proc/1908984/root/proc/2603263/cwd/
Upload File :
Current File : //proc/1908984/root/proc/2603263/cwd/counter.tar

css/counter.css000064400000001353152351610250007527 0ustar00.yt-counter-number { line-height: normal; color: #444444;}
.yt-counter-text { line-height: normal; color: #666666;}
.yt-counter-wrapper {padding: 15px 30px; margin-bottom: 10px}
.yt-counter-icon i {color: #444444;}
.yt-counter-top {
    text-align: center;
}
.yt-counter-left .yt-counter-number {
	text-align: left;
}
.yt-counter-left .yt-counter-desc {
    float: left;
    margin-left: 20px;
}
.yt-counter-left .yt-counter-icon {
    float: left;
    padding-top: 5px;
}

.yt-counter-right .yt-counter-number {
	text-align: right;
}
.yt-counter-right .yt-counter-desc {
    float: right;
    text-align: right;
    margin-right: 20px;
}
.yt-counter-right .yt-counter-icon {
    float: right;
    padding-top: 5px;
}css/index.html000064400000000032152351610250007324 0ustar00<html><body></body></html>js/countUp.js000064400000010607152351610250007157 0ustar00function countUp(a,b,c,d,e,f){for(var g=0,h=["webkit","moz","ms","o"],i=0;i<h.length&&!window.requestAnimationFrame;++i)window.requestAnimationFrame=window[h[i]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[h[i]+"CancelAnimationFrame"]||window[h[i]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(a){var c=(new Date).getTime(),d=Math.max(0,16-(c-g)),e=window.setTimeout(function(){a(c+d)},d);return g=c+d,e}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(a){clearTimeout(a)}),this.options=f||{useEasing:!0,useGrouping:!0,separator:",",decimal:"."},""==this.options.separator&&(this.options.useGrouping=!1),null==this.options.prefix&&(this.options.prefix=""),null==this.options.suffix&&(this.options.suffix="");var j=this;this.d="string"==typeof a?document.getElementById(a):a,this.startVal=Number(b),this.endVal=Number(c),this.countDown=this.startVal>this.endVal?!0:!1,this.startTime=null,this.timestamp=null,this.remaining=null,this.frameVal=this.startVal,this.rAF=null,this.decimals=Math.max(0,d||0),this.dec=Math.pow(10,this.decimals),this.duration=1e3*e||2e3,this.version=function(){return"1.3.1"},this.printValue=function(a){var b=isNaN(a)?"--":j.formatNumber(a);"INPUT"==j.d.tagName?this.d.value=b:this.d.innerHTML=b},this.easeOutExpo=function(a,b,c,d){return 1024*c*(-Math.pow(2,-10*a/d)+1)/1023+b},this.count=function(a){null===j.startTime&&(j.startTime=a),j.timestamp=a;var b=a-j.startTime;if(j.remaining=j.duration-b,j.options.useEasing)if(j.countDown){var c=j.easeOutExpo(b,0,j.startVal-j.endVal,j.duration);j.frameVal=j.startVal-c}else j.frameVal=j.easeOutExpo(b,j.startVal,j.endVal-j.startVal,j.duration);else if(j.countDown){var c=(j.startVal-j.endVal)*(b/j.duration);j.frameVal=j.startVal-c}else j.frameVal=j.startVal+(j.endVal-j.startVal)*(b/j.duration);j.frameVal=j.countDown?j.frameVal<j.endVal?j.endVal:j.frameVal:j.frameVal>j.endVal?j.endVal:j.frameVal,j.frameVal=Math.round(j.frameVal*j.dec)/j.dec,j.printValue(j.frameVal),b<j.duration?j.rAF=requestAnimationFrame(j.count):null!=j.callback&&j.callback()},this.start=function(a){return j.callback=a,isNaN(j.endVal)||isNaN(j.startVal)?(console.log("countUp error: startVal or endVal is not a number"),j.printValue()):j.rAF=requestAnimationFrame(j.count),!1},this.stop=function(){cancelAnimationFrame(j.rAF)},this.reset=function(){j.startTime=null,j.startVal=b,cancelAnimationFrame(j.rAF),j.printValue(j.startVal)},this.resume=function(){j.stop(),j.startTime=null,j.duration=j.remaining,j.startVal=j.frameVal,requestAnimationFrame(j.count)},this.formatNumber=function(a){a=a.toFixed(j.decimals),a+="";var b,c,d,e;if(b=a.split("."),c=b[0],d=b.length>1?j.options.decimal+b[1]:"",e=/(\d+)(\d{3})/,j.options.useGrouping)for(;e.test(c);)c=c.replace(e,"$1"+j.options.separator+"$2");return j.options.prefix+c+d+j.options.suffix},j.printValue(j.startVal)}


jQuery(document).ready(function($) {
    $('.yt-counter-wrapper').each(function() {
        $(this).appear(function() {

            var data      = $(this).data(),
                $id       = $(this).attr('id'),
                $counter  = $(this).find('.yt-counter-number').attr('id'),
                startNum  = parseFloat(data.from),
                endNum    = parseFloat(data.to),
                Num       = (jQuery(this).endNum)+' ',
                speed     = parseInt(data.speed),
                prefix    = data.prefix,
                suffix    = data.suffix,
                sep       = data.separator
                dec_count = Num.split(".");

            if(dec_count[1]){
                dec_count = dec_count[1].length-1;
                var dec   = ".";
            } else {
                dec_count = 0;
                var dec   = "";
            }
            var grouping = true;
            if(sep == "yes"){
                grouping = true;
                sep      = ",";
            } else {
                grouping = false;
                sep      = "";
            }
            var settings = {
                useEasing : true, 
                useGrouping : grouping, 
                separator : sep, 
                decimal : dec,
                prefix : (prefix) ? prefix : '',
                suffix : (suffix) ? suffix : ''
            }
            var ytCounter = new countUp($counter, startNum, endNum, dec_count, speed, settings);
            ytCounter.start();
        });
    });
});js/index.html000064400000000032152351610250007150 0ustar00<html><body></body></html>config.php000064400000015151152351610250006525 0ustar00<?php 
/*
* @package   YouTech Shortcodes
* @author    YouTech Company http://smartaddons.com/
* @copyright Copyright (C) 2015 YouTech Company
* @license   http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
defined('_JEXEC') or die;
	class YT_Shortcode_counter_config {
	static function get_config() {
	        // counter
	        return array(
	        	'count_start' => array(
                    'type'    => 'number',
                    'min'     => 0,
                    'max'     => 9999999,
                    'step'    => 10,
                    'default' => 0,
                    'name'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_COUNT_START'),
                    'desc'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_COUNT_START_DESC'),
                    'child'   => array(
                        'count_end' => array(
                            'type'    => 'number',
                            'min'     => 1,
                            'max'     => 9999999,
                            'step'    => 10,
                            'default' => 5000,
                            'name'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_COUNT_END'),
                            'desc'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_COUNT_END_DESC')
                        ),
                        'counter_speed' => array(
                            'type'    => 'number',
                            'min'     => 1,
                            'max'     => 100,
                            'step'    => 1,
                            'default' => 5,
                            'name'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_COUNTER_SPEED'),
                            'desc'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_COUNTER_SPEED_DESC')
                        )
                    )
                ), 
                'prefix' => array(
                    'default' => '',
                    'name'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_PREFIX'),
                    'desc'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_PREFIX_DESC'),
                    'child'   => array(
                        'suffix' => array(
                            'default' => '',
                            'name'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_SUFFIX'),
                            'desc'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_SUFFIX_DESC')
                        ),
                        'separator' => array(
		                    'type'    => 'bool',
		                    'default' => 'no',
		                    'name'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_SEPARATOR'),
		                    'desc'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_SEPARATOR_DESC')
		                ),
                    )
                ),
                'align' => array(
                    'type'    => 'select',
                    'default' => 'top',
                    'name'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_ALIGN'),
                    'desc'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_ALIGN_DESC'),
                    'values'  => array(
                        'left'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_LEFT'),
                        'right'   => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_RIGHT'),
                    ),
                    'child'   => array(
                    		'background' => array(
								'type'    => 'color',
								'default' => '#FFFFFF',
								'name'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_BACKGROUND'),
								'desc'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_BACKGROUND_DESC')
							),
							'border_radius' => array(
								'default' => '0px',
								'name'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_BORDER_RADIUS'),
								'desc'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_BORDER_RADIUS_DESC')
							),
                    	),
                ),
                'icon' => array(
                    'type'    => 'icon',
                    'default' => '',
                    'name'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_ICON'),
                    'desc'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_ICON_DESC'),
                    'child'   => array(
                        'icon_color' => array(
                            'type'    => 'color',
                            'values'  => array( ),
                            'default' => '#444',
                            'name'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_ICON_COLOR'), 
                            'desc'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_ICON_COLOR_DESC')
                        )
                    )
                ),
                'count_color' => array(
                    'type'    => 'color',
                    'default' => '#444444',
                    'name'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_COUNT_COLOR'),
                    'desc'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_COUNT_COLOR_DESC'),
                    'child'   => array(
                        'count_size' => array(
                            'default' => '32px',
                            'name'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_COUNT_SIZE'),
                            'desc'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_COUNT_SIZE_DESC')
                        )
                    )
                ),
                'text_color' => array(
                    'type'    => 'color',
                    'default' => '#666666',
                    'name'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_TEXT_COLOR'),
                    'desc'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_TEXT_COLOR_DESC'),
                    'child'   => array(
                        'text_size' => array(
                            'default' => '14px',
                            'name'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_COUNTER_TEXT_SIZE'),
                            'desc'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_COUNTER_TEXT_SIZE_DESC')
                        )     
                    )
                ),      
                'border' => array(
                    'type'    => 'border',
                    'default' => '0px solid #DDD',
                    'name'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_BORDER'),
                    'desc'    => JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_BORDER_DESC')
                ),
				'content' => array(
                    'type'    => 'textarea',
                    'default' => '',
                    'name'    => 'Content',
                ),
	        );
	    }
	}

?>shortcode.php000064400000007406152351610250007256 0ustar00<?php 
/*
* @package   YouTech Shortcodes
* @author    YouTech Company http://smartaddons.com/
* @copyright Copyright (C) 2015 YouTech Company
* @license   http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
defined('_JEXEC') or die;
function counterYTShortcode($atts = null, $content = null) {
        $atts = ytshortcode_atts(array(
			'align'         => 'none',
			'text_align'    => 'top',
			'width'         => '',
			'count_start'   => 1,
			'count_end'     => 5000,
			'counter_speed' => 5,
			'separator'     => 'no',
			'prefix'        => '',
			'suffix'        => '',
			'count_color'   => '',
			'count_size'    => '32px',
			'text_color'    => '',
			'text_size'     => '14px',
			'icon'          => '',
			'icon_color'    => '',
			'icon_size'     => '24px',
			'border'        => '',
			'background'    => '',
			'border_radius' => '',
			'class'         => ''
            ), $atts);

        $id = uniqid('ytc').rand().time();
        $css = '';

        if (strpos($atts['icon'], '/') !== false) {
            $atts['icon'] = '<img src="' . yt_image_media($atts['icon']) . '" alt="" />';
			$css .= '#'.$id.' .yt-counter-icon img{width:'.$atts['icon_size'].'}';
        }
        else if (strpos($atts['icon'], 'icon:') !== false) {
            $atts['icon'] = '<i class="fa fa-' . trim(str_replace('icon:', '', $atts['icon'])) . '"></i>';
        }

        $icon = ($atts['icon']) ? '<div class="yt-counter-icon">'. $atts['icon'] .'</div>' : '';
		$css .= '#'.$id.' .yt-counter-icon{float:left; margin-right:10px}';
        $border = ($atts['border']) ? 'border:'.$atts['border'].';' : '';
        $background = ($atts['background']) ? 'background-color:'.$atts['background'].';' : '';

        if ($border or $background) {
            $css .= '#'.$id.' {' .$background.$border.'}';
        }

        $count_color = ($atts['count_color']) ? 'color:' . $atts['count_color'] . ';' : '';
        $text_color = ($atts['text_color']) ? 'color:' . $atts['text_color'] . ';' : '';
        $icon_color = ($atts['icon_color']) ? 'color:' . $atts['icon_color'] . ';' : '';

        $css .= '#'.$id.' .yt-counter-number {font-size: '.$atts['count_size'].'; '. $count_color .' }';
        $css .= '#'.$id.' .yt-counter-text {'. $text_color .' font-size: '.$atts['text_size'].';}';
        $css .= '#'.$id.' i {' . $icon_color .'' . 'font-size:' . $atts['count_size'] . '; line-height: 1.42857;}';
		 $css .= '#'.$id.' {width:'.$atts['width'].'; overflow:auto; border-radius:'.$atts['border_radius'].'}';
		 // Add css file in head
		$doc = JFactory::getDocument();
		$doc->addStyleDeclaration($css);
		JHtml::stylesheet(JUri::base()."plugins/system/ytshortcodes/shortcodes/counter/css/counter.css",'text/css',"screen");
        // Add javascript file in head
		JHtml::_('jquery.framework');
		JHtml::script(JUri::base()."plugins/system/ytshortcodes/assets/js/jquery.appear.js");
		JHtml::script(JUri::base()."plugins/system/ytshortcodes/shortcodes/counter/js/countUp.js");

        $return = '<div id="'. $id .'" class="yt-counter-wrapper clearfix yt-counter-'.$atts['align'].' '. trim($atts['class']) . ' pull-'.$atts['text_align'].'" data-id="'.$id.'" data-from="'.$atts['count_start'].'" data-to="'.$atts['count_end'].'" data-speed="'.$atts['counter_speed'].'" data-separator="'.$atts['separator'].'" data-prefix="'.$atts['prefix'].'" data-suffix="'.$atts['suffix'].'">';
        $return .= $icon;
        $return .= '<div class="yt-counter-desc" >
                <div id="'. $id .'_count"  class="yt-counter-number">
                </div>
                <div class="yt-counter-text">'. parse_shortcode(str_replace(array("<br/>","<br />","<p></p>"), " ", $content)) .'</div>
            </div>';
		$return .= '</div>';

        return $return;
    }
?>