« Modèle:VILLE 2006 » : différence entre les versions

De Encyclopédie-de-L'AFN_1830-1962
mAucun résumé des modifications
mAucun résumé des modifications
Ligne 1 : Ligne 1 :
<hr>
<includeonly>
{{{Nom_ville}}} -  
{{#phptag:
{{#phptag: $nv = $argv['Nom_ville']; echo $nv; }}
$Nom_ville = $argv['Nom_ville'];
{{{Pays}}} -   
$Nom_actuel=  $argv['Nom_actuel'];
{{#phptag: $nv = $argv['Pays']; echo $nv; }}
$gauche=  $argv['gauche'];
<hr>
$haut=  $argv['haut'];
$Village=  $argv['Village'];
$Pays=  $argv['Pays'];
$ecu=  $argv['ecu'];
$Album=  $argv['Album'];
$Forum=  $argv['Forum']; 
$LAT=  $argv['LAT'];
$LNG=  $argv['LNG'];
$doc =  $argv['doc'];
 
$nom_page= $name ;
 
// initialisation des images
$IMG_ACTU= "[[Image:ecu_$Nom_ville.gif|center|120px]]";
$IMG_DEFO = "[[Image:ecu_vide.gif|center]]";
$IMG_MAROC = "[[Image:Maroc drapeau.png|center]]";
$IMG_TUN = "[[Image:Tunisie drapeau.gif|center]]";
$IMG_ALG = "[[Image:Algérie drapeau.gif|center]]";
 
// création des menus
$MENU_VILLAGE = "*[[Historique $Nom_ville - Ville | Historique]]
*[[MEDIA $Nom_ville - Ville | Médiathèque]]
*[[NET $Nom_ville - Autres sites | Autres sites Internet]]";
 
$MENU_HISTO =" '''Historique'''
*[[Historique Militaire - $Nom_ville - Ville | Historique Militaire]]";
 
MENU_MEDIA ="  '''Médiathèque''' 
*[[:MEDIA $Nom_ville - Ville - DESSINS|DESSINS-CROQUIS]]
*[[:MEDIA $Nom_ville - Ville - PHOTOS|PHOTOS]]
*[[:MEDIA $Nom_ville - Ville - PHOTOS AERIENNES|PHOTOS AERIENNES]]
*[[:MEDIA $Nom_ville - Ville - CARTES POSTALES|CARTES POSTALES]]
*[[:MEDIA $Nom_ville - Ville - FILMS|FILMS]]
*[[:MEDIA $Nom_ville - Ville - SONS-MUSIQUE|SON-MUSIQUE]]
*[[:MEDIA $Nom_ville - Ville - ALBUM|Album Photos]]";
 
$MENU_RECIT = " '''Souvenirs'''
*[[:Histoires $Nom_ville - Ville - Forum|Forum de discussion]]
*[[:Histoires $Nom_ville - Ville - Photos de classe|Photos de classe]]
*[[:Histoires $Nom_ville - Ville - Récits|Souvenirs et Récits personnels]]
*[[:Histoires $Nom_ville - Ville - Traditions|Traditions locales]]
*[[:Histoires $Nom_ville - Ville - STELE|Stèle]]";
 
$MENU_NORMAL = "
*[[Historique $Nom_ville - Ville | Historique]]
*[[Etat AVANT $Nom_ville - Ville | Situation à l'arrivée des Européens]]
*[[Etat APRES $Nom_ville - Ville  | Situation à l'Indépendance]]
*[[Plan $Nom_ville - Ville | Plans]]
*[[Quartiers  $Nom_ville - Ville | Quartiers]]
*[[Population $Nom_ville - Ville | Population]]
*[[MEDIA $Nom_ville - Ville | Médiathèque]]
*[[Histoires $Nom_ville - Ville | J'y ai vécu et je raconte]]
*[[Bibliographie $Nom_ville - Ville | Bibliographie ]]
*[[NET $Nom_ville - Autres sites | Autres sites Internet]]";
 
// ecran divisé en 5 parties initialisation des variables
$ecran_1 ="";
$ecran_2 ="";
$ecran_3 ="";
$ecran_4 ="";
$ecran_5 ="";
 
// condition sur ecu
if ($ecu == "oui") { $ecran_1 =$IMG_ACTU; } else { $ecran_1 =$IMG_DEFO; }
// condition sur pays
$ecran_1 .= "</ br>".$Pays;
// titre menu gauche
$ecran_2="<span class=ombre_texte><big>[[$Nom_ville - Ville | $Nom_ville]]</biG></span> Nom_actuel : $Nom_actuel";
// condition sur menu gauche
if ($Village == "oui") { $ecran_2 .= $MENU_VILLAGE;} else  { $ecran_2 .= $MENU_NORMAL;}
//condition sur menu droit
// condition sur page active selon le nom de la page  montes les liens !
$page_en_cours = substr ( $nom_page, 0, 5) ; if ($page_en_cours == "MEDIA") { if ($Village == "oui") {$ecran_3="";} else { $ecran_3=$MENU_NORMAL;} }
$page_en_cours = substr ( $nom_page, 0, 9) ; if ($page_en_cours == "Histoires") { $ecran_3=$MENU_RECIT;}
$page_en_cours = substr ( $nom_page, 0, 10) ; if ($page_en_cours == "Historique") { $ecran_3=$MENU_HISTO;}
 
}}
 
 
 
 
{{ORI-COMMUN}}
<table border=0 cellpadding=3 align=center width=733 cellspacing = 0 >
<tr BGCOLOR=#bbe5da >
<td valign=middle align=center>
{{#phptags: echo $ecran_1; }}
</td>
<td valign=top width=300>
{{#phptags: echo $ecran_2; }}
</td>
<td valign=top width=300>
{{#phptags: echo $ecran_3; }}
</td>
<td BGCOLOR=#bbe5da align=center width=135>
<div style="position: relative">[[Image:cadre_fond.gif]]
<div style="position: absolute; left: {{#phptags: echo $gauche; }}px; top: {{#phptags: echo $haut;}}px">
{| style="background:transparent"
|-
|[[Image:vise-rep.gif]]
|}
</div>
</div>
</td>
</tr>
 
<tr BGCOLOR=darkseagreen >
<td align=left width = 140>
{{#ifeq | {{{doc}}} ||| [[Documentation {{{Nom_ville}}} - Supplément | Documents Supplémentaires]] }}
 
'''{{#ifeq | {{{Album|}}} ||| [{{{Album}}} Album ] {{#ifeq | {{{Forum|}}} ||| " - " }} }}'''
'''{{#ifeq | {{{Forum|}}} ||| [{{{Forum}}}  Forum] }}'''
<!--[http://anom.archivesnationales.culture.gouv.fr/caomec2/resultats.php?territoire={{{Pays}}}&commune={{#strtoupper|{{#str_replace|" "|+|{{{Nom_ville}}}}}}} Archives officielles]-->
 
<!--Remplacer espaces par '+' et affecter à la variable 'NOM_VILLE'-->
{{#setvar| NOM_VILLE | {{#str_replace|" "| "+" | {{{Nom_ville}}} }} }}
 
<!--Remplacer '-' par '+' et affecter à la variable 'NOM_VILLE'-->
{{#setvar| NOM_VILLE | {{#str_replace|"-"| "+" | {{#var|NOM_VILLE}} }} }}
 
<!--supprimer les caractères accentués du paramètre-->
<!--le é-->
{{#setvar|NOM_VILLE | {{#str_replace | é| e| {{#var|NOM_VILLE}} }} }}
<!--le è-->
{{#setvar|NOM_VILLE | {{#str_replace | è| e| {{#var|NOM_VILLE}} }} }}
<!--le ê-->
{{#setvar|NOM_VILLE | {{#str_replace | ê| e| {{#var|NOM_VILLE}} }} }}
<!--le ë-->
{{#setvar|NOM_VILLE | {{#str_replace | ë| e| {{#var|NOM_VILLE}} }} }}
<!--le à-->
{{#setvar|NOM_VILLE | {{#str_replace | à| a| {{#var|NOM_VILLE}} }} }}
<!--le â-->
{{#setvar|NOM_VILLE | {{#str_replace | â| a| {{#var|NOM_VILLE}} }} }}
<!--le ä-->
{{#setvar|NOM_VILLE | {{#str_replace | ä| a| {{#var|NOM_VILLE}} }} }}
<!--le î-->
{{#setvar|NOM_VILLE | {{#str_replace | î| i| {{#var|NOM_VILLE}} }} }}
<!--le ï-->
{{#setvar|NOM_VILLE | {{#str_replace | ï| i| {{#var|NOM_VILLE}} }} }}
<!--le ô-->
{{#setvar|NOM_VILLE | {{#str_replace | ô| o| {{#var|NOM_VILLE}} }} }}
<!--le ö-->
{{#setvar|NOM_VILLE | {{#str_replace | ö| o| {{#var|NOM_VILLE}} }} }}
<!--le ù-->
{{#setvar|NOM_VILLE | {{#str_replace | ù| u| {{#var|NOM_VILLE}} }} }}
<!--le û-->
{{#setvar|NOM_VILLE | {{#str_replace | û| u| {{#var|NOM_VILLE}} }} }}
<!--le ü-->
{{#setvar|NOM_VILLE | {{#str_replace | ü| u| {{#var|NOM_VILLE}} }} }}
 
<!--Passer en majuscule et affecter à la variable 'NOM_VILLE'-->
{{#setvar| NOM_VILLE | {{#strtoupper|{{#var|NOM_VILLE}} }} }}
 
<!--Affecter le paramètre Pays à la variable '_PAYS'-->
{{#setvar |_PAYS | {{{Pays}}} }}
 
<!--N'appeler les archives que s'il s'agit d'une commune algérienne
{{#ifeq | {{{Pays}}} | ALGERIE  |[http://anom.archivesnationales.culture.gouv.fr/caomec2/resultats.php?territoire={{#var|_PAYS}}&commune={{#var|NOM_VILLE}} Archives officielles] }}
supprimé car génère une erreur
-->
</td>
<td align=center>
</td>
<td align center></td>
<td align=center>''' [[VILLES | Retour<br>Liste des Villes]]'''</td>
</tr>
</table>

Version du 28 avril 2018 à 20:08