Changeset 93540 in spip-zone
- Timestamp:
- Dec 11, 2015, 3:31:27 PM (5 years ago)
- Location:
- _plugins_/cookiebar/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/cookiebar/trunk/cookiebar_pipelines.php
r91846 r93540 1 1 <?php 2 /** 3 * Plugin Cookie bar pour Spip 3.0. 4 * 5 * @licence GNU/GPL 6 * @package SPIP\Cookiebar\Pipelines 7 */ 8 if (!defined('_ECRIRE_INC_VERSION')) 9 return; 2 10 3 11 /** 4 * Plugin Cookie bar pour Spip 3.0. 12 * Inserer la CSS de cookie bar dans le head public. 13 * 14 * @pipeline insert_head_css 15 * 16 * @param string $flux 17 * Le contenu de la balise #INSERT_HEAD_CSS 18 * @return string 5 19 */ 6 if (!defined('_ECRIRE_INC_VERSION')){7 return; 8 } 20 function cookiebar_insert_head_css($flux){ 21 if(defined('_COOKIEBAR_CSS_NON')) 22 return $flux; 9 23 10 /** 11 * Inserer la CSS de cookie bar. 12 * 13 * @param $flux 14 * 15 * @return mixed 16 */ 17 function cookiebar_insert_head_css($flux) 18 { 19 if (defined('_COOKIEBAR_CSS_NON')) { 20 return $flux; 21 } 24 $flux .= '<link rel="stylesheet" type="text/css" href="'.find_in_path('css/jquery.cookiebar.css').'" />'; 22 25 23 $flux .= '<link rel="stylesheet" type="text/css" href="'.find_in_path('css/jquery.cookiebar.css').'" />'; 24 25 return $flux; 26 return $flux; 26 27 } 27 28 … … 29 30 * Inserer le javascript de cookiebar. 30 31 * 31 * @param $flux 32 * 32 * @pipeline insert_head 33 * 34 * @param string $flux 35 * Le contenu de la balise #INSERT_HEAD 33 36 * @return mixed 34 37 */ 35 function cookiebar_insert_head($flux) 36 { 37 //$js_cookiebar = parametre_url(generer_url_public('jquery.cookiebar.js'), 'lang', $lang); 38 include_spip('inc/filtres'); 39 if (!$lang) { 40 $lang = (isset($GLOBALS['spip_lang']) ? $GLOBALS['spip_lang'] : 'fr'); 41 } 42 $js_cookiebar = produire_fond_statique('jquery.cookiebar.js', array('lang' => $lang)); 38 function cookiebar_insert_head($flux){ 39 include_spip('inc/filtres'); 40 41 $lang = (isset($GLOBALS['spip_lang']) ? $GLOBALS['spip_lang'] : 'fr'); 42 $js_cookiebar = produire_fond_statique('jquery.cookiebar.js', array('lang' => $lang)); 43 43 44 $flux .= "<script type='text/javascript' src='$js_cookiebar'></script>\n" 45 ."<script type='text/javascript' src='".find_in_path('js/jquery.cookiebar.call.js')."'></script>";44 $flux .= "<script type='text/javascript' src='$js_cookiebar'></script>\n"; 45 $flux .= "<script type='text/javascript' src='".find_in_path('js/jquery.cookiebar.call.js')."'></script>"; 46 46 47 47 return $flux; 48 48 } -
_plugins_/cookiebar/trunk/paquet.xml
r91846 r93540 2 2 prefix="cookiebar" 3 3 categorie="communication" 4 version="1.1. 5"4 version="1.1.6" 5 5 etat="test" 6 6 compatibilite="[3.0.17;3.1.*]" … … 8 8 documentation="http://contrib.spip.net/4554" 9 9 > 10 11 12 13 14 15 16 10 <nom>cookiebar</nom> 11 <auteur lien='http://www.primebox.co.uk/projects/cookie-bar/'>primebox</auteur> 12 <auteur lien="http://www.erational.org">erational (mise en plugin)</auteur> 13 <licence lien="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</licence> 14 15 <pipeline nom="insert_head_css" inclure="cookiebar_pipelines.php" /> 16 <pipeline nom="insert_head" inclure="cookiebar_pipelines.php" /> 17 17 </paquet>
Note: See TracChangeset
for help on using the changeset viewer.