Esempio n. 1
0
	theme software will comply with the CC-GNU-GPL.
*/
if (__FILE__ == $_SERVER['SCRIPT_FILENAME']) {
    die;
}
if (CFCT_DEBUG) {
    cfct_banner(__FILE__);
}
global $vnl_width, $vnl_nesting, $vnl_template, $vnl_utility, $tpl;
$vnl_width = isset($vnl_width) ? $vnl_width : vanilla_get_option("vnl_grid_width");
$vnl_nesting = isset($vnl_nesting) ? $vnl_nesting : vanilla_get_option("vnl_grid_nesting");
$vnl_template = isset($vnl_template) ? $vnl_template : vanilla_get_option("vnl_grid_template");
$vnl_utility = isset($vnl_utility) ? $vnl_utility : vanilla_get_option("vnl_utility_nesting");
// Page-specific overides
//$vnl_width = "yui-d3";
//$vnl_nesting = "yui-gd";
//$vnl_template = "yui-t2";
//$vnl_utility = "yui-bg";
// create a new PHPTAL template object
$template = new PHPTAL(vanilla_get_template('posts/tag.html'));
$template->cleanUpCache();
$tag_title = '<a href="' . get_tag_link(intval(get_query_var('tag_id'))) . '" title="">' . single_tag_title('', false) . '</a>';
$tag_title = sprintf(__('Tag Archives: %s', 'carrington'), $tag_title);
$tpl["page"] = array("width" => $vnl_width, "nesting" => $vnl_nesting, "template" => $vnl_template, "utility" => $vnl_utility, "body_class" => sandbox_body_class(false), "bd_class" => "{$vnl_width} {$vnl_template}", "tag_title" => $tag_title, "cat_description" => $cat_description ? $cat_description : 0);
get_header();
vnl_include('loop');
vnl_include('nav-posts');
get_footer();
// Execute the PHPTAL template
vanilla_output_page($template);
Esempio n. 2
0
function vanilla_widget_block($block = null)
{
    $block = sanitize_title_with_dashes(strtolower($block));
    // Apply action
    do_action('vanilla_widget_' . str_replace('-', '_', $block) . '_before');
    if (function_exists('dynamic_sidebar') && is_sidebar_active($block)) {
        $tpl_source = '<metal:block define-macro="' . str_replace("-", "_", $block) . '">' . "\n" . "<!-- widget block: " . $block . " -->\n" . '<span tal:condition="php:VANILLA_DEBUG" class="widget-debug">' . $block . '</span>' . "\n";
        $tpl_source .= vanilla_widget_template_markup($block);
        $tpl_source .= '${php:vanilla_widget_block_wrapper(\'' . $block . '\')}' . "\n" . '</metal:block><metal:block use-macro="' . str_replace("-", "_", $block) . '" />' . "\n";
        //echo $tpl_source;
        echo "\t\t<div id=\"" . $block . "\" class=\"block\">\n";
        // Load and fire the PHPTAL template!
        ${$block} = new PHPTAL();
        global $tpl_set;
        ${$block}->setSource($tpl_source, $tpl_set . $block);
        vanilla_output_page(${$block});
        echo "</div>\n";
    }
    // Apply action
    do_action('vanilla_widget_' . str_replace('-', '_', $block) . '_after');
}