Your IP : 216.73.216.240
<?php
/** ______________________________________________
* o O | |
* ((((( o < Generated with Cook Self Service V1.5.2 |
* ( o o ) |______________________________________________|
* --------oOOO-----(_)-----OOOo---------------------------------- www.j-cook.pro --- +
* @version 2.0
* @package ElioAllVideos 2
* @subpackage Viewlevels
* @copyright http://www.eliopro.fr 28.10.2012
* @author Félix Dr. Dimitric - http://www.eliopro.fr - felix@eliopro.fr
* @license GNU/GPL
*
* /!\ Joomla! is free software.
* This version may have been modified pursuant to the GNU General Public License,
* and as distributed it includes or is derivative of works licensed under the
* GNU General Public License or other free or open source software licenses.
*
* .oooO Oooo. See COPYRIGHT.php for copyright notices and details.
* ( ) ( )
* -------------\ (----) /----------------------------------------------------------- +
* \_) (_/
*/
defined('_JEXEC') or die;
/**
* Build the route for the com_elioallvideos2 component
*
* @param array An array of URL arguments
*
* @return array The URL arguments to use to assemble the subsequent URL.
*/
function Elioallvideos2BuildRoute(&$query){
$segments = array();
if(isset($query['view']))
{
$view = $query['view'];
$segments[] = $view;
unset( $query['view'] );
}
if(isset($query['layout']))
{
$segments[] = $query['layout'];
unset( $query['layout'] );
}
if(isset($query['cid']))
{
if(in_array($view, array()))
{
$segments[] = (is_array($query['cid'])?implode(',', $query['cid']):$query['cid']);
unset( $query['cid'] );
}
};
return $segments;
}
/**
* Parse the segments of a URL.
*
* @param array The segments of the URL to parse.
*
* @return array The URL attributes to be used by the application.
*/
function Elioallvideos2ParseRoute($segments)
{
$vars = array();
$vars['view'] = $segments[0];
$nextPos = 1;
if (isset($segments[$nextPos]))
{
$vars['layout'] = $segments[$nextPos];
$nextPos++;
}
//Item layout : get the cid value
if(in_array($vars['view'], array()) && isset($segments[$nextPos]))
{
$slug = $segments[$nextPos];
$id = explode( ':', $slug );
$vars['cid'] = (int) $id[0];
$nextPos++;
}
return $vars;
}