3 * BouncingOrange SPIP SEO plugin
7 * @author Pierre ROUSSET (p.rousset@gmail.com)
8 * @copyright Copyright (c) 2009 BouncingOrange (http://www.bouncingorange.com)
9 * @license http://opensource.org/licenses/gpl-2.0.php General Public License (GPL 2.0)
12 if (!defined("_ECRIRE_INC_VERSION")) return;
15 * Inserer les meta dans le head
20 function seo_insert_head($flux){
22 $config = unserialize($GLOBALS['meta']['seo']);
23 if (isset($config['insert_head']) && $config['insert_head']['activate']=='yes'){
24 $contexte = $GLOBALS['contexte'];
25 unset($contexte['lang']);
26 unset($contexte['date']);
27 unset($contexte['date_default']);
28 unset($contexte['date_redac']);
29 unset($contexte['date_redac_default']);
30 unset($contexte['lang']);
31 if (count($contexte)==0){
33 } elseif (isset($contexte['id_article'])) {
34 $id_objet = $contexte['id_article'];
36 } elseif (isset($contexte['id_rubrique'])) {
37 $id_objet = $contexte['id_rubrique'];
41 if (isset($config['meta_tags']) && $config['meta_tags']['activate']=='yes'){
42 if (!defined('_SEO_FORCER_SQUELETTE')){
43 $meta_tags = calculer_meta_tags();
44 $flux .= generer_meta_tags($meta_tags);
47 /* META GOOGLE WEBMASTER TOOLS */
48 if (isset($config['webmaster_tools']) && $config['webmaster_tools']['activate']=='yes' && $objet=='sommaire'){
49 $flux .= generer_webmaster_tools();
52 if (isset($config['bing']) && $config['bing']['activate']=='yes' && $objet=='sommaire'){
53 $flux .= generer_bing();
57 if (isset($config['canonical_url']) && $config['canonical_url']['activate']=='yes'){
58 $flux .= generer_urls_canoniques();
61 /* GOOGLE ANALYTICS */
62 if (isset($config['analytics']) && $config['analytics']['activate']=='yes'){
63 $flux .= generer_google_analytics();
67 if (isset($config['alexa']) && $config['alexa']['activate']=='yes' && $objet=='sommaire'){
68 $flux .= generer_alexa();