87,42 → 87,6 |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier : '. __FILE__); |
} |
} |
|
/** |
* Stocke une <meta> du type <meta property="truc" content="chose"> |
* @param string $id |
* @param string $property |
* @param string $content |
*/ |
function GEN_stockerMetaProperty($id, $property, $content) |
{ |
if (empty($GLOBALS['_GEN_commun']['meta_property'][$id])) { |
$GLOBALS['_GEN_commun']['meta_property'][$id] = array($property, $content); |
} else { |
die('ERREUR Papyrus : cette balise meta à déjà été enregistrée par GEN_stockerMetaProperty(). <br />'. |
'Identifiant : '. $id .'<br />'. |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier : '. __FILE__); |
} |
} |
|
/** |
* Modifie une <meta> du type <meta property="truc" content="chose"> |
* @param string $id |
* @param string $property |
* @param string $content |
*/ |
function GEN_modifierMetaProperty($id, $property, $content) |
{ |
if ($property != '' && $content != '') { |
$GLOBALS['_GEN_commun']['meta_property'][$id] = array($property, $content); |
} else { |
die('ERREUR Papyrus : cette balise ne peut avoir une propriété ou un contenu vide. <br />'. |
'Contenu : '. $content .'<br />'. |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier : '. __FILE__); |
} |
} |
|
/** Fonction GEN_stockerMetaName() - Permet de stocker des informations pour la balise meta. |
244,7 → 208,7 |
if (empty($sortie)) { |
$sortie .= '<!-- Aucune balise meta http-equiv -->'."\n"; |
} |
} else if ($type == 'name' && isset($GLOBALS['_GEN_commun']['meta_name'])) { |
}else if ($type == 'name' && isset($GLOBALS['_GEN_commun']['meta_name'])) { |
while (list($cle, $valeur) = each($GLOBALS['_GEN_commun']['meta_name'])) { |
if (! empty($valeur['contenu'])) { |
$sortie .= str_repeat(' ', 8).'<meta name="'.$cle.'" content="'.$valeur.'" />'."\n"; |
253,15 → 217,6 |
if (empty($sortie)) { |
$sortie .= '<!-- Aucune balise meta name -->'."\n"; |
} |
} else if ($type == 'property' && isset($GLOBALS['_GEN_commun']['meta_property'])) { |
while (list($cle, $valeur) = each($GLOBALS['_GEN_commun']['meta_property'])) { |
if (! empty($valeur['contenu'])) { |
$sortie .= str_repeat(' ', 8).'<meta property="'.$valeur[0].'" content="'.$valeur[1].'" />'."\n"; |
} |
} |
if (empty($sortie)) { |
$sortie .= '<!-- Aucune balise meta property -->'."\n"; |
} |
} else if ($type == 'dc' && isset($GLOBALS['_GEN_commun']['meta_name_dc'])) { |
while (list($cle, $valeur) = each($GLOBALS['_GEN_commun']['meta_name_dc'])) { |
if (! empty($valeur['contenu'])) { |
312,12 → 267,6 |
$GLOBALS['_GEN_commun']['meta'][$cle] = null; |
} |
} |
} else if ($type == 'property') { |
if (count($GLOBALS['_GEN_commun']['meta_property']) > 0) { |
foreach ($GLOBALS['_GEN_commun']['meta_property'] as $cle => $val) { |
$GLOBALS['_GEN_commun']['meta_property'][$cle] = null; |
} |
} |
} else if ($type == 'dc') { |
if (count($GLOBALS['_GEN_commun']['meta_name_dc']) > 0) { |
foreach ($GLOBALS['_GEN_commun']['meta_name_dc'] as $cle => $val) { |