Derniers wikis, dernières news, derniers articles,... [Réglé]
Flux RSS
Créations de Modules
Visiteur
Boosteur Inactif
Sur une page accueil.php, je voudrais afficher des liens vers les derniers wikis, dernières news, derniers articles,...
un petit peu comme la page d'accueil de http://www.phpboost.com
j'ai lancé des recherches sur le site avec "RSS" mais pas de réponse car moins de 4 caractères
avec "flux" et "syndication" je n'ai rien trouvé qui réponde à mon besoin.
si quelqu'un peut m'aider je l'en remercie d'avance

Shadow Membre non connecté
Booster Fusée
-
Booster Fusée
- Voir le profil du membre Shadow
- Inscrit le : 30/12/2007
- Site internet
Shadow
"Quand tu ranges chez toi, ça fout le bordel chez ton voisin". - Règle d'entropie générale adaptée aux usages domestiques.
"Quand tu ranges chez toi, ça fout le bordel chez ton voisin". - Règle d'entropie générale adaptée aux usages domestiques.
MisterT Membre non connecté
Booster Bazooka
-
Booster Bazooka
- Voir le profil du membre MisterT
- Inscrit le : 03/01/2008
Voilà, pour commencer, ce que j'ai fait pour un site, ça peut t'aider
tu auras juste à personnaliser
MAIS une fois un problème réglé :
Problème : Les derniers articles, derniers sujets, derniers wikis et dernières news ne s'affichent pas
Si une âme charitable peut résoudre ce problème
Merci d'avance
Code PHP :
<?php //Licence /*################################################## * page.php * ------------------- * begin : Date de création du fichier * copyright : (C) 2007 Nom du/des développeur(s) * email : email du/des développeur(s) * * ################################################### * * 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. * ###################################################*/ //Chargement des fonctions //Début du chargement de l'environnement include_once('../kernel/begin.php'); //Titre de la page define('TITLE', 'Bienvenue sur le Site Support du Réseau Pédagogique'); //Inclusion du header include_once('../kernel/header.php'); // mise en variabble des flux rss voir à elevé les modules que tu ne désires pas. import('content/syndication/feed'); $contents_feed_news = Feed::get_parsed("news", DEFAULT_FEED_NAME, 0, FALSE, 10, 2); $contents_feed_blog = Feed::get_parsed("blog", DEFAULT_FEED_NAME, $idcat = 1, FALSE, 10, 2); $contents_feed_wiki = Feed::get_parsed("wiki", DEFAULT_FEED_NAME, 0, FALSE, 10, 2); $contents_feed_download = Feed::get_parsed("download", DEFAULT_FEED_NAME, 0, FALSE, 10, 2); $contents_feed_forum = Feed::get_parsed("forum", DEFAULT_FEED_NAME, 0, FALSE, 10, 2); $contents_feed_articles = Feed::get_parsed("articles", DEFAULT_FEED_NAME, 0, FALSE, 10, 2); ## Contenu de la page, script de votre module ## ?> <br> <!--START module rss des news--> <div class="news_container"> <div class="msg_top_l"></div> <div class="msg_top_r"></div> <div class="msg_top"> <div style="float: left;"><a href="../news/rss.php" title="Rss news"><img class="valign_middle" src="../templates/<?php echo $CONFIG['theme']; ?>/images/rss.png" alt="Rss" title="Rss" align="left" border="0"></a> <br> <h3 class="title valign_middle"><span style="font-size: 12px;">Dernières News</span></h3></div> <div style="float: right;">.:. <a style="font-size: 10px; text-decoration: underline;" href="../news/news.php" title="news">Actualités</a> .:.</div> </div> <div class="news_content"> <?php echo "$contents_feed_news";?> <br> <div style="text-align: right; margin-right:10px"><a href="../news/news.php" class="small_link">Plus de news...</a></div> </div> </div> <!--END module rss des news--> <br> <!--START module rss du Wiki--> <div class="news_container"> <div class="msg_top_l"></div> <div class="msg_top_r"></div> <div class="msg_top"> <div style="float: left;"><a href="../wiki/rss.php" title="Rss wiki"><img class="valign_middle" src="../templates/<?php echo $CONFIG['theme']; ?>/images/rss.png" alt="Rss" title="Rss" align="left" border="0"></a> <br> <h3 class="title valign_middle"><span style="font-size: 12px;">Dernières Documentations</span></h3></div> <div style="float: right;">.:. <a style="font-size: 10px; text-decoration: underline;" href="../wiki/wiki.php" title="wiki">Documentations</a> .:.</div> </div> <div class="news_content"> <?php echo "$contents_feed_wiki";?> <br> <div style="text-align: right; margin-right:10px"><a href="../wiki/wiki.php" class="small_link">Plus de documentations...</a></div> </div> </div> <!--END module rss du Wiki--> <br> <!--START module rss du Telechargements--> <div class="news_container"> <div class="msg_top_l"></div> <div class="msg_top_r"></div> <div class="msg_top"> <div style="float: left;"><a href="../download/rss.php" title="Rss téléchargement"><img class="valign_middle" src="../templates/<?php echo $CONFIG['theme']; ?>/images/rss.png" alt="Rss" title="Rss" align="left" border="0"></a> <br> <h3 class="title valign_middle"><span style="font-size: 12px;">Dernières Ressources</span></h3></div> <div style="float: right;">.:. <a style="font-size: 10px; text-decoration: underline;" href="../download/download.php" title="wiki">Téléchargements</a> .:.</div> </div> <div class="news_content"> <?php echo "$contents_feed_download"; ?> <br> <div style="text-align: right; margin-right:10px"><a href="../download/download.php" class="small_link">Plus de ressources...</a></div> </div> </div> <!--END module rss du Telechargements--> <br> <!--START module rss du Forum--> <div class="news_container"> <div class="msg_top_l"></div> <div class="msg_top_r"></div> <div class="msg_top"> <div style="float: left;"><a href="../forum/rss.php" title="Rss forum"><img class="valign_middle" src="../templates/<?php echo $CONFIG['theme']; ?>/images/rss.png" alt="Rss" title="Rss" align="left" border="0"></a> <br> <h3 class="title valign_middle"><span style="font-size: 12px;">Derniers sujets du forum</span></h3></div> <div style="float: right;">.:. <a style="font-size: 10px; text-decoration: underline;" href="../forum/index.php">Forum Support</a> .:.</div> </div> <div class="news_content"> <?php echo "$contents_feed_forum";?> <br> <div style="text-align: right; margin-right:10px"><a href="../forum/index.php" class="small_link">Plus de sujets...</a></div> </div> </div> <!--END module rss du Forum --> <?php //Footer include_once('../kernel/footer.php'); ?>
Un clavier azerty en vaut deux!
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 //Licence /*################################################## * page.php * ------------------- * begin : Date de création du fichier * copyright : (C) 2007 Nom du/des développeur(s) * email : email du/des développeur(s) * * ################################################### * * 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. * ###################################################*/ //Chargement des fonctions define('PATH_TO_ROOT', '.'); include_once('./kernel/begin.php'); define('ALTERNATIVE_CSS', 'news'); //Titre de la page define('TITLE', 'Bienvenue sur le Site Support du Réseau Pédagogique'); require_once('./kernel/header.php'); import('content/syndication/feed'); global $LANG; // mise en variabble des flux rss voir à elevé les modules que tu ne désires pas. import('content/syndication/feed'); $contents_feed_news = Feed::get_parsed('news', DEFAULT_FEED_NAME, 0, array(), 10); $contents_feed_blog = Feed::get_parsed("blog", DEFAULT_FEED_NAME, $idcat = 1, FALSE, 10, 2); $contents_feed_wiki = Feed::get_parsed("wiki", DEFAULT_FEED_NAME, 0, FALSE, 10, 2); $contents_feed_download = Feed::get_parsed("download", DEFAULT_FEED_NAME, 0, FALSE, 10, 2); $contents_feed_forum = Feed::get_parsed("forum", DEFAULT_FEED_NAME, 0, FALSE, 10, 2); $contents_feed_articles = Feed::get_parsed("articles", DEFAULT_FEED_NAME, 0, FALSE, 10, 2); ## Contenu de la page, script de votre module ## ?> <br> <!--START module rss des news--> <div class="news_container"> <div class="msg_top_l"></div> <div class="msg_top_r"></div> <div class="msg_top"> <div style="float: left;"><a href="../news/rss.php" title="Rss news"><img class="valign_middle" src="../templates/<?php echo $CONFIG['theme']; ?>/images/rss.png" alt="Rss" title="Rss" align="left" border="0"></a> <br> <h3 class="title valign_middle"><span style="font-size: 12px;">Dernières News</span></h3></div> <div style="float: right;">.:. <a style="font-size: 10px; text-decoration: underline;" href="../news/news.php" title="news">Actualités</a> .:.</div> </div> <div class="news_content"> <?php echo "$contents_feed_news";?> <br> <div style="text-align: right; margin-right:10px"><a href="../news/news.php" class="small_link">Plus de news...</a></div> </div> </div> <!--END module rss des news--> <br> <!--START module rss du Wiki--> <div class="news_container"> <div class="msg_top_l"></div> <div class="msg_top_r"></div> <div class="msg_top"> <div style="float: left;"><a href="../wiki/rss.php" title="Rss wiki"><img class="valign_middle" src="../templates/<?php echo $CONFIG['theme']; ?>/images/rss.png" alt="Rss" title="Rss" align="left" border="0"></a> <br> <h3 class="title valign_middle"><span style="font-size: 12px;">Dernières Documentations</span></h3></div> <div style="float: right;">.:. <a style="font-size: 10px; text-decoration: underline;" href="../wiki/wiki.php" title="wiki">Documentations</a>.:.</div> </div> <div class="news_content"> <?php echo "$contents_feed_wiki";?> <br> <div style="text-align: right; margin-right:10px"><a href="../wiki/wiki.php" class="small_link">Plus de documentations...</a></div> </div> </div> <!--END module rss du Wiki--> <br> <!--START module rss du Telechargements--> <div class="news_container"> <div class="msg_top_l"></div> <div class="msg_top_r"></div> <div class="msg_top"> <div style="float: left;"><a href="../download/rss.php" title="Rss téléchargement"><img class="valign_middle" src="../templates/<?php echo $CONFIG['theme']; ?>/images/rss.png" alt="Rss" title="Rss" align="left" border="0"></a> <br> <h3 class="title valign_middle"><span style="font-size: 12px;">Dernières Ressources</span></h3></div> <div style="float: right;">.:. <a style="font-size: 10px; text-decoration: underline;" href="../download/download.php" title="wiki">Téléchargements</a> .:.</div> </div> <div class="news_content"> <?php echo "$contents_feed_download"; ?> <br> <div style="text-align: right; margin-right:10px"><a href="../download/download.php" class="small_link">Plus de ressources...</a></div> </div> </div> <!--END module rss du Telechargements--> <br> <!--START module rss du Forum--> <div class="news_container"> <div class="msg_top_l"></div> <div class="msg_top_r"></div> <div class="msg_top"> <div style="float: left;"><a href="../forum/rss.php" title="Rss forum"><img class="valign_middle" src="../templates/<?php echo $CONFIG['theme']; ?>/images/rss.png" alt="Rss" title="Rss" align="left" border="0"></a> <br> <h3 class="title valign_middle"><span style="font-size: 12px;">Derniers sujets du forum</span></h3></div> <div style="float: right;">.:. <a style="font-size: 10px; text-decoration: underline;" href="../forum/index.php">Forum Support</a> .:.</div> </div> <div class="news_content"> <?php echo "$contents_feed_forum";?> <br> <div style="text-align: right; margin-right:10px"><a href="../forum/index.php" class="small_link">Plus de sujets...</a></div> </div> </div> <!--END module rss du Forum --> <?php //Footer include_once('./kernel/footer.php'); ?>
Édité par ReidLos Le 13/09/2009 à 19h50
MisterT Membre non connecté
Booster Bazooka
-
Booster Bazooka
- Voir le profil du membre MisterT
- Inscrit le : 03/01/2008
1. ça ne marche pas avec
Code PHP :
define('PATH_TO_ROOT', '.');
il faut donc supprimer cette ligne et mettre
Code PHP :
../kernel/
au lieu de
Code PHP :
./kernel/
2. ça marche avec
Code PHP :
//Inclusion du header include_once('../kernel/header.php');
et
Code PHP :
//Inclusion du header require_once('./kernel/header.php');
voilà le dernier code modifié (merci ReidLos)
Code PHP :
<?php //Licence /*################################################## * page.php * ------------------- * begin : Date de création du fichier * copyright : (C) 2007 Nom du/des développeur(s) * email : email du/des développeur(s) * * ################################################### * * 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. * ###################################################*/ //Chargement des fonctions //Début du chargement de l'environnement //define('PATH_TO_ROOT', '.'); include_once('../kernel/begin.php'); //Chargement d'un fichier css, ici le fichier css du module news define('ALTERNATIVE_CSS', 'news'); //Titre de la page, remplacer Accueil pour personnaliser et éviter Accueil > Acueil define('TITLE', 'Bienvenue sur le Site Support du Réseau Pédagogique de LHF'); //Chargement des fichiers de langue global $LANG; //Inclusion du header include_once('../kernel/header.php'); //Import du feed import('content/syndication/feed'); // Mise en variabble des flux rss voir à enlever les modules non souhaités import('content/syndication/feed'); $contents_feed_news = Feed::get_parsed('news', DEFAULT_FEED_NAME, 0, array(), 10); $contents_feed_blog = Feed::get_parsed('blog', DEFAULT_FEED_NAME, 0, array(), 10); $contents_feed_wiki = Feed::get_parsed('wiki', DEFAULT_FEED_NAME, 0, array(), 10); $contents_feed_download = Feed::get_parsed('download', DEFAULT_FEED_NAME, 0, array(), 10); $contents_feed_forum = Feed::get_parsed('forum', DEFAULT_FEED_NAME, 0, array(), 10); $contents_feed_articles = Feed::get_parsed('articles', DEFAULT_FEED_NAME, 0, array(), 10); ## Contenu de la page, script de votre module ## ?> <br> <!--START module rss des news--> <div class="news_container"> <div class="msg_top_l"></div> <div class="msg_top_r"></div> <div class="msg_top"> <div style="float: left;"><a href="../news/rss.php" title="Rss news"><img class="valign_middle" src="../templates/<?php echo $CONFIG['theme']; ?>/images/rss.png" alt="Rss" title="Rss" align="left" border="0"></a> <br> <h3 class="title valign_middle"><span style="font-size: 12px;">Dernières News</span></h3></div> <div style="float: right;">.:. <a style="font-size: 10px; text-decoration: underline;" href="../news/news.php" title="News">Actualités</a> .:.</div> </div> <div class="news_content"> <?php echo "$contents_feed_news";?> <br> <div style="text-align: right; margin-right:10px"><a href="../news/news.php" class="small_link">Plus de news...</a></div> </div> </div> <!--END module rss des news--> <br> <!--START module rss du Wiki--> <div class="news_container"> <div class="msg_top_l"></div> <div class="msg_top_r"></div> <div class="msg_top"> <div style="float: left;"><a href="../wiki/rss.php" title="Rss wiki"><img class="valign_middle" src="../templates/<?php echo $CONFIG['theme']; ?>/images/rss.png" alt="Rss" title="Rss" align="left" border="0"></a> <br> <h3 class="title valign_middle"><span style="font-size: 12px;">Dernières Documentations</span></h3></div> <div style="float: right;">.:. <a style="font-size: 10px; text-decoration: underline;" href="../wiki/wiki.php" title="Wiki">Documentations</a> .:.</div> </div> <div class="news_content"> <?php echo "$contents_feed_wiki";?> <br> <div style="text-align: right; margin-right:10px"><a href="../wiki/wiki.php" class="small_link">Plus de documentations...</a></div> </div> </div> <!--END module rss du Wiki--> <br> <!--START module rss des Articles--> <div class="news_container"> <div class="msg_top_l"></div> <div class="msg_top_r"></div> <div class="msg_top"> <div style="float: left;"><a href="../articles/rss.php" title="Rss articles"><img class="valign_middle" src="../templates/<?php echo $CONFIG['theme']; ?>/images/rss.png" alt="Rss" title="Rss" align="left" border="0"></a> <br> <h3 class="title valign_middle"><span style="font-size: 12px;">Derniers Articles</span></h3></div> <div style="float: right;">.:. <a style="font-size: 10px; text-decoration: underline;" href="../articles/articles.php" title="Articles">Articles</a> .:.</div> </div> <div class="news_content"> <?php echo "$contents_feed_articles";?> <br> <div style="text-align: right; margin-right:10px"><a href="../articles/articles.php" class="small_link">Plus d'articles...</a></div> </div> </div> <!--END module rss du Articles--> <br> <!--START module rss du Telechargements--> <div class="news_container"> <div class="msg_top_l"></div> <div class="msg_top_r"></div> <div class="msg_top"> <div style="float: left;"><a href="../download/rss.php" title="Rss téléchargement"><img class="valign_middle" src="../templates/<?php echo $CONFIG['theme']; ?>/images/rss.png" alt="Rss" title="Rss" align="left" border="0"></a> <br> <h3 class="title valign_middle"><span style="font-size: 12px;">Dernières Ressources</span></h3></div> <div style="float: right;">.:. <a style="font-size: 10px; text-decoration: underline;" href="../download/download.php" title="Téléchargements">Téléchargements</a> .:.</div> </div> <div class="news_content"> <?php echo "$contents_feed_download"; ?> <br> <div style="text-align: right; margin-right:10px"><a href="../download/download.php" class="small_link">Plus de ressources...</a></div> </div> </div> <!--END module rss du Telechargements--> <br> <!--START module rss du Forum--> <div class="news_container"> <div class="msg_top_l"></div> <div class="msg_top_r"></div> <div class="msg_top"> <div style="float: left;"><a href="../forum/rss.php" title="Rss forum"><img class="valign_middle" src="../templates/<?php echo $CONFIG['theme']; ?>/images/rss.png" alt="Rss" title="Rss" align="left" border="0"></a> <br> <h3 class="title valign_middle"><span style="font-size: 12px;">Derniers sujets du forum</span></h3></div> <div style="float: right;">.:. <a style="font-size: 10px; text-decoration: underline;" href="../forum/index.php" title="Forum">Forum Support</a> .:.</div> </div> <div class="news_content"> <?php echo "$contents_feed_forum";?> <br> <div style="text-align: right; margin-right:10px"><a href="../forum/index.php" class="small_link">Plus de sujets...</a></div> </div> </div> <!--END module rss du Forum --> <?php //Footer include_once('../kernel/footer.php'); ?>
le résultat

il reste à trouver comment enlever les 2 rectangles vers "Dernières Ressources" et "Derniers Articles" qui correspondent à des images
Merci beaucoup ReidLos (The big Soldier)
Un clavier azerty en vaut deux!
ReidLos Membre non connecté
-
Modérateur
- Voir le profil du membre ReidLos
- Inscrit le : 27/02/2009
- Site internet
- Groupes :
-
Equipe Développement
Dans tes feed.tpl de ton thème (tonthème/modules/tonmodule/framework etc etc )
Tu enlève :
Code TPL :
# START item # <!-- ITEM --> <div style="margin-bottom:2px;padding:2px;"> <div style="float:left;width:75px;height:57px;text-align:center;border:1px solid #8883B9;"> # IF item.C_IMG # <img src="{item.U_IMG}" alt="" style="border:1px solid #FFFFFF" /> # ENDIF # </div> <div style="float:left;width:250px;padding-left:6px;"> <a href="{item.U_LINK}">{item.TITLE}</a> <p class="text_small">{L_ON} {item.DATE} - <a href="{item.U_LINK}" class="small_link">{L_READ}</a></p> </div> <div class="spacer"></div> </div> <!-- END ITEM --> # END item #
ça :
Code TPL :
et : border:1px solid #8883B9;
Code TPL :
style="border:1px solid #FFFFFF"
Visiteur
Boosteur Inactif
Sujet réglé
Répondre
Vous n'êtes pas autorisé à écrire dans cette catégorie