| |
| |
|
|
|
|
| |
|
| |
|
| :: |
| Auteur |
Message |
franckcara PR1


Inscrit le: 23 Fév 2007 Messages: 177
|
Posté le: Dim Fév 25, 2007 11:06 am Sujet du message: Dernier message du forum en page d'accueil [resolu] |
|
|
Bonjour je reviens vers vous pour un probleme que j'ai avec un script que j'ai trouvé en parcourant vos page.
J'essaie donc de mettre les derniers message du forum sur ma page d'accueil.
Voici le code
| Code: |
<?php
// Last XX Active Topics outside phpBB - dcz - www.phpBB-SEO.com
// License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
//
// Basic Configuration
// How Many Topics you want to display?
$topicnumber = 30;
// Scrolling towards up or down?
$scroll = "up";
// Change this to your phpBB URL
$urlPath = "http://www.pcparadise.fr/Forum-informatique";
// Change this to your phpBB path
$phpbb_root_path = 'Forum-informatique/';
// Exclude forums, forum id in this array will not be listed
$exclude_forum = array (
//1 => 31,
//2 => 5,
//3 => 10,
);
define('IN_PHPBB', true);
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
// Start session management
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
// End session management
// Let's do it now
if ( !($total_topics = count($last_topic_data)) )
{
$message = 'Something you want to say here FPRIVATE "TYPE=PICT;ALT=Wink" ';
message_die(GENERAL_MESSAGE, $message);
}
//
// Find which forums are visible for this user
//
$is_auth_ary = array();
$is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $last_topic_data);
// here I keep the basic html output
// Outcome of the HTML
// Be carefull when you edit these!
echo "<marquee dir=\"rtl\" align=\"center\" id=\"recent_topics\" behavior=\"scroll\" direction=\"$scroll\" height=\"150\" width=\"100%\" scrolldelay=\"100\" scrollamount=\"2\" onMouseOver=\"stop()\" onMouseOut=\"start()\">";
echo "<div align=\"center\">";
echo "<table cellpadding='3' cellSpacing='2'";
for ($i = 0; $i < $total_topics; $i++ )
{
if ($is_auth_ary[$last_topic_data[$i]['forum_id']]['auth_view'] && !in_array($last_topic_data[$i]['forum_id'], $exclude_forum))
{
// phpBB-SEO.com SEO TOOLKIT BEGIN
$seo_forum_name = $last_topic_data[$i]['forum_name'];
$seo_topic_name = $last_topic_data[$i]['topic_title'];
// phpBB-SEO.com SEO TOOLKIT END
echo "<tr valign='top'>
<td><span class=\"nav\">".$lang['Last_Post']." :
<a href=\"".append_sid("$urlPath/viewtopic.php?t=".$last_topic_data[$i]['topic_id'])."\" class=\"nav\">" . $last_topic_data[$i]['topic_title'] ."</span></a></td>
<td><span class=\"nav\"> ".$lang['Forum']." :
<a href=\"".append_sid("$urlPath/viewforum.php?f=".$last_topic_data[$i]['forum_id'])."\" class=\"nav\">" . $last_topic_data[$i]["forum_name"] . "</a></span></td>
<td><span class=\"nav\"> ".$lang['Views']." : " . $row['topic_views'] . "</span></td>
<td><span class=\"nav\"> ".$lang['Replies']." : " . $last_topic_data[$i]['topic_replies'] . "</span></a></td>
<td><span class=\"nav\"> ".$lang['Poster']." :
<a href=\"".append_sid("$urlPath/profile.php?mode=viewprofile&u=".$last_topic_data[$i]['user_id'])."\" class=\"nav\" >" . $last_topic_data[$i]['username'] . "</a></td></tr>";
}
}
echo "</table></div></marquee>";
?> |
et voici le message d'erreur
| Code: | | Fatal error: Cannot redeclare class template in /home/www/pcparadise/www/Forum-informatique/includes/template.php on line 30 |
à savoir que j'ai deja un mod en page d'accueil qui met les derniers message d'une seule categorie du forum.
Page d'accueil en travaux
http://www.pcparadise.fr/
EDIT/ j'ai resolu le probleme,je vais ùettre topic anywhere |
|
|
| Revenir en haut de page |
|
 |
|
 |
|
| Navigation |
Autres sujets de discussion |
|
|
|
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |