Afficher le saint du jour (breton/français)

Soyez le premier à donner votre avis sur cette source.

Snippet vu 35 835 fois - Téléchargée 27 fois

Contenu du snippet

Pour votre site, simple et rapide a installer.
Deux petits js externes (un pour le calendrier français, l'autre pour le breton) et c'est tout...
On insère ou on veut dans le style que l'on veut...
Si vous creez une nouvelle base (calendriere gaelique ou autre....) prévenez-moi merci.

Source / Exemple :


==================================
1- jssants.js (external javascript jsfile)
==================================
<!--
//--------------------jssants.js----------------------------
// ·.zz,ø?º°°º?ø,zz.°@2004-VB'Breizh ·.zz,ø?º°°º?ø,zz.°
//----------------------------------------------------------
var mm;
var today= new Date();
var smonth= 1+(today.getMonth());
if (smonth==1) {
mm= new Array("Mari...Maï","Bazil","Jenovefa","Ruvon","Konvohuon","Peran...Tifenn","Kentigerna","Madeg","Faelan","Tezwin","Boandan","Kentigern","Enogad","Tarieg","Ida","Brevalaer","Anton","Bleizmag","Ingwenog","Doezwal","Oanez","Honhouarn","Kadog","Sant Fransez ar Zal","Paol kristenned","Konan...Conan","Gildwin","Gwenvidig Juluan Maner","Gweltaz","Marzhina...Gildas","Maedog");}
if (smonth==2) {
mm= new Array("Berc’hed","Chandelour","Yann ar Gael","Morvred","Agata","Amanz","Dehren","Yagu...Jagu","Telio","Kronan","Ehouarn","Riog...Rieg","Konran","Klaoda...Glaoda","Finan","Kireg","Fintan","Odran","Olkan","Gwenn","Kador sant Per","Inog","Gwenvidig Roparzh","Maeldan","Onen","Komgan","Ruellan...Rivelen","...");}
if (smonth==3) {
mm= new Array("Albin","Jaoua...Yaouen","Gwenole","Nonn","Gwezeneg","Kadroeg","Levenez","Senan","Laouen","Maela","Himelin","Paol","Muran","Kennoka","Loeiza","Benniget","Padrig","Korvaz","Joseb...Jobig","Justog","Endeg","Feleb...Fulup...Felepig","Maedog","Kristell","Ar Helou Mad","Goal","Gelas","Gondlez","Gwalduz","Gwillerm...Lomm...Lomig","Gwion");}
if (smonth==4) {
mm= new Array("Jilberz","Keallah","Iduned","Gwier...Goneri","Visant","Iniorog","Marsellin","Kleden","Gwendad","Gwazeg","Stanislas","Bodmael","Karadeg","Ruazan","Padern","Benead Job","Donnan","Ouzog","Estin...Jestin","Hamon","Anselm...Selmi","Beuno","Jord","Firmaz","Mark","Segondel","Louziern","Loeiz-Vari","Katell a Ziern","Onnen");}
if (smonth==5) {
mm= new Array("Brieg","Kellag","Fulup Jakez","Konlez","Endal","Youlida","Hernin","Tunevel","Komgall","Per Rene","Tudi","Kongar","Gwenganton","Mazeas","Privael...Primel","Brendan","Karantek...Karadek","Tudon","Erwan","Kadour","Patern...Padern","Markant","Gwiberz","Donasian","Beda","Nen","Seven","Eliboubann","Burienn","Kaedog","Nerin");}
if (smonth==6) {
mm= new Array("Ronan","Koupaia","Kevin","Pereg","Bonifas","Norberz","Meriadeg","Medarz","Koulmkel","Efrem","Barnabas","Herbod...Herbot","Anton","Dogmael","Nouga","Sambin","Herve","Maelvon","Riwanon","Meven","Nolwenn","Haran","Bili","Yann...Yannig...Yoann","Salaün","Tereza","Goharz","Eostol","Per...Paol","Alban-Julian");}
if (smonth==7) {
mm= new Array("Luner...Servan","Oudog","Tomas","Goulven","Marz","Feliz","Gouziern","Kilien...Kilian","Gergwen","Pasker","Benead","Olier","Joel...Johel","Turio","Donald","Tenenan","Balae","Goneri","Menou","Riwal...Marine","Trifina","Madalen...Magda","Loeva...Seve","Milio...Melio","Jakez...Jakou","Anna...Annig...Anaïg...Naïg","Gunevel","Samzun","Gwillou...Lomig","Edwardz","Garmon");}
if (smonth==8) {
mm= new Array("Friard","Unieg","Kened","Yann-Vari","Lougaed","Jezuz war an Tabor","Kassian","Dominik","Almeda","Laorans","Klara","Sklerijenn","Rou ar Fusteg","Riowen","Maïwenn...Mari saved d'an Nenv","Armel...Gwennin...Roch","Elena...Lena...Lenaïg","Arzel...Armel","Yann-Eudes","Bernez","Yuna...Youna","Emilian...Milo","Rozenn","Bertele","Loeiz...loiz...Gourloes...Urlou","Edern","Mona","Aousten","Yann dibennet","Frieg","Trehour");}
if (smonth==9) {
mm= new Array("Jili","Merzerien Weng","Gregor","Just","Agnan","Tegoned","Alan","Ginivelez ar Werhez","Kieran","Gunwal","Deniol","Modan","Merin","Kroaz ar Zant","I.V. ar Hlabad","Korneli","Urfol","Dider","Sezni...Seni","Ninian","Vaze","Emeran","Solen...Solenn...Solena","Leri","Blenlivet","Maogan","Vinsant","Charles Bleiz","Mikel...Mikelig...Mikaël...Mikaëla...Kaelig...Kelig","Yerom");}
if (smonth==10) {
mm= new Array("Friard","Unieg","Kened","Yann-Vari","Lougaed","Jezuz war an Tabor","Euriell...Uria","Meler","Fragan","Sant Fransez Asiz","Morvan...Moarc'h","Ivy","Ke...Kaïe...Kile...Kenan","Morgan...Morgane","Denez","Kler","Kaenneh","Eflam...Enora","Ternog","Vial","Tereza","Gall...Galig...Galou...Lezig...Lezou","Gwyn","Lukas","Judul...Judual","Moran","Gwenegan...Conogan","Benead","Melar","Marzin a Wertu","Gouesnou","Alor","Maglor","Simon...Jud","Rosaod","Sulio","Maeog");}
if (smonth==11) {
mm= new Array("An Olizent","An Anaon","Gwenaël","Maël...Maela","Franseza Amboaz","Gwinog","Melan...Melaine","Iltud","Treveur...Trevor","Leo ar Meur","Marzin","Kovran","Amanz","Devrig","Malo","Maharid","Emilion","Vaodez...Maudez","Beuzeg","Tangi...Eodez","Werhez Mari kinniget","Aziliz","Kouloum","Kenan...Konan","Katell...Bieuzi","Kondeleg","Goustan","Hermelan","Houardon","Andreo...Andreu...Andro");}
if (smonth==12) {
mm= new Array("Tual...Tudal...Tugdual","Alar...Alarig","Fransez Savier","Tudeg","Jumael","Nikolaz","Ambroaz","Ar Werhez Dinamm","Budog","Kouled","Fidwezen","Kaourintin...Korentin...Kaourant","Judog","Eginer...Fingar","Nina...Yann Diarhen","Finden","Jezekaël...Jezekel...Kaëlig...Kaëla","Briag","Yuzel","Abraham","Klervia","Amadeg...Soaz...Soazig","Tujen","Tazan","Gouel Nedeleg","Steven","Yann avieler","An Inosanted Sent","Maelig","Maeldrog","Jilvestr");}
var sday= (today.getDate())-1;
//alert(mm[sday]) ;
document.write(mm[sday]) ;
-->
==================================
2- jssaints.js (external javascript jsfile)
==================================
<!--
//--------------------jssaints.js----------------------------
// ·.zz,ø?º°°º?ø,zz.°@2004-VB'Breizh ·.zz,ø?º°°º?ø,zz.°
//----------------------------------------------------------
var mm;
var today= new Date();
var smonth= 1+(today.getMonth());
if (smonth==1) {
mm= new Array("Jour de l'An","Bazile","Geneviève","Odilon","Edouard","Mélaine","Raymond","Lucien","Alix","Guillaume","Paulin","Tatiana","Yvette","Nina","Rémi","Marcel","Roseline","Prisca","Marius","Sébastien","Agnès","Vincent","Barnard","François de Sales","Conversion de St.Paul","Paule","Angèle","Thomas d'Aquin","Gildas","Martine","Marcelle");}
if (smonth==2) {
mm= new Array("Ella","Présentation du Seigneur","Blaise","Véronique","Agathe","Gaston","Eugénie","Jacqueline","Apolline","Arnaud","N.D de Lourdes","Félix","Béatrice","Valentin","Claude","Julienne","Alexis","Bernadette","Gabin","Aimée","Pierre-Damien","Isabelle","Lazare","Modeste","Roméo","Nestor","Honorine","Romain","");}
if (smonth==3) {
mm= new Array("Aubin","Charles le Bon","Guénolé","Casimir","Olive","Colette","Félicité","Jean de Dieu","Françoise","Vivien","Rosine","Justine","Rodrigue","Mathilde","Louise","Bénédicte","Patrice","Cyrille","Joseph","Herbert","Clémence","Léa","Victorien","Catherine de Suède","Humbert","larissa","Habib","Gontran","Gwladys","Amédée","Benjamin");}
if (smonth==4) {
mm= new Array("Hugues","Sandrine","Richard","Isidore","Irène","Marcellin","St J.B. de la salle","Julie","Gautier","Fulbert","Stanislas","Jules","Ida","Maxime","Paterne","Benoit-José","Anicet","Parfait","Emma","Odette","Anselme","Georges","Fidèle","Marc","Alida","Zita","Valérie","Cath. de Sienne","Robert");}
if (smonth==5) {
mm= new Array("Fête du Travail","Boris","Jacques Philippe","Sylvain","Judith","Prudence","Gisèle","xxxx","Pacôme","Solange","Estelle","Achille","Rolande","Matthias","Denise","Honoré","Pascal","Eric","Yves","Bernardin","Constantin","Emile","Didier","Donatien","Sophie","Bérenger","Auguste de Cant.","Germain","Aymar","Ferdinand","Visitation");}
if (smonth==6) {
mm= new Array("Justin","Blandine","Kévin","Clotilde","Igor","Norbert","Gilbert","Médard","Diane","Landry","Barnabé","Guy","Antoine de Padou","Elisée","Germaine","Jean-François-Régis","Hervé","Léonce","Romuald","Silvère","Rodolphe","Alban","Audrey","Jean-Baptiste","Prosper","Anthelme","Fernand","Irénée","StPierre/Paul","Martial");}
if (smonth==7) {
mm= new Array("Thierry","Martinien","Thomas","Florent","Antoine-Marie","Marietta","Raoul","Thibaut","Amandine","Ulrich","Benoît","Olivier","Henri/Joel","Fête Nationale","Donald","N.D Mont Carmel","Charlotte","Frédéric","Arsène","Marina","Victor","Marie-Madeleine","Brigitte","Christine","Jacques le Majeur","Anne","Nathalie","Samson","Marthe","Juliette","Ignace de Loyola");}
if (smonth==8) {
mm= new Array("Alphonse","Julien","Lydie","J.M. Vianney","Abel","Transfiguration","Gaétan","Dominique","Amour","Laurent","Claire","Clarisse","Hippolyte","Evrard","Assomption","Armel","Hyacinthe","Hélène","Jean-Eudes","Bernard","Christophe","Fabrice","Rose","Barthélémy","Louis","Natacha","Monique","Augustin","Sabine","Fiacre","Aristide");}
if (smonth==9) {
mm= new Array("Gilles","Ingrid","Gregoire","Rosalie","Raïssa","Bertrand","Reine","Nativité de N.D.","Alain","Inès","Adelphe","Apollinaire","Aimé","Ste Croix","Roland","Edith","Renaud","Nadège","Emilie","Davy","Matthieu","Maurice","Constant","Thècle","Hermann","Côme/Damien","Vincent de Paul","Venceslas","Michel","Jerôme");}
if (smonth==10) {
mm= new Array("Thérèse de l'E.J.","Leger","Gérard","François d'Assise","Fleur","Bruno","Serge","Pélagie","Denis","Ghislain","Firmin","Wilfried","Géraud","Juste","Thérésa","Edwige","Baudouin","Luc","René","Adeline","Céline","Elodie","Jean de Capistran","Florentin","Doria","Dimitri","Emeline","Simon","Narcisse","Bienvenue","Wolfgang");}
if (smonth==11) {
mm= new Array("Toussaint","Défunts","Hubert","Charles Bor.","Sylvie","Bertille","Carine","Geoffroy","Théodore","Léon","Armistice","Christian","Brice","Sidoine","Albert","Marguerite","Elisabeth","Aude","Tanguy","Edmond","Christ Roi","Cécile","Clément","Flora","Catherine","Delphine","Séverin","Avent","Saturnin","André");}
if (smonth==12) {
mm= new Array("Florence","Viviane","François-Xavier","Barbara","Gérald","NiColas","Ambroise","Immaculée Conception","Pierre Fourier","Romaric","Daniel","Chantal","Lucie","Odile","Ninon","Alice","Judicaël","Gatien","Urbain","Théophile","Pierre Canisius","Françoise-Xavière","Armand","Adèle","Noël","Etienne","Jean l'Apôtre","Innocents","David","Roger","Sylvestre");}
//------------------------
var sday= (today.getDate())-1;
//alert(mm[sday]) ;
document.write(mm[sday]) ;
-->
==================================
-3 sants.html (html file)
==================================
<html><head>
<title>JavaScript code/Saint's Day</title>
</head><body>
<form id='stz' name='stz' style='background-color:black; color=lightgreen'>
<center>Breton calendar - Saint's Day :&nbsp;
<script language="JavaScript" src="jssants.js"></script>
</form></center> 
<form id='st1' name='st1' style='background-color:black; color=lightgreen'>
<center>...Calendrier français :&nbsp;
<script language="JavaScript" src="jssaints.js"></script>
</form></center><p>
</body></html>

Conclusion :


Comme d'habitude en démo sur le site de VB'Breizh

A voir également

Ajouter un commentaire

Commentaires

bertrouf
Messages postés
103
Date d'inscription
lundi 10 mai 2004
Statut
Membre
Dernière intervention
10 mars 2010
6 -
Le code est tout simple mais la base est précieuse.
Depuis le temps que je la cherche...

Je te remercie, je vais très vite la mettre sur mon site. ;-)

Bertrouf
pee_wee631
Messages postés
7
Date d'inscription
jeudi 18 mars 2004
Statut
Membre
Dernière intervention
8 février 2005
-
Bonjour,
souhaitant mettre sur mon site un vin du jour, j'ai pris la source pour l'adapter et mettre des vins.
Je l'ai fait, mais j'ai des problemes.
Pourtant, je l'ai adapte et copier de maniere parfaite.
Donc, comment fautil faire pour y arriver? Que faut-il respecter en priorite pour arriver a afficher quelquechose?

Je suis pret a te passer mes donnees VBBreizh si j'y arrive.
Merci.
Pat.
vbbreizh
Messages postés
73
Date d'inscription
lundi 25 juin 2001
Statut
Membre
Dernière intervention
13 novembre 2005
1 -
Salut pat
L'idée est bonne...
Tu as juste a changer les données dans l'un des fichiers JS genre vindujour.js
La ou tu vas t'amuser c'est pour fournir les données...
Attention de ne pas glisser de virgule, ",',...etc dans l'array. C'est de là que viendra le pb,
Sinon tout doit bien se passer.
Si pb envoie moi un mail avec ton JS ou passe par la faq de mon site et je t'aiderai..;
Cordialement
Gilles (VB'Breizh)
Nicolas_kojack
Messages postés
136
Date d'inscription
vendredi 19 novembre 2004
Statut
Membre
Dernière intervention
25 mai 2012
-
Petit coquinou tu as truffé ton script de pièges de sorte que nous aussi on travaille !!! Tu n'aurais pas la version sans travail a tout hasard ?
Comme ça pas besoin de surveiller :)
En tous cas merci.

ps : je pensais que je n'aurais pas besoin de remplir moi meme une base de donnée mais je crois que ... :p

Bonne soirée a tout le monde
balashov
Messages postés
17
Date d'inscription
vendredi 13 décembre 2002
Statut
Membre
Dernière intervention
22 mars 2006
-
Salut!

Plutôt que d'utiliser des if en cascade, n'eut-il pas été plus judicieux d'utiliser un switch case?

Je m'explique: si on est en Janvier, il fait quand même tous les tests suivants... un peu lourd, non?

Qu'en penses-tu?

Vous n'êtes pas encore membre ?

inscrivez-vous, c'est gratuit et ça prend moins d'une minute !

Les membres obtiennent plus de réponses que les utilisateurs anonymes.

Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.

Le fait d'être membre vous permet d'avoir des options supplémentaires.