Exemplo n.º 1
0
function print_slider_item($item_xml)
{
    $xml_size = find_xml_value($item_xml, 'size');
    if ($xml_size == 'full-width') {
        echo '<div class="slider-wrapper fullwidth">';
    } else {
        echo '<div class="slider-wrapper">';
    }
    $slider_width = find_xml_value($item_xml, 'width');
    $slider_height = find_xml_value($item_xml, 'height');
    if (!empty($slider_width) && !empty($slider_height)) {
        $xml_size = $slider_width . 'x' . $slider_height;
    } else {
        $xml_size = '980x360';
    }
    switch (find_xml_value($item_xml, 'slider-type')) {
        case 'Anything Slider':
            print_anything_slider(find_xml_node($item_xml, 'slider-item'), $xml_size);
            break;
        case 'Nivo Slider':
            print_nivo_slider(find_xml_node($item_xml, 'slider-item'), $xml_size);
            break;
        case 'Flex Slider':
            print_flex_slider(find_xml_node($item_xml, 'slider-item'), $xml_size);
            break;
    }
    if (find_xml_value($item_xml, 'size') == 'full-width') {
        echo "<div class='slider-top-shadow slider-gimmick'></div>";
        echo "<div class='slider-bottom-shadow slider-gimmick'></div>";
        echo "<div class='slider-bottom-gimmick slider-gimmick'></div>";
    }
    echo "</div>";
}
Exemplo n.º 2
0
function print_slider_item($item_xml)
{
    $xml_size = find_xml_value($item_xml, 'size');
    if ($xml_size == 'full-width') {
        echo '<div class="gdl-slider-wrapper fullwidth">';
    } else {
        echo '<div class="gdl-slider-wrapper">';
    }
    $slider_width = find_xml_value($item_xml, 'width');
    $slider_height = find_xml_value($item_xml, 'height');
    if (!empty($slider_width) && !empty($slider_height)) {
        $xml_size = $slider_width . 'x' . $slider_height;
    } else {
        if ($xml_size == 'full-width') {
            $xml_size = 'full';
        } else {
            $xml_size = '980x360';
        }
    }
    switch (find_xml_value($item_xml, 'slider-type')) {
        case 'Anything Slider':
            print_anything_slider(find_xml_node($item_xml, 'slider-item'), $xml_size);
            break;
        case 'Nivo Slider':
            print_nivo_slider(find_xml_node($item_xml, 'slider-item'), $xml_size);
            break;
        case 'Flex Slider':
            print_flex_slider(find_xml_node($item_xml, 'slider-item'), $xml_size);
            break;
        case 'Carousel Slider':
            print_carousel_slider(find_xml_node($item_xml, 'slider-item'), $xml_size);
            break;
    }
    echo "</div>";
}