/**
 * frontend_metadata
 *
 * generates page metadata such as meta tags,
 * and javascript/css links that should be contained
 * in the header. This function also has a plugin
 * filter.
 *
 * @todo manually cache css/js files added here
 * @return string of metadata
 */
function frontend_metadata($params, $smarty)
{
    $content = strip_html_tags(frontend_page_content($params, $smarty, true));
    $keywords = meta_keywords($content);
    $description = substr($content, 0, 250) . '...';
    $Template = Template::getInstance();
    $metadata = '
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js"></script>
	<script type="text/javascript" src="' . cache_js('FURASTA_FRONTEND_MULTIDDM', '_inc/js/jquery/multi-ddm.min.js') . '"></script>
	<script type="text/javascript" src="' . cache_js('FURASTA_FRONTEND_FRONTENDJS', '_inc/js/frontend.js') . '"></script>
	<link rel="stylesheet" type="text/css" href="' . cache_css('FURASTA_FRONTEND_FRONTENDCSS', '_inc/css/frontend.css') . '"/>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<meta name="generator" content="Furasta.Org ' . VERSION . '" />
	<meta name="description" content="' . $description . '" />
	<meta name="keywords" content="' . $keywords . '" />
	<link rel="shortcut icon" href="' . SITE_URL . '_inc/img/favicon.ico" />
	<script type="text/javascript">
		window.furasta = {
			site : { 
				url : "' . SITE_URL . '",
				title : "' . $smarty->getTemplateVars('site_title') . '",
				subtitle : "' . $smarty->getTemplateVars('site_subtitle') . '"
			},
			page : {
				id : "' . $smarty->getTemplateVars('page_id') . '" ,
				name : "' . $smarty->getTemplateVars('page_name') . '" ,
				slug : "' . $smarty->getTemplateVars('page_slug') . '" ,
				parent_id : "' . $smarty->getTemplateVars('parent_id') . '"
			},
			postdata : ' . json_encode($_POST);
    if (User::verify()) {
        /**
         * @todo update this to new multiple groups
        $User = User::getInstance( );
        $metadata .= ',
        	user:{
        		id: ' . $User->id( ) . ',
        		name: "' . $User->name( ) . '",
        		group: "' . implode( '', $User->groups( ) ) . '",
        		group_name: "' . implode( $User->groupNames( ) . '"	
        	}';
        */
    }
    $metadata .= '
	};</script>';
    $Plugins = Plugins::getInstance();
    $metadata = $Plugins->filter('frontend', 'filter_metadata', $metadata);
    return $metadata;
}
Exemple #2
0
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php 
echo meta_charset();
?>
" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<title><?php 
echo meta_title();
?>
</title>
<meta name="description" content="<?php 
echo meta_description();
?>
" />
<meta name="keywords" content="<?php 
echo meta_keywords();
?>
" />
<meta property="og:title" content="<?php 
echo meta_title();
?>
" />
<meta property="og:description" content="<?php 
echo meta_description();
?>
" />
<meta property="og:image" content="<?php 
echo meta_image('images/logo.png');
?>
" />
<meta name="robots" content="index, follow" />
Exemple #3
0
<?php 
if (meta_description() != '') {
    ?>
    <meta name="description" content="<?php 
    echo osc_esc_html(meta_description());
    ?>
" />
<?php 
}
if (function_exists('meta_keywords')) {
    ?>
    <?php 
    if (meta_keywords() != '') {
        ?>
        <meta name="keywords" content="<?php 
        echo osc_esc_html(meta_keywords());
        ?>
" />
    <?php 
    }
}
if (osc_get_canonical() != '') {
    ?>
    <link rel="canonical" href="<?php 
    echo osc_get_canonical();
    ?>
"/>
<?php 
}
?>
    <meta http-equiv="Cache-Control" content="no-cache" />
Exemple #4
0
/** 
* function to add head title and meta tags
*
*/
function osclasswizards_meta()
{
    ?>
<title><?php 
    echo osc_esc_html(meta_title());
    ?>
</title>
<?php 
    if (meta_description() != '') {
        ?>
<meta name="description" content="<?php 
        echo osc_esc_html(meta_description());
        ?>
" /><?php 
    }
    if (meta_keywords() != '') {
        ?>
<meta name="keywords" content="<?php 
        echo osc_esc_html(meta_keywords());
        ?>
" /><?php 
    }
}