Beispiel #1
0
function TotoNews_shortcode($atts)
{
    //originally: [TotoMenu var="3"]
    //now: [TotoNews]
    //return getSliderDiv();
    global $totonews_sidebar_buffer;
    $totonews_sidebar_buffer = '';
    ob_start('totonews_output_to_string_buffer');
    dynamic_sidebar('TotoNewsSidebar');
    ob_end_flush();
    extract(shortcode_atts(array('var' => '', 'js' => 'false'), $atts, array('searchWords' => '', 'js' => 'false'), $atts));
    $output = '<style>h1.page-title { display: none !important; } </style>';
    //$output.=getSliderDiv();
    $output .= '<div id="totoNewsContent">';
    //<h4>'.$var.'</h4>';
    $lowestSt = "";
    $searchWords = "";
    if (!empty($_POST)) {
        $searchWords = $_POST["totonews_keywordsSearch"];
        $lowestSt = $searchWords;
        $var = "";
    } else {
        $cat = explode('|', $var);
        $lowestSt = $cat[0];
    }
    $output .= totonews_getNewsContentSt($var, $searchWords, $lowestSt);
    $output .= '</div>';
    //<div class="totonews-sidebar-container" style="width: 34%; float: left;">';
    //$output .= '<br style="clear: both;" />';
    $output .= '</div> ';
    return $output;
}
Beispiel #2
0
function TotoNews_shortcode($atts)
{
    //originally: [TotoMenu var="3"]
    //now: [TotoNews]
    //return getSliderDiv();
    //echo " ".tototranslation_translate_to_language("Economy",  "News", "fra-fr");
    //echo tototranslation_translate_to_language("Economy",  "News", "spa-es");
    global $totonews_sidebar_buffer;
    $totonews_sidebar_buffer = '';
    ob_start('totonews_output_to_string_buffer');
    dynamic_sidebar('TotoNewsSidebar');
    ob_end_flush();
    extract(shortcode_atts(array('var' => '', 'js' => 'false'), $atts, array('searchWords' => '', 'js' => 'false'), $atts, array('search' => '', 'js' => 'false'), $atts, array('iso2' => '', 'js' => 'false'), $atts, array('language' => '', 'js' => 'false'), $atts));
    $output = '<style>h1.page-title { display: none !important; } </style>';
    //$output.=getSliderDiv();
    $output .= '<div id="totoNewsContent">';
    //<h4>'.$var.'</h4>';
    $lowestSt = "";
    $searchWords = "";
    if (!empty($_POST)) {
        $searchWords = $_POST["totonews_keywordsSearch"];
        $lowestSt = $searchWords;
        $var = "";
    } else {
        $cat = explode('|', $var);
        $lowestSt = $cat[0];
    }
    if ($searchWords == "") {
        $searchWords = $search;
    }
    $output .= totonews_getNewsContentSt($var, $searchWords, $lowestSt, $iso2, $language);
    return $output;
}