Afficher le Slide sur les news [Réglé]
KONA Membre non connecté
Booster Fusée
- Booster Fusée
- Voir le profil du membre KONA
- Inscrit le : 21/05/2006
- Site internet
Reprise du message précédent
Quand je dis code source ce sont pas les fichier , mais ce qui est affiché par ton navigateur , clic droit puis afficher la source de la page , suivant le navigateur bien sur .tony Membre non connecté
Booster Mortier
- Booster Mortier
- Voir le profil du membre tony
- Inscrit le : 11/11/2009
Code PHP :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" > <head> <title>Les test : News</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="description" content=" News" /> <meta name="keywords" content="" /> <meta http-equiv="Content-Language" content="fr" /> <!-- Default CSS --> <link rel="stylesheet" href="/templates/SonicWorld/theme/default.css" type="text/css" media="screen, print, handheld" /> <link rel="stylesheet" href="/templates/default/framework/content/syndication/syndication.css" type="text/css" media="screen, print, handheld" /> <!-- Theme CSS --> <link rel="stylesheet" href="/templates/SonicWorld/theme/design.css" type="text/css" media="screen" /> <link rel="stylesheet" href="/templates/SonicWorld/theme/global.css" type="text/css" media="screen, print, handheld" /> <link rel="stylesheet" href="/templates/SonicWorld/theme/generic.css" type="text/css" media="screen, print, handheld" /> <link rel="stylesheet" href="/templates/SonicWorld/theme/content.css" type="text/css" media="screen, print, handheld" /> <link rel="stylesheet" href="/templates/SonicWorld/theme/bbcode.css" type="text/css" media="screen, print, handheld" /> <!-- Alternative CSS --> <link rel="stylesheet" href="/templates/SonicWorld/modules/news/news.css" type="text/css" media="screen, handheld" /> <link rel="stylesheet" href="/templates/SonicWorld/modules/connect/connect_mini.css" type="text/css" media="screen, handheld" /> <link rel="stylesheet" href="/templates/SonicWorld/modules/newsletter/newsletter_mini.css" type="text/css" media="screen, handheld" /> <link rel="stylesheet" href="/templates/SonicWorld/modules/search/search_mini.css" type="text/css" media="screen, handheld" /> <link rel="stylesheet" href="/shoutbox/templates/shoutbox_mini.css" type="text/css" media="screen, handheld" /> <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> <link rel="icon" type="image/gif" href="/animated_favicon1.gif" > <link rel="alternate" href="/syndication.php?m=news" type="application/rss+xml" title="RSS Les test" /> <script type="text/javascript"> <!-- var PATH_TO_ROOT = ""; var TOKEN = "08f74ad94bcbc12f5f2c71e4a85a8638952900508b88a5d05032a6157e0b60bb"; --> </script> <script type="text/javascript" src="/kernel/framework/js/scriptaculous/prototype.js"></script> <script type="text/javascript" src="/kernel/framework/js/scriptaculous/scriptaculous.js"></script> <script type="text/javascript" src="/kernel/framework/js/global.js"></script> <!-- CSN: Tableau à onglets --> <link type="text/css" rel="stylesheet" href="/templates/SonicWorld/tableau/tabcontent.css"> <link type="text/css" rel="stylesheet" href="/templates/SonicWorld/tableau/class.css" media="screen"> <script type="text/javascript" src="/templates/SonicWorld/tableau/tabcontent.js"></script> </head> <body> <div id="global_header"> <div id="global"> <div id="header_container"> <div id="header"> <h1 style="display:none;font-size:9px;">Les test</h1> <script type="text/javascript"> <!-- function check_search_mini_form_post() { var textSearched = document.getElementById('TxTMiniSearched').value; if ( (textSearched.length > 3) && (textSearched != escape('Recherche...')) ) { textSearched = escape_xmlhttprequest(textSearched); return true; } else { alert('La chaine recherchée doit faire au moins 4 caractères!'); return false; } } --> </script> <form action="/search/search.php#results" onsubmit="return check_search_mini_form_post();" method="post"> <div id="search_form"> <input type="text" size="14" id="TxTMiniSearched" name="q" value="Recherche..." class="search_entry" onclick="if(this.value=='Recherche...')this.value='';" onblur="if(this.value=='')this.value='Recherche...';" /> <input type="hidden" name="search_submit" id="search_submit_mini" value="Recherche" class="submit" /> <input type="image" name="search_submit" class="search_submit" value="1" src="/templates/SonicWorld/modules/search/images/search_submit.png" /> </div> </form> </div> <div id="sub_header"> <script type="text/javascript"> <!-- function check_connect(){ if(document.getElementById('login').value == "") { alert("Veuillez entrer un pseudo !"); return false; } if(document.getElementById('password').value == "") { alert("Veuillez entrer un mot de passe !"); return false; } return true; } --> </script> <div style="float: left; margin-left:270px;"> <form action="" method="post" onsubmit="return check_connect();" style="text-align:right;display:inline;"> <input size="15" type="text" id="login" name="login" value="Pseudo" class="connect_form" onclick="if( this.value == 'Pseudo' ) this.value = '';" maxlength="25" /> <input size="15" type="password" id="password" name="password" class="connect_form" value="******" onclick="if( this.value == '******' ) this.value = '';" maxlength="30" /> <input checked="checked" type="checkbox" name="auto" /> <input type="submit" name="connect" value="Se connecter" class="submit" /> </form> <form action="/member/register.php" method="post" style="display:inline;"> <input type="submit" name="register" value="S'inscrire" class="submit" /> </form> </div> </div> <div class="spacer"></div> </div> <div id="left_menu"> <!-- Menu --> <!-- Title --> <div class="module_mini_container"> <div class="module_mini_top"> <h3 class="menu_vertical_0 menu_vertical"> <a href="http://localhost/" title="PHPBoost">PHPBoost</a> </h3> </div> <div class="module_mini_contents"> <ul class="menu_vertical_0 menu_vertical"> <!-- Simple Menu Link --> <li> <a href="http://localhost/articles/articles.php" title="Articles"><img src="http://localhost/articles/articles_mini.png" class="valign_middle" alt="" /></a> <a href="http://localhost/articles/articles.php" title="Articles">Articles</a> </li> <!-- Simple Menu Link --> <li> <a href="http://localhost/calendar/calendar.php" title="Calendrier"><img src="http://localhost/calendar/calendar_mini.png" class="valign_middle" alt="" /></a> <a href="http://localhost/calendar/calendar.php" title="Calendrier">Calendrier</a> </li> <!-- Simple Menu Link --> <li> <a href="http://localhost/contact/contact.php" title="Contact"><img src="http://localhost/contact/contact_mini.png" class="valign_middle" alt="" /></a> <a href="http://localhost/contact/contact.php" title="Contact">Contact</a> </li> <!-- Simple Menu Link --> <li> <a href="http://localhost/faq/faq.php" title="F.A.Q"><img src="http://localhost/faq/faq_mini.png" class="valign_middle" alt="" /></a> <a href="http://localhost/faq/faq.php" title="F.A.Q">F.A.Q</a> </li> <!-- Simple Menu Link --> <li> <a href="http://localhost/forum/index.php" title="Forum"><img src="http://localhost/forum/forum_mini.png" class="valign_middle" alt="" /></a> <a href="http://localhost/forum/index.php" title="Forum">Forum</a> </li> <!-- Simple Menu Link --> <li> <a href="http://localhost/gallery/gallery.php" title="Galerie"><img src="http://localhost/gallery/gallery_mini.png" class="valign_middle" alt="" /></a> <a href="http://localhost/gallery/gallery.php" title="Galerie">Galerie</a> </li> <!-- Simple Menu Link --> <li> <a href="http://localhost/web/web.php" title="Liens web"><img src="http://localhost/web/web_mini.png" class="valign_middle" alt="" /></a> <a href="http://localhost/web/web.php" title="Liens web">Liens web</a> </li> <!-- Simple Menu Link --> <li> <a href="http://localhost/guestbook/guestbook.php" title="Livre d'or"><img src="http://localhost/guestbook/guestbook_mini.png" class="valign_middle" alt="" /></a> <a href="http://localhost/guestbook/guestbook.php" title="Livre d'or">Livre d'or</a> </li> <!-- Simple Menu Link --> <li> <a href="http://localhost/media/media.php" title="Multimédia"><img src="http://localhost/media/media_mini.png" class="valign_middle" alt="" /></a> <a href="http://localhost/media/media.php" title="Multimédia">Multimédia</a> </li> <!-- Simple Menu Link --> <li> <a href="http://localhost/news/news.php" title="News"><img src="http://localhost/news/news_mini.png" class="valign_middle" alt="" /></a> <a href="http://localhost/news/news.php" title="News">News</a> </li> <!-- Simple Menu Link --> <li> <a href="http://localhost/search/search.php" title="Recherche"><img src="http://localhost/search/search_mini.png" class="valign_middle" alt="" /></a> <a href="http://localhost/search/search.php" title="Recherche">Recherche</a> </li> <!-- Simple Menu Link --> <li> <a href="http://localhost/poll/poll.php" title="Sondages"><img src="http://localhost/poll/poll_mini.png" class="valign_middle" alt="" /></a> <a href="http://localhost/poll/poll.php" title="Sondages">Sondages</a> </li> <!-- Simple Menu Link --> <li> <a href="http://localhost/download/download.php" title="Téléchargements"><img src="http://localhost/download/download_mini.png" class="valign_middle" alt="" /></a> <a href="http://localhost/download/download.php" title="Téléchargements">Téléchargements</a> </li> <!-- Simple Menu Link --> <li> <a href="http://localhost/wiki/wiki.php" title="Wiki"><img src="http://localhost/wiki/wiki_mini.png" class="valign_middle" alt="" /></a> <a href="http://localhost/wiki/wiki.php" title="Wiki">Wiki</a> </li> </ul> </div> <div class="module_mini_bottom"> </div> </div> <div class="module_mini_container"> <div class="module_mini_top"> <h5 class="sub_title">Question aléatoire</h5> </div> <div class="module_mini_contents"> <a href="../faq/faq.php?id=1&question=2#q2"><img src="/faq/faq.png" alt="" /></a> <a href="../faq/faq.php?id=1&question=2#q2" class="small_link">Qu'est-ce que PHPBoost ?</a> </div> <div class="module_mini_bottom"> </div> </div> <div class="module_mini_container"> <div class="module_mini_top"> <h5 class="sub_title">Livre d'or</h5> </div> <div class="module_mini_contents"> <p class="text_small">Aucun messages</p> <p><a class="small_link" href="/guestbook/guestbook.php">Livre d'or</a></p> </div> <div class="module_mini_bottom"> </div> </div> <div class="module_mini_container"> <div class="module_mini_top"> <h5 class="sub_title">Statistiques</h5> </div> <div class="module_mini_contents"> <p> <strong>1</strong> membre inscrit </p> <p> Dernier membre: <a href="http://localhost/member/member.php?id=1">tony</a> </p> <p style="margin:0;margin-top:10px;"> <a href="/stats/stats.php" title="Plus de stats" class="small_link">Plus de stats</a> </p> </div> <div class="module_mini_bottom"> </div> </div> </div> <div id="right_menu"> <div class="module_mini_container"> <div class="module_mini_top"> <h5 class="sub_title">Image aléatoire</h5> </div> <div class="module_mini_contents"> <div style="width:150px;height:150px;margin:auto;"> <div style="position:relative;width:150px;height:150px;overflow:hidden;" id="scrolling_images"> <script src="/gallery/templates/images/js/marquee.js" type="text/javascript"></script> <script type="text/javascript"> <!-- new Marquee({ element: "scrolling_images", animIn: Marquee.blindIn, animOut: Marquee.blindOut, delay: 1, data: [ { message: '<a href="/gallery/gallery.php?cat=1&id=1#pics_max"><img src="/gallery/pics/thumbnails/phpboost3.jpg" alt="PHPBoost 3!" width="150px" height="124px" /></a>' }, ] }); --> </script> </div> </div> <a class="small_link" href="/gallery/gallery.php">Galerie</a> </div> <div class="module_mini_bottom"> </div> </div> <span id="test"></span> <div id="online_mini" class="module_mini_container" style="display:none"> <div class="module_mini_top"> <h5 class="sub_title">En ligne</h5> </div> <div id="online_mini_body" class="module_mini_contents"> <span class="text_small">1 Visiteur, 0 Membre, 0 Modérateur, 0 Administrateur En ligne.</span> <div class="text_small" style="margin-top:10px;"> 19:05:32 Total : 1 </div> </div> <div class="module_mini_bottom"> </div> </div> <script type="text/javascript"> var ajax_online_mini = new Ajax.PeriodicalUpdater('online_mini_body', '../online/xmlhttprequest.php?mini=1', { method: 'get', frequency: 15, decay: 1 }); var i = window.location.href.indexOf('/online/online.php'); if(i>=0) { ajax_online_mini.stop(); } else { $('online_mini').setStyle({display:'block'}); } </script> <form method="post" action="/poll/poll.php?id=1&token=08f74ad94bcbc12f5f2c71e4a85a8638952900508b88a5d05032a6157e0b60bb" class="normal_form"> <div class="module_mini_container"> <div class="module_mini_top"> <h5 class="sub_title">Mini sondage</h5> </div> <div class="module_mini_contents" style="text-align:center"> <span style="font-size:10px;">PHPBoost 3.0</span> <hr style="width:90%;" /> <p style="padding-left: 6px;text-align: left;"> <label><input type="radio" name="radio" value="0" /> <span class="text_small">Super site!</span></label> <label><input type="radio" name="radio" value="1" /> <span class="text_small">Pas mal</span></label> <label><input type="radio" name="radio" value="2" /> <span class="text_small">Plutôt moyen</span></label> <label><input type="radio" name="radio" value="3" /> <span class="text_small">Bof</span></label> </p> <p style="margin:0;margin-top:10px;"> <input class="submit" name="valid_poll" type="submit" value="Vote" /> <a class="small_link" href="/poll/poll.php?id=1&r=1">Résultats</a> </p> </div> <div class="module_mini_bottom"> </div> </div> </form> <script type="text/javascript"> <!-- function XMLHttpRequest_shoutmsg() { var pseudo = document.getElementById("shout_pseudo").value; var contents = document.getElementById("shout_contents").value; if( pseudo != '' && contents != '' ) { document.getElementById('shoutimg').src = '/templates/SonicWorld/images/loading_mini.gif'; pseudo = escape_xmlhttprequest(pseudo); contents = escape_xmlhttprequest(contents); data = "pseudo=" + pseudo + "&contents=" + contents; var xhr_object = xmlhttprequest_init('/shoutbox/xmlhttprequest.php?token=08f74ad94bcbc12f5f2c71e4a85a8638952900508b88a5d05032a6157e0b60bb&add=1&token=08f74ad94bcbc12f5f2c71e4a85a8638952900508b88a5d05032a6157e0b60bb'); xhr_object.onreadystatechange = function() { if( xhr_object.readyState == 4 && xhr_object.status == 200 && xhr_object.responseText != '-1' && xhr_object.responseText != '-2' && xhr_object.responseText != '-3' && xhr_object.responseText != '-4' && xhr_object.responseText != '-5' && xhr_object.responseText != '-6' ) { var array_shout = new Array('', ''); eval(xhr_object.responseText); document.getElementById('shout_container').innerHTML = '<p id="shout_container_' + array_shout[2] + '">' + array_shout[0] + '<span class="text_small">: ' + array_shout[1] + '</span></p>' + document.getElementById('shout_container').innerHTML; document.getElementById('shout_contents').value = ''; document.getElementById('shoutimg').src = '/templates/SonicWorld/images/refresh_mini.png'; } else if( xhr_object.readyState == 4 ) { document.getElementById('shoutimg').src = '/templates/SonicWorld/images/refresh_mini.png'; switch( xhr_object.responseText ) { case '-1': alert("Vous n'êtes pas autorisé à poster !"); break; case '-2': alert("Vous ne pouvez pas encore poster, réessayez dans quelques instants"); break; case '-3': alert("Vous ne pouvez pas mettre de lien dans votre pseudo"); break; case '-4': alert("Nombre maximum de lien(s) internet autorisé(s) dans votre message : 2"); break; case '-5': alert("Tous les champs obligatoires doivent être remplis !"); break; case '-6': alert("Vous ne pouvez exécuter cette action, car vous avez été placé en lecture seule !"); break; } } } xmlhttprequest_sender(xhr_object, data); } else alert("Tous les champs obligatoires doivent être remplis !"); } function XMLHttpRequest_shoutdelmsg(idmsg) { document.getElementById('shoutimg').src = '/templates/SonicWorld/images/loading_mini.gif'; data = "idmsg=" + idmsg; var xhr_object = xmlhttprequest_init('/shoutbox/xmlhttprequest.php?del=1&token=08f74ad94bcbc12f5f2c71e4a85a8638952900508b88a5d05032a6157e0b60bb'); xhr_object.onreadystatechange = function() { if( xhr_object.readyState == 4 && xhr_object.status == 200 && xhr_object.responseText == '1' ) { document.getElementById('shoutimg').src = '/templates/SonicWorld/images/refresh_mini.png'; document.getElementById('shout_container_' + idmsg).style.display = 'none'; } else if( xhr_object.readyState == 4 ) document.getElementById('shoutimg').src = '/templates/SonicWorld/images/refresh_mini.png'; } xmlhttprequest_sender(xhr_object, data); } function XMLHttpRequest_shoutrefresh() { document.getElementById('shoutimg').src = '/templates/SonicWorld/images/loading_mini.gif'; var xhr_object = xmlhttprequest_init('/shoutbox/xmlhttprequest.php?refresh=1&token=08f74ad94bcbc12f5f2c71e4a85a8638952900508b88a5d05032a6157e0b60bb'); xhr_object.onreadystatechange = function() { if( xhr_object.readyState == 4 && xhr_object.status == 200 && xhr_object.responseText != '' ) { document.getElementById('shoutimg').src = '/templates/SonicWorld/images/refresh_mini.png'; document.getElementById('shout_container').innerHTML = xhr_object.responseText; } else if( xhr_object.readyState == 4 ) document.getElementById('shoutimg').src = '/templates/SonicWorld/images/refresh_mini.png'; } xmlhttprequest_sender(xhr_object, null); if( 60000 > 0 ) setTimeout('XMLHttpRequest_shoutrefresh()', 60000); } function check_form_shout(){ if(document.getElementById('shout_contents').value == "") { alert("Veuillez entrer un texte !"); return false; } return true; } function Confirm_del_shout(idmsg) { if( confirm("Supprimer ce message ?") ) XMLHttpRequest_shoutdelmsg(idmsg); } if( 60000 > 0 ) setTimeout('XMLHttpRequest_shoutrefresh()', 60000); --> </script> <form action="?token=08f74ad94bcbc12f5f2c71e4a85a8638952900508b88a5d05032a6157e0b60bb" method="post" onsubmit="return check_form_shout();"> <div class="module_mini_container"> <div class="module_mini_top"> <h5 class="sub_title">Discussion</h5> </div> <div class="module_mini_contents"> <div id="shout_container"> <p id="shout_container_1"> <span class="text_small" style="font-style: italic;">Equipe PHPBoost</span><span class="text_small">: L'équipe de PHPBoost vous souhaite la bienvenue!</span></p> </div> <label for="shout_pseudo"><span class="text_small">Pseudo</span></label> <input size="16" maxlength="25" type="text" class="text" name="shout_pseudo" id="shout_pseudo" value="Visiteur" /> <label for="shout_contents"><span class="text_small">Message</span></label> <textarea class="post" id="shout_contents" name="shout_contents" rows="4" cols="16"></textarea> <input type="submit" name="shoutbox" id="shoutbox_submit" value="Envoyer" class="submit" /> <script type="text/javascript"> <!-- document.getElementById('shoutbox_submit').style.display = 'none'; document.write('<input value="Envoyer" onclick="XMLHttpRequest_shoutmsg();" type="button" class="submit" />'); --> </script> <a href="javascript:XMLHttpRequest_shoutrefresh();" title="Rafraichir"><img src="/templates/SonicWorld/images/refresh_mini.png" id="shoutimg" alt="Rafraichir" class="valign_middle" /></a> <p style="margin:0;margin-top:10px;"> <a class="small_link" href="/shoutbox/shoutbox.php" title="">Archives</a> </p> </div> <div class="module_mini_bottom"> </div> </div> </form> </div> <div id="main"> <div id="main_content"> <div id="links"> <a class="small_link" href="http://localhost" title="Accueil">Accueil</a> <img src="/templates/SonicWorld/images/breadcrumb.png" alt="" class="valign_middle" /> <a class="small_link" href="news.php" title="News">News</a> </div> <script type="text/javascript"> <!-- function Confirm() { return confirm("Supprimer cette News ?"); } --> </script> <div class="news_container"> <div class="news_top_l"></div> <div class="news_top_r"></div> <div class="news_top"> <div style="float:left;padding-left:30px;"><h3 class="title">Bienvenue sur votre site!</h3></div> <div style="float:right;"></div> </div> <div class="news_content"> Vous désirez un site dynamique capable de s'adapter à vos besoins ? PHPBoost est fait pour vous ! Vous pourrez à travers une administration intuitive personnaliser entièrement votre site sans connaissances particulières. En effet ce logiciel a été conçu avec la volonté de le rendre utilisable simplement par le plus grand nombre. Prenez le temps de découvrir toutes les fonctionnalités qui vous sont offertes. En cas de problème une communauté grandissante sera toujours là pour vous épauler ! Bienvenue sur votre site ! </div> <div class="news_bottom_l"></div> <div class="news_bottom_r"></div> <div class="news_bottom"></div> </div> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="" height="" id="dewslider4" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="?xml=" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="?xml=" quality="high" bgcolor="#ffffff" width="" height="" name="dewslider4" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object> <div class="news_container"> <div class="news_top_l"></div> <div class="news_top_r"></div> <div class="news_top"> <span style="float: left; padding-left: 5px; margin-top: 5px;"> <a href="../syndication.php?m=news" title="Rss"><img class="valign_middle" src="../templates/SonicWorld/images/rss.png" alt="Rss" title="Rss" /></a> <a class="news_title" href="../news/news.php?id=1">PHPBoost 3</a> </span> <span style="float:right; margin-top: 5px;"> <img src="/news/templates/images/comments.png" alt="" class="valign_middle" /> <a class="com" href="../news/news.php?cat=0&id=1&com=0#anchor_news">Poster commentaire</a> </span> </div> <div class="news_content"> <img src="http://localhost/templates/base/theme/images/phpboost3.png" alt="PHPBoost 3.0" title="PHPBoost 3.0" class="img_right" /> <a href="news.php?cat=1"><img class="valign_middle" src="http://localhost/news/news.png" alt="" /></a> Votre site boosté par PHPBoost 3 est bien installé. Afin de vous aider à prendre votre site en main, l'accueil de chaque module contient un message pour vous guider pour vos premiers pas. Voici également quelques recommandations supplémentaires que nous vous proposons de lire avec attention : <h4 class="formatter-title">N'oubliez pas de supprimer le répertoire 'install'</h4> Supprimez le répertoire /install à la racine de votre site pour des raisons de sécurité afin que personne ne puisse recommencer l'installation. <h4 class="formatter-title">Administrez votre site</h4> Accédez au <a href="http://localhost/admin/admin_index.php">panneau d'administration de votre site</a> afin de le paramétrer comme vous le souhaitez! Pour cela : <ul class="formatter-ul"> <li class="formatter-li"><a href="http://localhost/admin/admin_maintain.php">Mettez votre site en maintenance</a> en attendant que vous le configuriez à votre guise. </li><li class="formatter-li">Rendez vous à la <a href="http://localhost/admin/admin_config.php">Configuration générale du site</a>. </li><li class="formatter-li"><a href="http://localhost/admin/admin_modules.php">Configurez les modules</a> disponibles et donnez leur les droits d'accès (si vous n'avez pas installé le pack complet, tous les modules sont disponibles sur le site de <a href="http://www.phpboost.com">phpboost.com</a> dans la section téléchargement). </li><li class="formatter-li"><a href="http://localhost/admin/admin_content_config.php">Choisissez le langage de formatage du contenu</a> par défaut du site. </li><li class="formatter-li"><a href="http://localhost/admin/admin_members_config.php">Configurez l'inscription des membres</a>. </li><li class="formatter-li"><a href="http://localhost/admin/admin_themes.php">Choisissez le thème par défaut de votre site</a> pour changer l'apparence de votre site (vous pouvez en obtenir d'autres sur le site de <a href="http://www.phpboost.com">phpboost.com</a>). </li><li class="formatter-li"><a href="http://localhost/news/admin_news_config.php">Modifiez l'édito</a> de votre site. </li><li class="formatter-li">Avant de donner l'accès de votre site à vos visiteurs, prenez un peu de temps pour y mettre du contenu. </li><li class="formatter-li">Enfin <a href="http://localhost/admin/admin_maintain.php">désactivez la maintenance</a> de votre site afin qu'il soit visible par vos visiteurs. </li></ul> <h4 class="formatter-title">Que faire si vous rencontrez un problème ?</h4> N'hésitez pas à consulter <a href="http://www.phpboost.com/wiki/wiki.php">la documentation de PHPBoost</a> ou de poser vos question sur le <a href="http://www.phpboost.com/forum/index.php">forum d'entraide</a>. <p class="float-right">Toute l'équipe de PHPBoost vous remercie d'utiliser son logiciel pour créer votre site web!</p> <div class="spacer"></div> </div> <div class="news_bottom_l"></div> <div class="news_bottom_r"></div> <div class="news_bottom"> <span style="float:left"><a class="small_link" href="../member/member.php?id=1">tony</a></span> <span style="float:right">Le: 01/05/10</span> </div> </div> <div class="spacer"></div> <div class="text_center"></div> <div class="text_center"></div> <div class="spacer"></div> </div> </div> <div id="top_footer"> <div style="margin:10px 10px"> <form action="/newsletter/newsletter.php?token=08f74ad94bcbc12f5f2c71e4a85a8638952900508b88a5d05032a6157e0b60bb" method="post"> <div class="newsletter_form" style="float:right;"> <span class="newsletter_title">Newsletter</span> <input type="text" name="mail_newsletter" maxlength="50" size="16" class="text newsletter_text" value="" /> <input type="image" class="newsletter_img" value="1" src="/newsletter/templates/images/newsletter_submit.png" /> <input type="hidden" name="subscribe" value="subscribe" /> </div> </form> </div> <div class="spacer"></div> </div> </div> <div id="footer"> <span> Boosté par <a style="font-size:10px" href="http://www.phpboost.com" title="PHPBoost">PHPBoost 3.0</a> </span> </div> </div> <div id="scroll_bottom_page" /></div> </body> </html>
ReidLos Membre non connecté
- Modérateur
- Voir le profil du membre ReidLos
- Inscrit le : 27/02/2009
- Site internet
- Groupes :
- Equipe Développement
De plus pour l'url des fichiers, je rajouterai la constante PATH_TO_ROOT devant pour qu'il n'y ai pas de soucis
Édité par ReidLos Le 02/05/2010 à 21h13
KONA Membre non connecté
Booster Fusée
- Booster Fusée
- Voir le profil du membre KONA
- Inscrit le : 21/05/2006
- Site internet
news.tpl
Code TPL :
<script type="text/javascript"> <!-- function Confirm() { return confirm("{L_ALERT_DELETE_NEWS}"); } --> </script> # IF C_NEWS_EDITO # <div class="news_container"> <div class="news_top_l"></div> <div class="news_top_r"></div> <div class="news_top"> <div style="float:left;padding-left:30px;"><h3 class="title">{TITLE}</h3></div> <div style="float:right;"># IF C_IS_ADMIN # <a href="../news/admin_news_config.php" title="{L_EDIT}"><img src="../templates/{THEME}/images/{LANG}/edit.png" class="valign_middle" alt="{L_EDIT}" /></a> # ENDIF #</div> </div> <div class="news_content"> {CONTENTS} </div> <div class="news_bottom_l"></div> <div class="news_bottom_r"></div> <div class="news_bottom"></div> </div> # ENDIF # <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="{WIDTH}" height="{HEIGHT}" id="dewslider4" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="{LINK_SWF}?xml={LINK_XML}" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="{LINK_SWF}?xml={LINK_XML}" quality="high" bgcolor="#ffffff" width="{WIDTH}" height="{HEIGHT}" name="dewslider4" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object> # IF C_NEWS_NO_AVAILABLE # <div class="news_container"> <div class="news_top_l"></div> <div class="news_top_r"></div> <div class="news_top"> <div style="float:left;padding-left:30px;"><a href="../syndication.php?m=news" title="Syndication"><img class="valign_middle" src="../templates/{THEME}/images/rss.png" alt="Syndication" title="Syndication" /></a></div> <div style="float:right;"><h3 class="title valign_middle">{L_LAST_NEWS}</h3></div> </div> <div class="news_content"> <p class="text_strong text_center">{L_NO_NEWS_AVAILABLE}</p> </div> <div class="news_bottom_l"></div> <div class="news_bottom_r"></div> <div class="news_bottom"></div> </div> # ENDIF # # IF C_NEWS_BLOCK # # START news # # IF news.C_NEWS_ROW # <div class="spacer"></div> # ENDIF # # IF C_NEWS_BLOCK_COLUMN # <div class="news_container" style="float:left;width:{COLUMN_WIDTH}%"> # ELSE # <div class="news_container"> # ENDIF # <div class="news_top_l"></div> <div class="news_top_r"></div> <div class="news_top"> <span style="float: left; padding-left: 5px; margin-top: 5px;"> <a href="../syndication.php?m=news" title="Rss"><img class="valign_middle" src="../templates/{THEME}/images/rss.png" alt="Rss" title="Rss" /></a> <a class="news_title" href="../news/news{news.U_NEWS_LINK}">{news.TITLE}</a> </span> <span style="float:right; margin-top: 5px;"> <img src="{PATH_TO_ROOT}/news/templates/images/comments.png" alt="" class="valign_middle" /> {news.U_COM} # IF C_IS_ADMIN # <a href="../news/admin_news.php?id={news.ID}" title="{L_EDIT}"><img class="valign_middle" src="../templates/{THEME}/images/{LANG}/edit.png" alt="{L_EDIT}" /></a> <a href="../news/admin_news.php?delete=1&id={news.ID}&token={TOKEN}" title="{L_DELETE}" onclick="javascript:return Confirm();"><img class="valign_middle" src="../templates/{THEME}/images/{LANG}/delete.png" alt="{L_DELETE}" /></a> # ENDIF # </span> </div> <div class="news_content"> # IF news.IMG # <img src="{news.IMG}" alt="{news.IMG_DESC}" title="{news.IMG_DESC}" class="img_right" /> # ENDIF # # IF news.C_ICON # <a href="news.php?cat={news.IDCAT}"><img class="valign_middle" src="{news.ICON}" alt="" /></a> # ENDIF # {news.CONTENTS} {news.EXTEND_CONTENTS} <div class="spacer"></div> </div> <div class="news_bottom_l"></div> <div class="news_bottom_r"></div> <div class="news_bottom"> <span style="float:left"><a class="small_link" href="../member/member{news.U_USER_ID}">{news.PSEUDO}</a></span> <span style="float:right">{news.DATE}</span> </div> </div> {COMMENTS} # END news # # IF C_NEWS_NAVIGATION_LINKS # <div style="width:90%;padding:20px;margin:auto;margin-top:-15px;"> # IF C_PREVIOUS_NEWS # <span style="float:left;"><a href="news{U_PREVIOUS_NEWS}"><img src="../templates/{THEME}/images/left.png" alt="" class="valign_middle" /></a> <a href="news{U_PREVIOUS_NEWS}">{PREVIOUS_NEWS}</a></span> # ENDIF # # IF C_NEXT_NEWS # <span style="float:right;"><a href="news{U_NEXT_NEWS}">{NEXT_NEWS}</a> <a href="news{U_NEXT_NEWS}"><img src="../templates/{THEME}/images/right.png" alt="" class="valign_middle" /></a></span> # ENDIF # </div> # ENDIF # <div class="spacer"></div> <div class="text_center">{PAGINATION}</div> <div class="text_center">{ARCHIVES}</div> <div class="spacer"></div> # ENDIF # # IF C_NEWS_LINK # <div class="news_container"> <div class="news_top_l"></div> <div class="news_top_r"></div> <div class="news_top"> <div style="float:left"><a href="../syndication.php?m=news" title="Syndication"><img class="valign_middle" src="../templates/{THEME}/images/rss.png" alt="Syndication" title="Syndication" /></a> <h3 class="title valign_middle">{L_LAST_NEWS}</h3></div> <div style="float:right"># IF C_IS_ADMIN # <a href="admin_news_cat.php?id={IDCAT}" title="{L_EDIT}"><img class="valign_middle" src="../templates/{THEME}/images/{LANG}/edit.png" /></a> # ENDIF #</div> </div> <div class="news_content"> # START list # # IF list.C_NEWS_ROW # <div class="spacer"></div> # ENDIF # # IF C_NEWS_LINK_COLUMN # <div style="float:left;width:{COLUMN_WIDTH}%"> # ELSE # <div> # ENDIF # <ul style="margin:0;padding:0;list-style-type:none;"> <li><img src="../templates/{THEME}/images/li.png" alt="" /> {list.ICON} <span class="text_small">{list.DATE} :</span> <a href="{list.U_NEWS}">{list.TITLE}</a></li> </ul> </div> # END list # <div class="spacer"> </div> <div class="text_center">{PAGINATION}</div> <div class="text_center">{ARCHIVES}</div> </div> <div class="news_bottom_l"></div> <div class="news_bottom_r"></div> <div class="news_bottom"></div> </div> # ENDIF #
tony Membre non connecté
Booster Mortier
- Booster Mortier
- Voir le profil du membre tony
- Inscrit le : 11/11/2009
ReidLos :
le placement dans news.php est incorrect... tu dois placer ce que je t'ai donnée aprés la fin de la boucle elseif{}
De plus pour l'url des fichiers, je rajouterai la constante PATH_TO_ROOT devant pour qu'il n'y ai pas de soucis
De plus pour l'url des fichiers, je rajouterai la constante PATH_TO_ROOT devant pour qu'il n'y ai pas de soucis
J'ai rien compris, je sais vous devez vous dire quesqu'il nous soul lui, mais je débute, vraiment "PATH_TO_ROOT" et "après la fin de la boucle elseif{}" sa me dit rien
Merci de ton aide reidlos
ReidLos Membre non connecté
- Modérateur
- Voir le profil du membre ReidLos
- Inscrit le : 27/02/2009
- Site internet
- Groupes :
- Equipe Développement
tu place le code, juste après ce signe...
ensuite tu met : PATH_TO_ROOT . avant les url du code que je t'ai donné ( le /slide/slide.xml etc )
donc sa te donne par exemple : PATH_TO_ROOT . '/slide/slide.xml'
Fais également la modif de KONA
Édité par ReidLos Le 02/05/2010 à 21h39
tony Membre non connecté
Booster Mortier
- Booster Mortier
- Voir le profil du membre tony
- Inscrit le : 11/11/2009
Merci beaucoup
Édité par tony Le 02/05/2010 à 21h35
ReidLos Membre non connecté
- Modérateur
- Voir le profil du membre ReidLos
- Inscrit le : 27/02/2009
- Site internet
- Groupes :
- Equipe Développement
copie le fichier cache/slide.php ici et slide/slide.xml
tony Membre non connecté
Booster Mortier
- Booster Mortier
- Voir le profil du membre tony
- Inscrit le : 11/11/2009
ReidLos :
la config du module slide... tu as bien toutes les informations ?
copie le fichier cache/slide.php ici et slide/slide.xml
copie le fichier cache/slide.php ici et slide/slide.xml
Comment sa copie le fichier cache/slide.php ici et slide/slide.xml, je les copie ou ?
Et aussi, comment sa la config du module slide... tu as bien toutes les informations, je comprend pas ta question ?
Vraiment merci reidlos
Édité par tony Le 02/05/2010 à 21h55
ReidLos Membre non connecté
- Modérateur
- Voir le profil du membre ReidLos
- Inscrit le : 27/02/2009
- Site internet
- Groupes :
- Equipe Développement
Code TPL :
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="{WIDTH}" height="{HEIGHT}" id="dewslider4" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="{LINK_SWF}?xml={LINK_XML}" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="{LINK_SWF}?xml={LINK_XML}" quality="high" bgcolor="#ffffff" width="{WIDTH}" height="{HEIGHT}" name="dewslider4" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object>
Au dessus de la conditions tpl comme je te l'ai demandé et également KONA avec sa modif...
Ensuite bah tu prend ce qu'il y as dans les fichiers et tu les met dans la balise code ici
Édité par ReidLos Le 02/05/2010 à 21h56
tony Membre non connecté
Booster Mortier
- Booster Mortier
- Voir le profil du membre tony
- Inscrit le : 11/11/2009
ReidLos Membre non connecté
- Modérateur
- Voir le profil du membre ReidLos
- Inscrit le : 27/02/2009
- Site internet
- Groupes :
- Equipe Développement
Post ton news_interface.class.php stp et supprime ce que je t'ai donnée dans news.php
ReidLos Membre non connecté
- Modérateur
- Voir le profil du membre ReidLos
- Inscrit le : 27/02/2009
- Site internet
- Groupes :
- Equipe Développement
Code PHP :
<?php /*################################################## * news_interface.class.php * ------------------- * begin : April 9, 2008 * copyright : (C) 2008 Loïc Rouchon * email : horn@phpboost.com * * ################################################### * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ###################################################*/ // Inclusion du fichier contenant la classe ModuleInterface import('modules/module_interface'); define('NEWS_MAX_SEARCH_RESULTS', 100); // Classe ForumInterface qui hérite de la classe ModuleInterface class NewsInterface extends ModuleInterface { ## Public Methods ## function NewsInterface() //Constructeur de la classe ForumInterface { parent::ModuleInterface('news'); } //Récupération du cache. function get_cache() { global $Sql; $news_config = 'global $CONFIG_NEWS;' . "n"; //Récupération du tableau linéarisé dans la bdd. $CONFIG_NEWS = unserialize($Sql->query("SELECT value FROM " . DB_TABLE_CONFIGS . " WHERE name = 'news'", __LINE__, __FILE__)); $news_config .= '$CONFIG_NEWS = ' . var_export($CONFIG_NEWS, true) . ';' . "n"; return $news_config; } //Actions journalière. function on_changeday() { global $Sql; //Publication des news en attente pour la date donnée. $result = $Sql->query_while("SELECT id, start, end FROM " . PREFIX . "news WHERE visible != 0", __LINE__, __FILE__); while ($row = $Sql->fetch_assoc($result)) { if ($row['start'] <= time() && $row['start'] != 0) $Sql->query_inject("UPDATE " . PREFIX . "news SET visible = 1, start = 0 WHERE id = '" . $row['id'] . "'", __LINE__, __FILE__); if ($row['end'] <= time() && $row['end'] != 0) $Sql->query_inject("UPDATE " . PREFIX . "news SET visible = 0, start = 0, end = 0 WHERE id = '" . $row['id'] . "'", __LINE__, __FILE__); } } function get_search_request($args) /** * Renvoie la requête de recherche */ { global $Sql; $weight = isset($args['weight']) && is_numeric($args['weight']) ? $args['weight'] : 1; $request = "SELECT " . $args['id_search'] . " AS id_search, n.id AS id_content, n.title AS title, ( 2 * MATCH(n.title) AGAINST('" . $args['search'] . "') + (MATCH(n.contents) AGAINST('" . $args['search'] . "') + MATCH(n.extend_contents) AGAINST('" . $args['search'] . "')) / 2 ) / 3 * " . $weight . " AS relevance, " . $Sql->concat("'" . PATH_TO_ROOT . "/news/news.php?id='","n.id") . " AS link FROM " . PREFIX . "news n WHERE ( MATCH(n.title) AGAINST('" . $args['search'] . "') OR MATCH(n.contents) AGAINST('" . $args['search'] . "') OR MATCH(n.extend_contents) AGAINST('" . $args['search'] . "') ) AND visible = 1 AND ('" . time() . "' > start AND ( end = 0 OR '" . time() . "' < end ) ) ORDER BY relevance DESC " . $Sql->limit(0, NEWS_MAX_SEARCH_RESULTS); return $request; } function get_feeds_list() { global $LANG, $Sql; import('content/syndication/feeds_list'); $feeds = new FeedsList(); $cats_tree = new FeedsCat('news', 0, $LANG['root']); $result = $Sql->query_while("SELECT id, name FROM " . PREFIX . "news_cat ORDER BY name ASC", __LINE__, __FILE__); while ($row = $Sql->fetch_assoc($result)) { $cats_tree->add_child(new FeedsCat('news', $row['id'], $row['name'])); } $Sql->query_close($result); $feeds->add_feed($cats_tree, DEFAULT_FEED_NAME); return $feeds; } function get_feed_data_struct($idcat = 0, $name = '') { global $Cache, $Sql, $LANG, $CONFIG, $CONFIG_NEWS; import('content/syndication/feed_data'); import('util/date'); import('util/url'); load_module_lang('news'); $data = new FeedData(); $data->set_title($LANG['xml_news_desc'] . ' ' . $CONFIG['server_name']); $data->set_date(new Date()); $data->set_link(new Url('/syndication.php?m=news&cat=' . $idcat)); $data->set_host(HOST); $data->set_desc($LANG['xml_news_desc'] . ' ' . $CONFIG['server_name']); $data->set_lang($LANG['xml_lang']); // Load the new's config $Cache->load('news'); // Last news $result = $Sql->query_while("SELECT id, title, contents, timestamp, img FROM " . PREFIX . "news WHERE visible = 1 ORDER BY timestamp DESC" . $Sql->limit(0, 2 * $CONFIG_NEWS['pagination_news']), __LINE__, __FILE__); // Generation of the feed's items while ($row = $Sql->fetch_assoc($result)) { $item = new FeedItem(); $item->set_title($row['title']); // Rewriting $link = new Url('/news/news' . url('.php?id=' . $row['id'], '-0-' . $row['id'] . '+' . url_encode_rewrite($row['title']) . '.php')); $item->set_link($link); $item->set_guid($link); $item->set_desc(second_parse($row['contents'])); $item->set_date(new Date(DATE_TIMESTAMP, TIMEZONE_SYSTEM, $row['timestamp'])); $item->set_image_url($row['img']); $data->add_item($item); } $Sql->query_close($result); return $data; } function get_cat() { global $Sql; $result = $Sql->query_while("SELECT * FROM " . PREFIX . "news_cat", __LINE__, __FILE__); $data = array(); while ($row = $Sql->fetch_assoc($result)) { $data[$row['id']] = $row['name']; } $Sql->query_close($result); return $data; } function get_home_page() { global $User, $Sql, $Cache, $Bread_crumb, $CONFIG_NEWS, $LANG, $Session; require_once(PATH_TO_ROOT . '/news/news_begin.php'); $show_archive = retrieve(GET, 'arch', false); $is_admin = $User->check_level(ADMIN_LEVEL); $tpl_news = new Template('news/news.tpl'); if ($CONFIG_NEWS['activ_edito'] == 1) //Affichage de l'édito { $tpl_news->assign_vars( array( 'C_NEWS_EDITO' => true, 'CONTENTS' => second_parse($CONFIG_NEWS['edito']), 'TITLE' => $CONFIG_NEWS['edito_title'] )); } import('content/comments'); import('content/syndication/feed'); //On crée une pagination (si activé) si le nombre de news est trop important. import('util/pagination'); $Pagination = new Pagination(); //Pagination activée, sinon affichage lien vers les archives. if ($CONFIG_NEWS['activ_pagin'] == '1') { $show_pagin = $Pagination->display(PATH_TO_ROOT . '/news/news' . url('.php?p=%d', '-0-0-%d.php'), $CONFIG_NEWS['nbr_news'], 'p', $CONFIG_NEWS['pagination_news'], 3); $first_msg = $Pagination->get_first_msg($CONFIG_NEWS['pagination_news'], 'p'); } elseif ($show_archive) //Pagination des archives. { $show_pagin = $Pagination->display(PATH_TO_ROOT . '/news/news' . url('.php?arch=1&p=%d', '-0-0-%d.php?arch=1'), $CONFIG_NEWS['nbr_news'] - $CONFIG_NEWS['pagination_news'], 'p', $CONFIG_NEWS['pagination_arch'], 3); $first_msg = $CONFIG_NEWS['pagination_news'] + $Pagination->get_first_msg($CONFIG_NEWS['pagination_arch'], 'p'); $CONFIG_NEWS['pagination_news'] = $CONFIG_NEWS['pagination_arch']; } else //Affichage du lien vers les archives. { $show_pagin = (($CONFIG_NEWS['nbr_news'] > $CONFIG_NEWS['pagination_news']) && ($CONFIG_NEWS['nbr_news'] != 0)) ? '<a href="' . PATH_TO_ROOT . '/news/news.php?arch=1" title="' . $LANG['display_archive'] . '">' . $LANG['display_archive'] . '</a>' : ''; $first_msg = 0; } $tpl_news->assign_vars(array( 'C_IS_ADMIN' => $is_admin, 'C_NEWS_NAVIGATION_LINKS' => false, 'L_SYNDICATION' => $LANG['syndication'], 'PAGINATION' => $show_pagin, 'L_ALERT_DELETE_NEWS' => $LANG['alert_delete_news'], 'L_LAST_NEWS' => !$show_archive ? $LANG['last_news'] : $LANG['archive'], 'PATH_TO_ROOT' => TPL_PATH_TO_ROOT, 'THEME' => get_utheme(), 'FEED_MENU' => Feed::get_feed_menu(FEED_URL) )); ## Modif include_once PATH_TO_ROOT . '/cache/slide.php'; include_once 'PATH_TO_ROOT . /slide/fonction_slide.php'; if(!empty($CONFIG_SLIDE['link'])) { if(!file_exists('PATH_TO_ROOT . /slide/slide.xml')) { $array = unserialize($CONFIG_SLIDE['link']); gener_xml($array,true); } $tpl->assign_vars(array( 'LINK_XML' => PATH_TO_ROOT . '/slide/slide.xml', 'LINK_SWF' => PATH_TO_ROOT . '/slide/dewslider.swf', 'TITLE' => $CONFIG_SLIDE['title'], 'HEIGHT' => $CONFIG_SLIDE['height'], 'WIDTH' => $CONFIG_SLIDE['width'], )); } ### //Si les news en block sont activées on recupère la page. if ($CONFIG_NEWS['type'] == 1 && !$show_archive) { $tpl_news->assign_vars(array( 'C_NEWS_BLOCK' => true )); $column = ($CONFIG_NEWS['nbr_column'] > 1) ? true : false; if ($column) { $i = 0; $CONFIG_NEWS['nbr_column'] = !empty($CONFIG_NEWS['nbr_column']) ? $CONFIG_NEWS['nbr_column'] : 1; $column_width = floor(100/$CONFIG_NEWS['nbr_column']); $tpl_news->assign_vars(array( 'C_NEWS_BLOCK_COLUMN' => true, 'COLUMN_WIDTH' => $column_width )); } $z = 0; list($admin, $del) = array('', ''); $result = $Sql->query_while("SELECT n.contents, n.extend_contents, n.title, n.id, n.timestamp, n.user_id, n.img, n.alt, n.nbr_com, nc.id AS idcat, nc.icon, m.login FROM " . PREFIX . "news n LEFT JOIN " . PREFIX . "news_cat nc ON nc.id = n.idcat LEFT JOIN " . DB_TABLE_MEMBER . " m ON m.user_id = n.user_id WHERE '" . time() . "' >= n.start AND ('" . time() . "' <= n.end OR n.end = 0) AND n.visible = 1 ORDER BY n.timestamp DESC " . $Sql->limit($first_msg, $CONFIG_NEWS['pagination_news']), __LINE__, __FILE__); while ($row = $Sql->fetch_assoc($result)) { //Séparation des news en colonnes si activé. $new_row = false; if ($column) { $new_row = (($i%$CONFIG_NEWS['nbr_column']) == 0 && $i > 0); $i++; } $tpl_news->assign_block_vars('news', array( 'C_IMG' => !empty($row['img']), 'C_ICON' => (!empty($row['icon']) && $CONFIG_NEWS['activ_icon'] == 1), 'C_NEWS_ROW' => $new_row, 'ID' => $row['id'], 'IDCAT' => $row['idcat'], 'ICON' => second_parse_url($row['icon']), 'TITLE' => $row['title'], 'CONTENTS' => second_parse($row['contents']), 'EXTEND_CONTENTS' => (!empty($row['extend_contents']) ? '<a style="font-size:10px" href="' . PATH_TO_ROOT . '/news/news' . url('.php?id=' . $row['id'], '-0-' . $row['id'] . '.php') . '">[' . $LANG['extend_contents'] . ']</a> ' : ''), 'IMG' => second_parse_url($row['img']), 'IMG_DESC' => $row['alt'], 'PSEUDO' => $CONFIG_NEWS['display_author'] ? $row['login'] : '', 'DATE' => $CONFIG_NEWS['display_date'] ? $LANG['on'] . ': ' . gmdate_format('date_format_short', $row['timestamp']) : '', 'TOKEN' => $Session->get_token(), 'U_COM' => ($CONFIG_NEWS['activ_com'] == 1) ? Comments::com_display_link($row['nbr_com'], PATH_TO_ROOT . '/news/news' . url('.php?cat=0&id=' . $row['id'] . '&com=0', '-0-' . $row['id'] . '+' . url_encode_rewrite($row['title']) . '.php?com=0'), $row['id'], 'news') : '', 'NEW_ROW' => $new_row, 'U_USER_ID' => url('.php?id=' . $row['user_id'], '-' . $row['user_id'] . '.php'), 'U_NEWS_LINK' => url('.php?id=' . $row['id'], '-0-' . $row['id'] . '+' . url_encode_rewrite($row['title']) . '.php'), 'FEED_MENU' => Feed::get_feed_menu(FEED_URL) )); $z++; } $Sql->query_close($result); if ($z == 0) { $tpl_news->assign_vars( array( 'C_NEWS_NO_AVAILABLE' => true, 'L_NO_NEWS_AVAILABLE' => $LANG['no_news_available'] )); } } else //News en liste { $tpl_news->assign_vars(array( 'C_NEWS_LINK' => true )); $column = ($CONFIG_NEWS['nbr_column'] > 1) ? true : false; if ($column) { $i = 0; $CONFIG_NEWS['nbr_column'] = !empty($CONFIG_NEWS['nbr_column']) ? $CONFIG_NEWS['nbr_column'] : 1; $column_width = floor(100/$CONFIG_NEWS['nbr_column']); $tpl_news->assign_vars(array( 'C_NEWS_LINK_COLUMN' => true, 'COLUMN_WIDTH' => $column_width )); } $result = $Sql->query_while("SELECT n.id, n.title, n.timestamp, nc.id AS idcat, nc.icon FROM " . PREFIX . "news n LEFT JOIN " . PREFIX . "news_cat nc ON nc.id = n.idcat WHERE n.visible = 1 ORDER BY n.timestamp DESC " . $Sql->limit($first_msg, $CONFIG_NEWS['pagination_news']), __LINE__, __FILE__); while ($row = $Sql->fetch_assoc($result)) { //Séparation des news en colonnes si activé. $new_row = false; if ($column) { $new_row = (($i%$CONFIG_NEWS['nbr_column']) == 0 && $i > 0); $i++; } $tpl_news->assign_block_vars('list', array( 'C_NEWS_ROW' => $new_row, 'ICON' => ((!empty($row['icon']) && $CONFIG_NEWS['activ_icon'] == 1) ? '<a href="' . PATH_TO_ROOT . '/news/news' . url('.php?cat=' . $row['idcat'], '-' . $row['idcat'] . '.php') . '"><img class="valign_middle" src="' . $row['icon'] . '" alt="" /></a>' : ''), 'DATE' => gmdate_format('date_format_tiny', $row['timestamp']), 'TITLE' => $row['title'], 'NEW_ROW' => $new_row, 'U_NEWS' => PATH_TO_ROOT . '/news/news' . url('.php?id=' . $row['id'], '-0-' . $row['id'] . '+' . url_encode_rewrite($row['title']) . '.php') )); } $Sql->query_close($result); } return $tpl_news->parse(TRUE); } } ?>
Essaye ca
tony Membre non connecté
Booster Mortier
- Booster Mortier
- Voir le profil du membre tony
- Inscrit le : 11/11/2009
Édité par tony Le 03/05/2010 à 12h45
tony Membre non connecté
Booster Mortier
- Booster Mortier
- Voir le profil du membre tony
- Inscrit le : 11/11/2009
ReidLos :
tu peux remplacer ton index.php avec ce genre de chose :
Code PHP :
<?php /*################################################## * index.php * ------------------- * begin : August 23 2007 * copyright : (C) 2007 CrowkaiT * email : crowkait@phpboost.com * * ################################################### * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ###################################################*/ define('PATH_TO_ROOT', '.'); include_once('./kernel/begin.php'); define('TITLE', 'montitre'); require_once('./kernel/header.php'); include_once('./cache/slide.php'); if(!empty($CONFIG_SLIDE['link'])) { if(!file_exists('slide/slide.xml')) { $array = unserialize($CONFIG_SLIDE['link']); gener_xml($array,true); } } ?> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width=" <?php echo $CONFIG_SLIDE['width'] ?> " height=" <?php echo $CONFIG_SLIDE['height'] ?> " id="dewslider4" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="./slide/dewslider.swf?xml=./slide/slide.xml" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="./slide/dewslider.swf?xml=./slide/slide.xml" quality="high" bgcolor="#ffffff" width=" <?php echo $CONFIG_SLIDE['width'] ?> " height=" <?php echo $CONFIG_SLIDE['height'] ?> " name="dewslider4" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object> <?php include_once('./kernel/footer.php'); ?>
Ou sinon comment je pourrait faire pour afficher les news sur mon index.php, j'aimerai que mais news soit en dessous du slide mais avec la même mise en forme que ci on était sur la page news/news.php ?
Merci beaucoup reidlos.
Ou a moins que tu est trouver une solution pour l'adapter a la page news/news.php ?
Édité par tony Le 03/05/2010 à 17h36
Visiteur
Boosteur Inactif
Ps: je lis tout les sujets sur pbt... à savoir 30 par jours environs... Donc je sais ou tu en es et si je n'interviens pas sur PBT, c'est pour ne pas faire de gène avec les deux personnes qui t'aident déjà. CsN n'est pas la roue de secours de PBT ...
@ bon entendeur ...
Répondre
Vous n'êtes pas autorisé à écrire dans cette catégorie