0) if(!$GLOBALS["spip_pipeline"]["insert_js"]) $flux .= ThickBox_call_js(); return $flux; } function ThickBox1_header_prive($flux) { include_spip("inc/filtres"); $flux .= ThickBox_call_css(); $flux .= ThickBox_call_js(); return $flux; } function ThickBox1_insert_js($flux){ include_spip("inc/filtres"); // on ajoute la class thickbox aux liens de type="image/xxx" // TODO: ne charger thickbox.js et thickbox.css que si // jQuery("a.thickbox,a[type='image/jpeg'],...").size() > 0) if($flux['type']=='inline') $flux["data"]["ThickBox1"] = ' '; return $flux; } function ThickBox1_verifie_js_necessaire($flux) { //var_dump($flux["page"]); $page = $flux["page"]["texte"]; //cherche avec un type image ou une class thickbox $necessaire = preg_match(",]+(?:(type)|class)\s*=\s*['\"](?(1)image/(?:jpeg|png|gif)|[^>'\"]*\bthickbox\b[^>'\"]*)['\"],iUs",$page); $flux["data"]["ThickBox1"] = $necessaire; return $flux; } function ThickBox_call_js() { $flux = ''; $flux .= ''; return $flux; } function ThickBox_call_css() { $flux = ''; return $flux; } ?>