Changeset 50076 in spip-zone
- Timestamp:
- Jul 29, 2011, 3:16:47 PM (10 years ago)
- Location:
- _plugins_/preprod
- Files:
-
- 2 added
- 2 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/preprod/plugin.xml
r49542 r50076 2 2 3 3 <nom>Pré-prod</nom> 4 <version>1.1. 2</version>4 <version>1.1.3</version> 5 5 6 6 <prefix>preprod</prefix> … … 14 14 </description> 15 15 16 <icon>img/preprod-24.png</icon>17 18 16 <etat>dev</etat> 19 17 … … 23 21 24 22 <pipeline> 25 <nom>affichage_final</nom> 23 <nom>insert_head</nom> 24 <inclure>preprod_pipelines.php</inclure> 25 </pipeline> 26 27 <pipeline> 28 <nom>insert_head_css</nom> 26 29 <inclure>preprod_pipelines.php</inclure> 27 30 </pipeline> -
_plugins_/preprod/preprod_pipelines.php
r48499 r50076 5 5 */ 6 6 7 function preprod_insert_head($flux) 8 { 9 include_spip('inc/autoriser'); 7 10 8 function preprod_affichage_final($page){ 9 10 $pos_head = strpos($page, '</head>'); 11 // si pas de </head> 12 if ($pos_head === false) { 13 return $page; 11 if (autoriser('configurer')) { 12 $js = find_in_path("preprod.js"); 13 if ($js) 14 $flux .= '<script type="application/javascript" src="'. $js .'"></script>'; 14 15 } 16 return $flux; 17 } 15 18 16 // si admin 17 include_spip('inc/autoriser'); 18 if (autoriser('configurer')) { 19 $jsFile = generer_url_public('preprod.js'); 20 include_spip('public/spip_bonux_balises'); 21 22 $head_reperes = "<!-- insertion du js preprod --><script src='$jsFile' type='text/javascript'></script>"; 23 $head_reperes .= '<!-- insertion de la css preprod --><link rel="stylesheet" type="text/css" href="' . produire_css_fond('preprod.css') . '" media="all" />'; 24 $page = substr_replace($page, $head_reperes, $pos_head, 0); 25 26 } 27 28 return $page; 29 19 function preprod_insert_head_css($flux) 20 { 21 $css = find_in_path('preprod.css'); 22 if ($css) 23 $flux .= '<link rel="stylesheet" type="text/css" media="all" href="'.$css.'" />'; 24 return $flux; 30 25 } 31 26
Note: See TracChangeset
for help on using the changeset viewer.