Arf PR1

Inscrit le: 19 Jan 2007 Messages: 182
|
Posté le: Lun Fév 05, 2007 5:45 pm Sujet du message: [Réglé] MOD des derniers sujets comme sur la home |
|
|
Bonsoir tout le monde,
J'ai un petit soucis avec le mod des derniers sujets qui est celui de la home de phpbb seo je suppose ^^
J'ai mis à jour mon forum pour passer de la version 0.0.2 à la version 0.2.0 mixed mod et depuis le mod des derniers sujets ne fonctionne plus.
Il me donne des mauvais liens exemple :
Au lieu d'avoir -www.exemple.com/forum/topic1834.html je me retrouve avec -www.exemple.com/topic1834.html sans le forum alors que je n'ai pas du tout touché à la variable de ce mod et donc erreur 404 ;/
Ensuite il me donne ça -http://www.kinthia.com/viewforum.php?f=4 et ça me fairt une erreur 404 snif ;/
Merci d'avance pour votre aide
Mon 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 = 15;
// Scrolling towards up or down?
//$scroll = "up";
// Change this to your phpBB URL
$urlPath = "http://www.kinthia.com/forum";
// Change this to your phpBB path
$phpbb_root_path = 'forum/';
// 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
$sql = "SELECT t.topic_poster,t.topic_views,t.topic_replies,t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username ,f.forum_name
FROM ".TOPICS_TABLE." t, ".FORUMS_TABLE." f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
WHERE t.topic_id = p.topic_id
AND f.forum_id = t.forum_id
AND t.topic_status <> 2
AND p.post_id = t.topic_last_post_id
AND p.poster_id = u.user_id
ORDER BY p.post_id DESC LIMIT $topicnumber";
//Begin sql cache
if ( !($result = $db->sql_query($sql)) )
//if ( !($result = $db->sql_query($sql, false, 'posts_')) )
//End sql cache
{
message_die(GENERAL_ERROR, 'Could not obtain Last topics info', '', __LINE__, __FILE__, $sql);
}
$last_topic_data = array();
while( $row = $db->sql_fetchrow($result) )
{
$last_topic_data[] = $row;
}
$db->sql_freeresult($result);
unset($row);
// Handle the not topics case, if you want
if ( !($total_topics = count($last_topic_data)) )
{
$message = 'Something you want to say here ';
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\" height=\"150\" width=\"100%\">";
echo "<div class=\"forum-index\">";
//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 "<div class='forum-index1'>
<p>".$lang['Last_Post']." <img src='http://www.kinthia.com/img/fleche.gif' alt='' />
<a href=\"".append_sid("$urlPath/viewtopic.php?t=".$last_topic_data[$i]['topic_id'])."\" class=\"lienorangeb\">" . $last_topic_data[$i]['topic_title'] ."</a></p></div><br />
<div class='forum-index2'><p> ".$lang['Forum']."
<a href=\"".append_sid("$urlPath/viewforum.php?f=".$last_topic_data[$i]['forum_id'])."\" class=\"lienorangebn\">" . $last_topic_data[$i]["forum_name"] . "</a></p></div><br />";
}
}
echo "</div>";
?> |
|
_________________ Mes créations : voyance gratuite | tout gratuit | script php arfooo annuaire
Dernière édition par Arf le Lun Fév 05, 2007 9:47 pm; édité 1 fois |
|