|
|
|
@ -79,19 +79,17 @@ function tarteaucitron_porte_plume_barre_pre_charger($barres){
|
|
|
|
|
$services_actifs = array_filter(lire_config('tarteaucitron/services', array())); |
|
|
|
|
foreach ($services_actifs as $service => $value) { |
|
|
|
|
if ($modele=find_in_path('modeles/tac_' . $service . '.html')) { |
|
|
|
|
if (file_exists($modele)){ |
|
|
|
|
$file = fopen($modele,"r"); |
|
|
|
|
$text = fgets($file); |
|
|
|
|
if ($text!="Placez le code HTML"){ |
|
|
|
|
$menu_items[] = array( |
|
|
|
|
"id" => $service, |
|
|
|
|
"name" => $service, |
|
|
|
|
"className" => 'tac_' . $service, |
|
|
|
|
"openWith" => "<tac_" . $service . "|id=", |
|
|
|
|
'closeWith' => '[![' . _T('tarteaucitron:id_contenu') . ']!]>', |
|
|
|
|
"display" => true |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
$file = fopen($modele,"r"); |
|
|
|
|
$text = fgets($file); |
|
|
|
|
if (($text!="<p>Placez le code HTML</p>") && (find_in_path('icones_barre/' . $service . '.png'))) { |
|
|
|
|
$menu_items[] = array( |
|
|
|
|
"id" => $service, |
|
|
|
|
"name" => $service, |
|
|
|
|
"className" => 'tac_' . $service, |
|
|
|
|
"openWith" => "<tac_" . $service . "|id=", |
|
|
|
|
'closeWith' => '[![' . _T('tarteaucitron:id_contenu') . ']!]>', |
|
|
|
|
"display" => true |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -117,8 +115,13 @@ function tarteaucitron_porte_plume_lien_classe_vers_icone($flux){
|
|
|
|
|
$icons = array('tac_drop' => 'tac.png'); |
|
|
|
|
$services_actifs = array_filter(lire_config('tarteaucitron/services', array())); |
|
|
|
|
foreach ($services_actifs as $service => $value) { |
|
|
|
|
if (find_in_path('modeles/tac_' . $service . '.html')) { |
|
|
|
|
$icons['tac_' . $service] = $service . '.png'; |
|
|
|
|
if ($modele=find_in_path('modeles/tac_' . $service . '.html')) { |
|
|
|
|
$file = fopen($modele,"r"); |
|
|
|
|
$text = fgets($file); |
|
|
|
|
|
|
|
|
|
if (($text!="<p>Placez le code HTML</p>") && (find_in_path('icones_barre/' . $service . '.png'))) { |
|
|
|
|
$icons['tac_' . $service] = $service . '.png'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|