define('IN_SITE', true);
define('IN_PHPBB', true);
$phpbb_root_path = './forum/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
code obsolète, voir les scripts plus bas.
Fatal error: Call to undefined function censor_text() in /home/web/ateliermagique.com/ftp/www/test2.php on line 159
include('./forum/common.php');
include('./forum/includes/functions_posting.php');
<ul>
<?php
define('IN_SITE', true);
define('IN_PHPBB', true);
$phpbb_root_path = './forum/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Sélection des 10 derniers posts
$sql = "SELECT topic_replies_real,topic_replies,topic_title,forum_id,topic_id,topic_type,topic_last_post_id
FROM phpbb3_topics
WHERE topic_approved = 1
ORDER BY topic_last_post_time DESC
LIMIT 10";
$result = $db->sql_query($sql);
// Boucle d'affichage du post
while($topic_data = $db->sql_fetchrow($result))
{
// Données du topic
$topic_title = $topic_data['topic_title'];
$topic_replies = $topic_data['topic_replies'];
$topic_replies_real = $topic_data['topic_replies_real'];
$forum_id = $topic_data['forum_id'];
$topic_id = $topic_data['topic_id'];
$topic_last_post_id = $topic_data['topic_last_post_id'];
$replies = ($auth->acl_get('m_approve', $forum_id)) ? $topic_replies_real : $topic_replies;
$start = floor(($replies) / $config['posts_per_page']) * $config['posts_per_page'];
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$topic_data['topic_title'] = censor_text($topic_data['topic_title']);
if (empty($phpbb_seo->seo_opt['virtual_folder']) || !empty($phpbb_seo->seo_url['forum'][$forum_id]) || $topic_data['topic_type'] == POST_GLOBAL) {
$phpbb_seo->prepare_iurl($topic_data, 'topic', $topic_data['topic_type'] == POST_GLOBAL ? $phpbb_seo->seo_static['global_announce'] : $phpbb_seo->seo_url['forum'][$forum_id]);
}
// www.phpBB-SEO.com SEO TOOLKIT END
$post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $topic_id . '&f=' . $forum_id . '&start=' . $start ) . '#p' . $topic_last_post_id;
//On affiche
echo '<li><a href="'.$post_url.'">'.$topic_title.'</a></li>';
}
$db->sql_freeresult($result);
?>
</ul>
<ul>
<?php
define('IN_SITE', true);
define('IN_PHPBB', true);
$phpbb_root_path = './forum/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Sélection des 10 derniers posts
$sql = "SELECT t.topic_replies_real,t.topic_replies,t.topic_title,t.forum_id,t.topic_id,t.topic_type,t.topic_last_post_id,f.forum_name,t.topic_last_poster_name
FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f
WHERE t.topic_approved = 1
AND t.topic_status <> 2
AND t.forum_id = f.forum_id
ORDER BY t.topic_last_post_time DESC
LIMIT 10";
$result = $db->sql_query($sql);
// Boucle d'affichage du post
while($topic_data = $db->sql_fetchrow($result))
{
// Données du topic
$topic_title = $topic_data['topic_title'];
$topic_replies = $topic_data['topic_replies'];
$topic_replies_real = $topic_data['topic_replies_real'];
$forum_id = $topic_data['forum_id'];
$topic_id = $topic_data['topic_id'];
$forum_name = $topic_data['forum_name'];
$topic_last_post_id = $topic_data['topic_last_post_id'];
$topic_last_poster_name = $topic_data['topic_last_poster_name'];
$replies = ($auth->acl_get('m_approve', $forum_id)) ? $topic_replies_real : $topic_replies;
$start = floor(($replies) / $config['posts_per_page']) * $config['posts_per_page'];
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$topic_data['topic_title'] = censor_text($topic_data['topic_title']);
if (empty($phpbb_seo->seo_opt['virtual_folder']) || !empty($phpbb_seo->seo_url['forum'][$forum_id]) || $topic_data['topic_type'] == POST_GLOBAL) {
$phpbb_seo->prepare_iurl($topic_data, 'topic', $topic_data['topic_type'] == POST_GLOBAL ? $phpbb_seo->seo_static['global_announce'] : $phpbb_seo->seo_url['forum'][$forum_id]);
}
// www.phpBB-SEO.com SEO TOOLKIT END
$post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $topic_id . '&f=' . $forum_id . '&start=' . $start ) . '#p' . $topic_last_post_id;
$topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $topic_id . '&f=' . $forum_id );
//On affiche
echo '<li><a href="'.$topic_url.'">'.$topic_title.'</a> - '.$forum_name.' - <a rel="nofollow" href="'.$post_url.'">Dernier message par '.$topic_last_poster_name.'</a></li>';
}
$db->sql_freeresult($result);
?>
</ul>
echo '<li><a href="'.$topic_url.'">'.utf8_decode($topic_title).'</a> - '.utf8_decode($forum_name).' - <a rel="nofollow" href="'.$post_url.'">Dernier message par '.utf8_decode($topic_last_poster_name).'</a></li>';
Pas de soucis, il est fait pour ça. A bientôt, n'hésite pas si t'as un souci
Utilisateurs parcourant ce forum : Aucun utilisateur enregistré et 0 invités
Copyright TutoMaker.com © Rentabiliser son site
Toute reproduction totale ou partielle du site est interdite sans l'accord de l'auteur, surtout que ça se voit vite ;)