Communauté Informatique NDFR.net : phpBB - Programmation Web (HTML, PHP, ASP, Java, XML, etc.)
 
phpBB
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 03-11-2002, 22:18
llaumgui's Avatar
llaumgui llaumgui is offline
XPerience-Fr
 
Join Date: 20-10-2002
Location: Montpellier
Age: 45
Posts: 456
Send a message via ICQ to llaumgui Send a message via AIM to llaumgui Send a message via MSN to llaumgui Send a message via Yahoo to llaumgui
Le truc c'est que j'ai chopé se code.

Quote:
<?php
/***************************************************************************
# Configuration #
****************************************************************************/
$nbr_sujets = 5; // Nombre de sujets à afficher
$url_phpbb = "/phpBB2"; // chemin vers le dossier PhpBB2 par rapport à la racine du site
$tz = 2; // Heure Locale = gmt + $tz (en France c gmt+1) +2 pour heure d' hiver
$format = 'd M Y H:i'; // Format de la date en php
$long_maxi = 35; // Longueurs maxi d'un titre de sujets (en caract.)

//-------------------------------------------------------------------------

require ("".$url_phpbb."/config.php");

$db = @mysql_connect("$dbhost", "$dbuser", "$dbpasswd") or die("mysql : erreur a la connexion");
@mysql_select_db("$dbname",$db) or die("mysql : probleme de selection de base");

$table1 = $table_prefix.'topics';
$table2 = $table_prefix.'forums';
$table3 = $table_prefix.'posts';
$sql = "SELECT t1.topic_last_post_id, t1.forum_id, t1.topic_title, t1.topic_id, t1.topic_time, t2.forum_id, t2.auth_view, t2.auth_read, t3.post_id, t3.post_time FROM $table1 t1, $table2 t2, $table3 t3 WHERE t2.auth_view = '0' AND t2.auth_read = '0' AND t1.forum_id = t2.forum_id AND t3.post_id=t1.topic_last_post_id ORDER BY t1.topic_last_post_id DESC LIMIT $nbr_sujets";

if($r = mysql_query($sql, $db)) {
while($m = mysql_fetch_array($r)) {
$m[topic_title] = stripslashes($m[topic_title]);
$m[topic_title] = substr($m[topic_title], 0, $long_maxi);
$post_date = @gmdate($format, $m[post_time] + (3600 * $tz));
echo "<a href=\"$url_phpbb/viewtopic.php?t=$m[topic_id]\"><b><font FACE=\"Verdana\" color=\"#6699FF\" size=\"1\">$m[topic_title]</font></b></a>";
echo "<font FACE=\"Verdana\" color=\"#555555\" size=\"1\"> - $post_date</font><br />";
}
}
?>
Le problème c'est que ca marche nickel sur le site du forum mais pas sur mon site (qui n'est pas le même)
__________________
| | |
Reply With Quote
 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Systeme de news avec le phpbb Jackydown Programmation Web (HTML, PHP, ASP, Java, XML, etc.) 42 22-06-2006 20:09
Nouvelles versions de phpBB, PHP-Nuke & PHP nonoleptitmalin Actualité 5 16-04-2004 12:48
Mise a jour de phpBB nonoleptitmalin Discussions 7 20-02-2003 08:16
Vulnérablité phpbb enzo19 Programmation Web (HTML, PHP, ASP, Java, XML, etc.) 12 04-01-2003 08:01
Un concurant à phpbb???!!! llaumgui Programmation Web (HTML, PHP, ASP, Java, XML, etc.) 12 28-11-2002 20:13

All times are GMT +2. The time now is 00:12.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.