Bonjour,
etant administrateur d'un site de competition Online sur le jeu Fifa sur PS3, je souhaiterais creer une page qui genererais du code BBcode ou HTML pour le forum de mon site.
Je m'explique :
Nous jouons a Fifa Online, et nous faisons des matchs.
Une fois nos matchs fini, je souhaiterais que les membres puissent rentrer leur resultats et statisitques sur une page.
Cette page une fois remplie, je souhaiterais quelle genere du BBCode ou HTML afin que les membres puissent copier ce code et l'inserer dans un nouveau post sur le forum.
Ce qui donnerait comme resultat, une genre de feuille de match predefinie avec les valeur rentrer par les membres.
J'ai trouver dans les couloirs du web un petit texte html qui permet de generer un code :
function GenereFiche()
{
G("txtFiche").value=
"[align=center][b][i][color=white][size=20]Journée N° : " + G("inJournee").value + "\n[/size][/color][/i][/b][/align]" +
G("inComments").value;
}
----------------
<input id="inJournee" style="width: 20px;" type="text">
<div style="text-align: center;">
<input onclick="GenereFiche()" value="Générer la fiche" type="button"> </div>
Avec ca, je me suis debrouillé pour faire un truc sui fonctionne,
pour les gens interessé, voici le code :
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<style>div {white-space:nowrap;}</style>
<script>
//Au cas où pas de JQuery
function G(id) {return document.getElementById(id); }
//Fonction qui génère la fiche du profil
function GenereFiche()
{
G("txtFiche").value=
"[align=center][img]https://i41.servimg.com/u/f41/11/21/80/33/feuill10.png [/img]\n[/align]" +
"[align=center][b][i][color=white][size=20]Journée N° : " + G("inJournee").value + "\n[/size][/color][/i][/b][/align]" +
"[align=center][img]https://i41.servimg.com/u/f41/11/21/80/33/ligne10.png [/img][/align]" +
"[b][color=#FF9900][size=35][img]https://i41.servimg.com/u/f41/11/21/80/33/locaux11.png [/img] : " + G("inEquipe1").value + "\n[/size][/color][/b]" + "[b][color=#FF9900][size=35][img]https://i41.servimg.com/u/f41/11/21/80/33/visite11.png [/img] : " + G("inEquipe2").value + "\n[/size][/color][/b]" +
"[align=center][img]https://i41.servimg.com/u/f41/11/21/80/33/ligne10.png [/img][/align]" +
"[size=30][color=#FFCC00][b][img]https://i41.servimg.com/u/f41/11/21/80/33/score_12.png [/img] : " + G("inScore1").value + "\n[/b][/color][/size]" + "[b][color=#FFCC00][size=30][img]https://i41.servimg.com/u/f41/11/21/80/33/score_13.png [/img] : " + G("inScore2").value + "\n[/size][/color][/b]" +
"[align=center][img]https://i41.servimg.com/u/f41/11/21/80/33/ligne10.png [/img][/align]" +
"[b][color=white][size=20][img]https://i41.servimg.com/u/f41/11/21/80/33/but_lo11.png [/img] : " + G("inBut1").value + "\n[/size][/color][/b]" + "[size=20][b][color=white][img]https://i41.servimg.com/u/f41/11/21/80/33/but_vi11.png [/img] : " + G("inBut2").value + "\n[/color][/b][/size]" +
"[align=center][img]https://i41.servimg.com/u/f41/11/21/80/33/ligne10.png [/img][/align]" +
"[size=25][color=yellow][img]https://i41.servimg.com/u/f41/11/21/80/33/cjloc10.png [/img] : " + G("inJaune1").value + "\n[/color][/size]" + "[size=25][color=yellow][img]https://i41.servimg.com/u/f41/11/21/80/33/cj_vis10.png [/img] : " + G("inJaune2").value + "\n[/color][/size]" +
"[size=25][color=red][img]https://i41.servimg.com/u/f41/11/21/80/33/crloc10.png [/img] : " + G("inRouge1").value + "\n[/color][/size]" + "[size=25][color=red][img]https://i41.servimg.com/u/f41/11/21/80/33/crvis10.png [/img] : " + G("inRouge2").value + "\n[/color][/size]" +
"[align=center][img]https://i41.servimg.com/u/f41/11/21/80/33/ligne10.png [/img][/align]" +
"[align=center][img]https://i41.servimg.com/u/f41/11/21/80/33/commen10.png [/img][/align]" +
G("inComments").value;
}
</script>
</head>
<body>
<div style="text-align: center;">
<img style="width: 530px; height: 80px;" alt="Formulaire feuille de match" src="https://i41.servimg.com/u/f41/11/21/80/33/entete10.png "><br> <img style="width: 130px; height: 130px;" alt="Logo" src="https://i41.servimg.com/u/f41/11/21/80/33/logo13.png "> <br> <img style="width: 530px; height: 20px;" alt="separation" src="https://i41.servimg.com/u/f41/11/21/80/33/ligne12.png "><br> <img style="width: 50px; height: 50px;" alt="Etape 1" src="https://i41.servimg.com/u/f41/11/21/80/33/111.png "><br> <big style="color: rgb(255, 204, 102);"><span style="font-weight: bold; font-style: italic;">Entrez Les Noms des Equipes<br> <br> </span></big> <img style="width: 200px; height: 60px;" alt="Equipe Locale" src="https://i41.servimg.com/u/f41/11/21/80/33/locaux10.png "> <img style="width: 200px; height: 60px;" alt="Equipe Visiteurs" src="https://i41.servimg.com/u/f41/11/21/80/33/visite10.png "><br> <input id="inEquipe1" style="width: 150px;" type="text"> <input id="inEquipe2" style="width: 150px;" type="text"><br> <div style="text-align: center;"> <br> <big style="color: rgb(255, 204, 102);"><span style="font-weight: bold; font-style: italic;">Entrez Le Numero de la Journée<br> </span></big><input id="inJournee" style="width: 20px;" type="text"><br> <br> <img style="width: 530px; height: 20px;" alt="separation" src="https://i41.servimg.com/u/f41/11/21/80/33/ligne12.png "><br> <big style="color: rgb(255, 204, 102);"><span style="font-weight: bold; font-style: italic;"><img style="width: 50px; height: 50px;" alt="etape 2" src="https://i41.servimg.com/u/f41/11/21/80/33/210.png "><br> Entrez vos resultats dans les cases ci-dessous</span><br style="font-weight: bold; font-style: italic;"> </big> <br> <img style="width: 200px; height: 60px;" alt="Equipe Locale" src="https://i41.servimg.com/u/f41/11/21/80/33/locaux10.png "> <input id="inScore1" style="width: 20px;" type="text"> <input id="inScore2" style="width: 20px;" type="text"> <img style="width: 200px; height: 60px;" alt="Equipe Locale" src="https://i41.servimg.com/u/f41/11/21/80/33/visite10.png "> </div> <br> <div style="text-align: center;"><img style="width: 530px; height: 20px;" alt="separation" src="https://i41.servimg.com/u/f41/11/21/80/33/ligne12.png "></div> <br> <div style="text-align: center;"><big><span style="font-weight: bold; font-style: italic; color: rgb(255, 204, 102);"><img style="width: 50px; height: 50px;" alt="Etape 3" src="https://i41.servimg.com/u/f41/11/21/80/33/310.png "><br> Entrez les noms des buteurs</span><br style="font-weight: bold; font-style: italic; color: rgb(255, 204, 102);"> <span style="font-weight: bold; font-style: italic; color: rgb(255, 204, 102);">(si il n'y en pas, marqué : Aucun)</span></big><br> <br> <img style="width: 300px; height: 60px;" alt="Buteurs Locaux" src="https://i41.servimg.com/u/f41/11/21/80/33/but_lo10.png "><br> <textarea id="inBut1" rows="1" cols="1"></textarea><br> <br> ----------------------------------------------------------------------<br> <br> <img style="width: 300px; height: 60px;" alt="Buteurs visteurs" src="https://i41.servimg.com/u/f41/11/21/80/33/but_vi10.png "><br> <textarea id="inBut2" rows="1" cols="1"></textarea> <br> <br> <div style="text-align: center;"><img style="width: 530px; height: 20px;" alt="separation" src="https://i41.servimg.com/u/f41/11/21/80/33/ligne12.png "></div> <br> <big><span style="font-weight: bold; font-style: italic; color: rgb(255, 204, 102);"><img style="width: 50px; height: 50px;" alt="Etape 4" src="https://i41.servimg.com/u/f41/11/21/80/33/411.png "><br> Entrez cartons Jaunes et Rouges</span><br style="font-weight: bold; font-style: italic; color: rgb(255, 204, 102);"> <span style="font-weight: bold; font-style: italic; color: rgb(255, 204, 102);">(si il n'y en pas, marqué : 0)</span></big><br> <br> <img style="width: 150px; height: 60px;" alt="Carton jaune locaux" src="https://i41.servimg.com/u/f41/11/21/80/33/cjloc10.png "> <input id="inJaune1" style="width: 20px;" maxlength="3" type="text"> <img style="width: 150px; height: 60px;" alt="Carton jaune visiteurs" src="https://i41.servimg.com/u/f41/11/21/80/33/cj_vis10.png "> <input id="inJaune2" style="width: 20px;" maxlength="3" type="text"><br> <br> --------------------------------------------------------------------<br> <br> <img style="width: 150px; height: 60px;" alt="Carton rouge locaux" src="https://i41.servimg.com/u/f41/11/21/80/33/crloc10.png "> <input id="inRouge1" style="width: 20px;" maxlength="3" type="text"> <img style="width: 150px; height: 60px;" alt="Carton rouge visiteurs" src="https://i41.servimg.com/u/f41/11/21/80/33/crvis10.png "> <input id="inRouge2" style="width: 20px;" maxlength="3" type="text"><br> <br> <br> <div style="text-align: center;"><img style="width: 530px; height: 20px;" alt="separation" src="https://i41.servimg.com/u/f41/11/21/80/33/ligne12.png "><br> </div> <br> <big><span style="font-weight: bold; font-style: italic; color: rgb(255, 204, 102);"><img style="width: 50px; height: 50px;" alt="Etape 5" src="https://i41.servimg.com/u/f41/11/21/80/33/511.png "><br> Laissez un petit commentaire sur le match</span><span style="font-weight: bold; font-style: italic; color: rgb(255, 204, 102);"><br> <br> </span></big><img style="width: 300px; height: 60px;" alt="Commentaires sur le match" src="https://i41.servimg.com/u/f41/11/21/80/33/commme10.png "><br> <textarea id="inComments" rows="3" cols="30"></textarea></div> <div style="text-align: center;"><br> <img style="width: 530px; height: 20px;" alt="separation" src="https://i41.servimg.com/u/f41/11/21/80/33/ligne12.png "><br> <br> <big><span style="font-weight: bold; font-style: italic; color: rgb(255, 204, 102);"><img style="width: 50px; height: 50px;" alt="Etape 6" src="https://i41.servimg.com/u/f41/11/21/80/33/611.png "><br> Cliquez sur "Generer la fiche" ci-dessous</span></big><br> <br> <div style="text-align: center;"><input onclick="GenereFiche()" value="Générer la fiche" type="button"> </div> <hr style="margin-left: auto; margin-right: auto;"> <div style="text-align: center;"><textarea id="txtFiche" rows="10" cols="50"></textarea></div> <br> <img style="width: 530px; height: 20px;" alt="separation" src="https://i41.servimg.com/u/f41/11/21/80/33/ligne12.png "><br> <span style="font-style: italic;"><span style="font-weight: bold;"><br> <img style="width: 50px; height: 50px;" alt="Etape 7" src="https://i41.servimg.com/u/f41/11/21/80/33/711.png "><br> </span></span><big><span style="font-weight: bold; font-style: italic; color: rgb(255, 204, 102);">Copiez le code tel que vous le voyez dans la fenetre </span></big><big><span style="font-weight: bold; font-style: italic; color: rgb(255, 204, 102);">(ctrl+c)<br> Puis collez ce code dans le post de votre match (ctrl+v)<br> </span></big><big><span style="font-weight: bold; font-style: italic; color: rgb(255, 204, 102);"><br> </span></big><br> <img style="width: 530px; height: 80px;" alt="Pied de page" src="https://i41.servimg.com/u/f41/11/21/80/33/pied10.png "></div> </div>
</body>
</html>
Mais le rendu est assez passable a mon gout.
Je souhaiterais donc realisé une image style panneau de score d'un stade de foot, puis inserer aux endroits voulu de l'image, les valeurs entrées par les membres.
Au final, je voudrais faire un truc dans le genre du site l'equipe :
https://www.lequipe.fr/Football/directs/Live231023.html
(Le tableau ou il y a le score, les buteurs et les cartons.)
J'espere avoir etait le plus clair possible.
Si ils vous manquent des infos, je suis dispos pour vous les apporter.
Merci de votre aide.
D'ou vient l'idée de desinfecter une aiguille d'un condamné a mort ???
Un telephone pour les sourd a t-il une alarme lumineuse ???
Pourquoi les vieux naissent-ils jeunes ???
Afficher la suite