Your IP : 216.73.216.11


Current Path : /home/digilove/www/plugins/system/ytshortcodes/shortcodes/points/
Upload File :
Current File : /home/digilove/www/plugins/system/ytshortcodes/shortcodes/points/shortcode.php

<?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 pointsYTShortcode($atts, $content = null){
	global $no_number;

	extract(ytshortcode_atts(array(
		"src"		=> '',
		"width"		=> '',
	), $atts));
	$css ='';
	$id = uniqid('points_').rand().time();
	$points = JHtml::stylesheet(JUri::base()."plugins/system/ytshortcodes/shortcodes/points/css/points.css",'text/css',"screen");
	if ($src == '')
	{
		 $src = 'plugins/system/ytshortcodes/assets/images/URL_IMAGES.png';
	}
	$src = (strpos($src, "http://") === false) ? JURI::base().$src : $src;
	$css .= "#".$id."{max-width:".$width."%}";
	$doc = JFactory::getDocument();
	$doc->addStyleDeclaration($css);
	$points .= "<div class='yt-product-wrapper' id='".$id."'>";
	$points .= '<img src="'.$src.'" alt="Preview image"><ul class="blank">';
	$points .= parse_shortcode(str_replace(array("<br/>", "<br>", "<br />"), " ", $content)) ;
	$points .= '</ul></div>';

	return $points;
}
?>