Fonction récuperer donnée du message

Fermé
returns Messages postés 3 Date d'inscription samedi 9 septembre 2017 Statut Membre Dernière intervention 10 septembre 2017 - 9 sept. 2017 à 08:05
jordane45 Messages postés 38144 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 21 avril 2024 - 10 sept. 2017 à 11:47
Bonjour a tous et toutes,

je voudrais pouvoir récuperer de mes tables les renseignement du message poster sur le forum et voir les dernier message apparaitre en forme de jaquette défilante,voir également les images du message poster sa j'ai réussi!

https://img-19.ccm2.net/kBAbKyLB2kvtq9kzXNtiZnZBiRY=/5cadab87b4434ba58dd8924f330ef82e/ccm-ugc/5ab443225cd62d771925351836478199.gif

mais je voudrais voir apparaitre au passage de la souris une info bulle qui me donne les renseignement suivant:

titre

format

qualiter

note

uploadeur

et l'autre coter :

le synopsis du film

je vous donne une image pour comprendre ma recherche et vous montrer ce que je souhaite.

https://img-19.ccm2.net/1d4QrwSnWM14WTUZpKyLyfUSSWo=/b607d0acf22f48f586983f7a26ad2f47/ccm-ugc/a37b1d0124e3e94d0f584249b523ed65.gifscreen

je vous donne mon code,qui pourrais m'aider a le modifier pour avoir se resultat?

merci d' avance


<style type="text/css">
p {
color: #333;
font-family: Arial, Tahoma, Verdana;
font-size: 13px;
margin-top: 48px
}

img[data-tip] {
border-bottom: 2px dotted #888;
cursor:help;
}

[data-tip] {display: inline-block;
position: relative;
}

[data-tip]:hover:before {
content: attr(data-tip);
position: absolute;
padding: 0 8px;
height: 28px;
line-height: 28px;
background-color: rgba(0, 0, 0, 0.8);
left: -10px;top: -38px;
font-size: 14px;
border-radius: 3px;
white-space: nowrap;
color: #fff;
font-size: 11px;
}

[data-tip]:hover:after {
content: "";
position: absolute;
border-top: 8px solid rgba(0, 0, 0, 0.8);
border-left: 8px solid transparent;
border-right: 8px solid transparent;
left: 0;
top: -10px;
}

img.cd:hover {
-ms-transform: rotate(7deg);
-webkit-transform: rotate(7deg);
transform: rotate(10800deg);
transition: all 3s ease;
}

img.cd {
transition: all 1.5s ease;
}

img {
min-width: 100px;
max-width: 150px;
}

a.info {
position: relative;
color: black;
text-decoration: none;
opacity: 0.6;
width: 150px;
height: 200px;
}

a.info span {
display: none; /* On masque l'infobulle. */
}

a.info:hover {
background: none; /* Correction d'un bug d'Internet Explorer. */
  • z-index: 500; /* On définit une valeur pour l'ordre d'affichage. */ opacity: 1.5; width: 150px; height: 200px; cursor: zoom-in;} a.info:hover span { z-index: 2; display: inline; /* On affiche l'infobulle. */ position: absolute;} .a-btn2 { top: 8px; width: 200px; height: 25px; /* border-top-right-radius: 10%; */ display: block; margin: 10px; right: 10px; background: #F04E4E; position: absolute; box-shadow: 0px 0px 5px 0px rgba(246, 212, 163, 0.5) inset, 0px -1px 5px 4px rgba(170, 77, 27, 0.2) inset, 0px 0px 0px 2px #fff, 0px 0px 1px 2px rgba(188, 188, 188, 0.4), 0px 0px 0px 2px #fff; transition: all 0.3s linear;} .a-btn2 span { top: -9px; position: absolute; font-size: 20px; color: #fff; text-shadow: 0px 1px 1px #A03F16; font-family: "Arvo", "Myriad Pro", "Trebuchet MS", sans-serif; transition: all 0.3s linear; left: 38px;} .a-btn2 span:nth-child(1),.a-btn2 span:nth-child(3) { position: absolute; top: -7px; left: 40px; font-size: 20px; line-height: 36px; opacity: 0;} .a-btn2 span:nth-child(1) { *background: transparent url(../images/star.png) no-repeat center center; *opacity: 0.2;} .a-btn2:hover { background: rgba(118, 170, 27, 1); box-shadow: 0px 0px 5px 0px rgba(246, 212, 163, 0.5) inset, 0px -1px 5px 4px rgba(170, 77, 27, 0.2) inset, 0px 0px 0px 7px #fff, 1px 4px 5px 8px rgba(188, 188, 188, 0.6), 0px 0px 0px 9px #fff;} .a-btn2:hover span:nth-child(3) { opacity: 1;} .a-btn2:hover span:nth-child(2) { transform: scale(0); opacity: 0;} .a-btn2:hover span:nth-child(1){ animation: rotate 1s linear;} .a-btn2:active{ box-shadow: 0px 0px 5px 0px rgba(246, 212, 163, 0.5) inset, 0px -1px 5px 4px rgba(170, 77, 27, 0.2) inset, 0px 0px 0px 7px #fff, 0px -1px 0px 8px rgba(188, 188, 188, 0.3), 0px 0px 0px 10px #fff;} .a-btn2:active span:nth-child(2){ color: rgba(170, 77, 27, 0.8); text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.6);} @-webkit-keyframes rotate{ 0% { transform: scale(1) rotate(0);} 50% { transform: scale(0.5) rotate(180deg);} 100% { transform: scale(1) rotate(360deg);}} @keyframes rotateIn { 0% { -webkit-transform-origin: center; transform-origin: center; -webkit-transform: rotate3d(0, 0, 1, -200deg); transform: rotate3d(0, 0, 1, -200deg); opacity: 0;} 100% { -webkit-transform-origin: center; transform-origin: center; -webkit-transform: none; transform: none; opacity: 1;}} .rotateIn { -webkit-animation-name: rotateIn; animation-name: rotateIn;} @-webkit-keyframes rotateInDownLeft { 0% { -webkit-transform-origin: left bottom; transform-origin: left bottom; -webkit-transform: rotate3d(0, 0, 1, -45deg); transform: rotate3d(0, 0, 1, -45deg); opacity: 0;} 100% { -webkit-transform-origin: left bottom; transform-origin: left bottom; -webkit-transform: none; transform: none; opacity: 1;}} @keyframes rotateInDownLeft { 0% { -webkit-transform-origin: left bottom; transform-origin: left bottom; -webkit-transform: rotate3d(0, 0, 1, -45deg); transform: rotate3d(0, 0, 1, -45deg); opacity: 0;} 100% { -webkit-transform-origin: left bottom; transform-origin: left bottom; -webkit-transform: none; transform: none; opacity: 1;}} .rotateInDownLeft { -webkit-animation-name: rotateInDownLeft; animation-name: rotateInDownLeft;}</style><head><meta http-equiv="Content-Type" content="text/html" encoding="utf-8"><title>Dernières New's</title><style type="text/css"></style></head><body style="font-size: 0px;margin: 0px; overflow: hidden;"> <div class=""><!--////Free Slider Jimdo by zekoolweb.com////--> <marquee scrollamount="10" onMouseOver="this.stop();" onMouseOut="this.start();"><?phptry{ // On se connecte MySQL $bdd = new PDO('mysql:host=localhost;dbname=xxxxxxxxx', 'xxxxxxx', 'xxxxxxx');}catch(Exception $e){ // En cas d'erreur, on affiche un message et on arrête tout die('Erreur : '.$e->getMessage());} // Si tout va bien, on peut continuer// On r?p? tout le contenu de la table jeux_video$reponse = $bdd->query('SELECT *, SUBSTR(message, 2, 200) as message FROM xf_thread INNER JOIN xf_post ON xf_thread.first_post_id = xf_post.post_id WHERE node_id in (vos Id de sections) ORDER BY xf_thread.thread_id DESC LIMIT 24'); // On affiche chaque entrée une à unewhile ($donnees = $reponse->fetch()) {?> <?php echo $texte = preg_replace('#\[img\](.*?)\/img\#siU', '<a href="http://TON FORUM.COM/threads/'.$donnees[thread_id].'" rel="nofollow noopener noreferrer" target="_blank" class="info" style="font-size: 12px; height: 200px;"> <span class=""><font color= #FF0000><b style="text-shadow: 0 0 0 transparent, 1px 1px 1px #000000; position: absolute; top: 45px; background-color: rgb(228, 228, 228); padding-top: 2px;padding-right: 4px;padding-left: 4px;font-size: 16px;border-radius: 8px;border: 1px solid #000000;text-align: center;">'.$donnees[username].'<br /></b></font></span> <span class=""><font color= #FF0000 style="color: deepskyblue;"><b style="text-shadow: 0 0 0 transparent, 1px 1px 1px #000000; position: absolute; top: 80px; background-color: rgb(228, 228, 228); padding-top: 2px;padding-right: 4px;padding-left: 4px;font-size: 16px;border-radius: 8px;border: 1px solid #000000;text-align: center;">vous propose<br /></b></font></span> <span class=""><font color= #FF0000 style="color: darkorange;"><b style="text-shadow: 0 0 0 transparent, 1px 1px 1px #000000; position: absolute; top: 135px; background-color: rgb(228, 228, 228); padding-top: 2px;padding-right: 4px;padding-left: 4px;font-size: 16px;border-radius: 8px;border: 1px solid #000000;text-align: center;">"'.$donnees[title].'"</b></font></span><img src="$1" style="border-style: solid; border-width: 18px 16px 24px 25px; -moz-border-image: url(Fond_cover.png) 18 16 24 25 repeat; -webkit-border-image: url(Fond_cover.png) 18 16 24 25 repeat; -o-border-image: url(Fond_cover.png) 18 16 24 25 repeat; border-image: url(Fond_cover.png) 18 16 24 25 repeat; margin-right: 25px; height: 200; font-size : 0px; margin-bottom: 20px; margin-top: 15px;"></a>',$donnees['message']); ?> <?php} $reponse->closeCursor(); // Termine le traitement de la requête ?> </marquee></div>
A voir également:

2 réponses

jordane45 Messages postés 38144 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 21 avril 2024 4 650
9 sept. 2017 à 11:22
Bonjour,

Merci de nous reposter ton code en y mettant :
- La coloration sytaxique ( il faut pour ça préciser le langage dans les balises de code )
- Y faire des retours à la ligne et y faire l'indentation.

Actuellement... ton code est illisible tel qu'il est collé...
Merci.


Il faudrait également sur quoi tu bloques exactement.
Pour faciliter la recherche et la comprehension des questions sur le forum... il est vivement conseillé de ne poser qu' UNE seule question par discussion.
Donc soit :
- Comment récupérer les données de ta bdd
Soit - Comment faire un slider
Soit - Comment faire une info bulle


Sachant que le slider et l'info bulle..ça se gère côté CSS (voir javascript) et non PHP (et encore moins BDD ...là où tu avais posté ta question au départ ! )

0
returns Messages postés 3 Date d'inscription samedi 9 septembre 2017 Statut Membre Dernière intervention 10 septembre 2017
10 sept. 2017 à 09:25
<style type="text/css">
p {
color: #333;
font-family: Arial, Tahoma, Verdana;
font-size: 13px;
margin-top: 48px
}

img[data-tip] {
border-bottom: 2px dotted #888;
cursor:help;
}

[data-tip] {display: inline-block;
position: relative;
}

[data-tip]:hover:before {
content: attr(data-tip);
position: absolute;
padding: 0 8px;
height: 28px;
line-height: 28px;
background-color: rgba(0, 0, 0, 0.8);
left: -10px;top: -38px;
font-size: 14px;
border-radius: 3px;
white-space: nowrap;
color: #fff;
font-size: 11px;
}

[data-tip]:hover:after {
content: "";
position: absolute;
border-top: 8px solid rgba(0, 0, 0, 0.8);
border-left: 8px solid transparent;
border-right: 8px solid transparent;
left: 0;
top: -10px;
}

img.cd:hover {
-ms-transform: rotate(7deg);
-webkit-transform: rotate(7deg);
transform: rotate(10800deg);
transition: all 3s ease;
}

img.cd {
transition: all 1.5s ease;
}

img {
min-width: 100px;
max-width: 150px;
}

a.info {
position: relative;
color: black;
text-decoration: none;
opacity: 0.6;
width: 150px;
height: 200px;
}

a.info span {
display: none; /* On masque l'infobulle. */
}

a.info:hover {
background: none; /* Correction d'un bug d'Internet Explorer. */
  • z-index: 500; /* On définit une valeur pour l'ordre d'affichage. */

opacity: 1.5;
width: 150px;
height: 200px;
cursor: zoom-in;
}

a.info:hover span {
z-index: 2;
display: inline; /* On affiche l'infobulle. */
position: absolute;
}

.a-btn2 {
top: 8px;
width: 200px;
height: 25px;
/* border-top-right-radius: 10%; */
display: block;
margin: 10px;
right: 10px;
background: #F04E4E;
position: absolute;
box-shadow: 0px 0px 5px 0px rgba(246, 212, 163, 0.5) inset, 0px -1px 5px 4px rgba(170, 77, 27, 0.2) inset, 0px 0px 0px 2px #fff, 0px 0px 1px 2px rgba(188, 188, 188, 0.4), 0px 0px 0px 2px #fff;
transition: all 0.3s linear;
}

.a-btn2 span {
top: -9px;
position: absolute;
font-size: 20px;
color: #fff;
text-shadow: 0px 1px 1px #A03F16;
font-family: "Arvo", "Myriad Pro", "Trebuchet MS", sans-serif;
transition: all 0.3s linear;
left: 38px;
}

.a-btn2 span:nth-child(1),
.a-btn2 span:nth-child(3) {
position: absolute;
top: -7px;
left: 40px;
font-size: 20px;
line-height: 36px;
opacity: 0;
}

.a-btn2 span:nth-child(1) {
  • background: transparent url(../images/star.png) no-repeat center center;
  • opacity: 0.2;

}

.a-btn2:hover {
background: rgba(118, 170, 27, 1);
box-shadow:
0px 0px 5px 0px rgba(246, 212, 163, 0.5) inset,
0px -1px 5px 4px rgba(170, 77, 27, 0.2) inset,
0px 0px 0px 7px #fff,
1px 4px 5px 8px rgba(188, 188, 188, 0.6),
0px 0px 0px 9px #fff;
}

.a-btn2:hover span:nth-child(3) {
opacity: 1;
}

.a-btn2:hover span:nth-child(2) {
transform: scale(0);
opacity: 0;
}

.a-btn2:hover span:nth-child(1){
animation: rotate 1s linear;
}

.a-btn2:active{
box-shadow:
0px 0px 5px 0px rgba(246, 212, 163, 0.5) inset,
0px -1px 5px 4px rgba(170, 77, 27, 0.2) inset,
0px 0px 0px 7px #fff,
0px -1px 0px 8px rgba(188, 188, 188, 0.3),
0px 0px 0px 10px #fff;
}

.a-btn2:active span:nth-child(2){
color: rgba(170, 77, 27, 0.8);
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.6);
}

@-webkit-keyframes rotate{
0% { transform: scale(1) rotate(0);}
50% { transform: scale(0.5) rotate(180deg);}
100% { transform: scale(1) rotate(360deg);}
}

@keyframes rotateIn {
0% {
-webkit-transform-origin: center;
transform-origin: center;
-webkit-transform: rotate3d(0, 0, 1, -200deg);
transform: rotate3d(0, 0, 1, -200deg);
opacity: 0;}
100% {
-webkit-transform-origin: center;
transform-origin: center;
-webkit-transform: none;
transform: none;
opacity: 1;}
}

.rotateIn {
-webkit-animation-name: rotateIn;
animation-name: rotateIn;
}

@-webkit-keyframes rotateInDownLeft {
0% {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: rotate3d(0, 0, 1, -45deg);
transform: rotate3d(0, 0, 1, -45deg);
opacity: 0;}
100% {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: none;
transform: none;
opacity: 1;}
}

@keyframes rotateInDownLeft {
0% {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: rotate3d(0, 0, 1, -45deg);
transform: rotate3d(0, 0, 1, -45deg);
opacity: 0;}
100% {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: none;
transform: none;
opacity: 1;}
}

.rotateInDownLeft {
-webkit-animation-name: rotateInDownLeft;
animation-name: rotateInDownLeft;
}
</style>
<head>
<meta http-equiv="Content-Type" content="text/html" encoding="utf-8">
<title>Dernières New's</title>
<style type="text/css"></style>
</head>
<body style="font-size: 0px;margin: 0px; overflow: hidden;">
<div class="">
<!--////Free Slider Jimdo by zekoolweb.com////-->
<marquee scrollamount="10" onMouseOver="this.stop();" onMouseOut="this.start();">
<?php
try
{
// On se connecte MySQL
$bdd = new PDO('mysql:host=localhost;dbname=xxxxxxxxx', 'xxxxxxx', 'xxxxxxx');
}
catch(Exception $e)
{
// En cas d'erreur, on affiche un message et on arrête tout
die('Erreur : '.$e->getMessage());
}

// Si tout va bien, on peut continuer
// On r?p? tout le contenu de la table jeux_video
$reponse = $bdd->query('SELECT *, SUBSTR(message, 2, 200) as message FROM xf_thread
INNER JOIN xf_post ON xf_thread.first_post_id = xf_post.post_id
WHERE node_id in (vos Id de sections) ORDER BY xf_thread.thread_id DESC LIMIT 24');


// On affiche chaque entrée une à une
while ($donnees = $reponse->fetch())

{
?>

<?php

echo $texte = preg_replace('#\[img\](.*?)\/img\#siU', '<a href="http://TON FORUM.COM/threads/'.$donnees[thread_id].'" rel="nofollow noopener noreferrer" target="_blank" class="info" style="font-size: 12px; height: 200px;">

<span class=""><font color= #FF0000><b style="text-shadow: 0 0 0 transparent, 1px 1px 1px #000000; position: absolute; top: 45px; background-color: rgb(228, 228, 228); padding-top: 2px;padding-right: 4px;padding-left: 4px;font-size: 16px;border-radius: 8px;border: 1px solid #000000;text-align: center;">'.$donnees[username].'<br /></b></font></span>

<span class=""><font color= #FF0000 style="color: deepskyblue;"><b style="text-shadow: 0 0 0 transparent, 1px 1px 1px #000000; position: absolute; top: 80px; background-color: rgb(228, 228, 228); padding-top: 2px;padding-right: 4px;padding-left: 4px;font-size: 16px;border-radius: 8px;border: 1px solid #000000;text-align: center;">vous propose<br /></b></font></span>

<span class=""><font color= #FF0000 style="color: darkorange;"><b style="text-shadow: 0 0 0 transparent, 1px 1px 1px #000000; position: absolute; top: 135px; background-color: rgb(228, 228, 228); padding-top: 2px;padding-right: 4px;padding-left: 4px;font-size: 16px;border-radius: 8px;border: 1px solid #000000;text-align: center;">"'.$donnees[title].'"</b></font></span>
<img src="$1" style="border-style: solid; border-width: 18px 16px 24px 25px; -moz-border-image: url(Fond_cover.png) 18 16 24 25 repeat; -webkit-border-image: url(Fond_cover.png) 18 16 24 25 repeat; -o-border-image: url(Fond_cover.png) 18 16 24 25 repeat; border-image: url(Fond_cover.png) 18 16 24 25 repeat; margin-right: 25px; height: 200; font-size : 0px; margin-bottom: 20px; margin-top: 15px;"></a>',$donnees['message']);
?>


<?php
}

$reponse->closeCursor(); // Termine le traitement de la requête

?>
</marquee>
</div>
</body>
0
returns Messages postés 3 Date d'inscription samedi 9 septembre 2017 Statut Membre Dernière intervention 10 septembre 2017
10 sept. 2017 à 09:34
je bloque sur l'affichage info bulle en passant la souris sur la jaquette du film
0
jordane45 Messages postés 38144 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 21 avril 2024 4 650
10 sept. 2017 à 11:47
Infobulle ?.. donc css/html .... je deplace ta question
0