Revoici mes codes après rectification :
PHP :
- Code: Tout sélectionner
<?php
/**
*
* @package phpBB3
* @version $Id: template.php Raimon $
* @copyright (c) 2008 Raimon ( http://www.phpBBservice.nl )
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
*/
/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('mods/template');
// Output page
page_header($user->lang['TEMPLATE']);
$template->set_filenames(array(
'body' => 'template_bodysite2142.html')
);
$forum_id = 105;
$where = ($forum_id) ? "WHERE forum_id=$forum_id" : '';
$sql = 'SELECT forum_id,topic_id, topic_time, topic_title, topic_views, topic_replies, topic_poster, topic_first_poster_name, topic_first_poster_colour, topic_last_post_id, topic_last_poster_id, topic_last_poster_name, topic_last_poster_colour, topic_last_post_time
FROM ' . TOPICS_TABLE . '
ORDER BY topic_time DESC ' .
$where .
' LIMIT 0 , 10 ';
$result = $db->sql_query($sql);
$template->assign_vars(array(
'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
));
while($row = $db->sql_fetchrow($result))
{
$topic_id = $row['topic_id'];
$view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . '&t=' . $topic_id);
$template->assign_block_vars('topicrow', array(
'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
'LAST_POST_AUTHOR' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
'REPLIES' => $row['topic_replies'],
'TOPIC_AUTHOR' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'TOPIC_TITLE' => censor_text($row['topic_title']),
'U_LAST_POST' => $view_topic_url . '&p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'],
'U_VIEW_TOPIC' => $view_topic_url,
'VIEWS' => $row['topic_views'],
));
}
page_footer();
?>
HTML :
- Code: Tout sélectionner
<!-- INCLUDE overall_header.html -->
<head>
</head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<p align="center">
<br>
<img src=http://www.mtlive.eu/images/bvsite2142.png>
<br>
<br>
<br>
<img name="menusite" src="http://www.mtlive.eu/images/menusite.png" width="900" height="400" border="0" id="menusite" usemap="#m_menusite" alt="" /><map name="m_menusite" id="m_menusite">
<area shape="rect" coords="428, 340, 483, 359" href="http://www.mtlive.eu/donation" target="_blank" alt="" />
<area shape="rect" coords="331, 341, 418, 359" href="http://www.mtlive.eu/forum/viewforum.php?f=100" alt="" />
<area shape="rect" coords="688, 237, 769, 255" href="http://www.mtlive.eu/forum/template.php" alt="" />
<area shape="rect" coords="392, 237, 534, 256" href="http://www.mtlive.eu/forum/template2.php" alt="" />
<area shape="rect" coords="544, 238, 621, 255" href="http://www.mtlive.eu/forum/template4.php" alt="" >
<area shape="rect" coords="634, 237, 677, 254" href="http://www.mtlive.eu/forum/viewtopic.php?f=106&t=216" alt="" >
<area shape="rect" coords="63, 241, 122, 258" href="http://www.mtlive.eu/forum/viewtopic.php?f=100&t=223" alt="" />
<area shape="rect" coords="136,244,260,256" href="http://www.mtlive.eu/forum/viewtopic.php?f=100&t=303" alt="" />
<area shape="rect" coords="18, 241, 53, 257" href="http://www.mtlive.eu/forum/viewtopic.php?f=100&t=190" alt="" />
<area shape="rect" coords="221, 341, 320, 358" href="http://www.mtlive.eu/forum/ucp.php?i=167" alt="" />
<area shape="rect" coords="283, 151, 404, 168" href="http://www.mtlive.eu/forum/ucp.php?i=167" alt="" />
<area shape="rect" coords="237, 150, 273, 167" href="http://www.mtlive.eu/forum/viewtopic.php?f=100&t=185" alt="" />
<area shape="rect" coords="715, 79, 884, 96" href="http://www.mtlive.eu/forum/viewforum.php?f=99" alt="" />
<area shape="rect" coords="415, 151, 656, 167" href="http://www.mtlive.eu/forum/viewforum.php?f=112" alt="" />
<area shape="rect" coords="545, 79, 704, 96" href="http://www.mtlive.eu/forum/viewforum.php?f=112" alt="" />
<area shape="rect" coords="497, 80, 537, 95" href="http://www.mtlive.eu/forum/viewtopic.php?f=100&t=184" alt="" />
<area shape="rect" coords="120, 59, 202, 75" href="ucp.php?mode=login" alt="" />
<area shape="rect" coords="24, 62, 108, 75" href="ucp.php?mode=register" target="Aucun" alt="" />
</map>
<a href="http://www.mtlive.eu/forum/index.php">
<img src=http://www.mtlive.eu/images/accesforummtlive.png border="0"></a>
<body>
<table width="100%">
<tr>
<th >{L_TOPICS}</th>
<th>{L_REPLIES}</th>
<th>{L_VIEWS}</th>
<th>{L_LAST_POST}</th>
</tr>
<!-- BEGIN topicrow -->
<tr bgcolor="<!-- IF topicrow.S_ROW_COUNT is even -->#FFFFCC<!-- ELSE -->#99FFFF<!-- ENDIF -->">
<td>
<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a><br />
{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR} {L_POSTED_ON_DATE} {topicrow.FIRST_POST_TIME}
</td>
<td>{topicrow.REPLIES}</td>
<td>{topicrow.VIEWS}</td>
<td>
{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR}
<a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a> <br />{L_POSTED_ON_DATE} {topicrow.LAST_POST_TIME}
</td>
</tr>
<!-- END topicrow -->
</table>
</body>
</html>
</p><!-- INCLUDE overall_footer.html -->
Après avoir uper les 2 fichiers voici l'erreur :
Erreur générale
SQL ERROR [ mysql4 ]
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE forum_id=105 LIMIT 0 , 10' at line 3 [1064]
SQL
SELECT forum_id,topic_id, topic_time, topic_title, topic_views, topic_replies, topic_poster, topic_first_poster_name, topic_first_poster_colour, topic_last_post_id, topic_last_poster_id, topic_last_poster_name, topic_last_poster_colour, topic_last_post_time FROM phpbb_topics ORDER BY topic_time DESC WHERE forum_id=105 LIMIT 0 , 10
BACKTRACE
FILE: includes/db/mysql.php
LINE: 158
CALL: dbal_mysql->sql_error()
FILE: templatesite2142.php
LINE: 42
CALL: dbal_mysql->sql_query()
visible ici : http://www.mtlive.eu/forum/templatesite2142.php
... Je n'ai pas de chance décidément ^^
Cordialement






