Rewriting pour les derniers messages

WRInaute discret
Bonjour,

j'utilise ce script pour afficher les news sur ma page d'accueil à partir de mon forum phpbb:

Code:
<?php 
define('IN_PHPBB', true); 

if (!$userdata) 
{ 
$phpbb_root_path = "./"; 
// connect to phpbb 
include_once($phpbb_root_path . 'extension.inc'); 
include_once($phpbb_root_path . 'common.'.$phpEx); 

// Start session management 
// 
if(!$userdata) 
   { 
$userdata = session_pagestart($user_ip, PAGE_INDEX, $session_length); 
init_userprefs($userdata); 
   } 
} 


echo"<body bgcolor=white text=black><center>"; 
echo"<center><span class=mainmenu></center><table width=98% cellpadding=0 border=0 cellspacing=0 align=center><tr><td class=tableborder>"; 
echo"<table width=100% cellpadding=4 cellspacing=1 border=0 class=bodyline align=center>"; 


// 
//BEGINNING OF PAGE 
// 
$sql="SELECT " . FORUMS_TABLE . ".auth_read, " . FORUMS_TABLE . ".forum_id, " .FORUMS_TABLE . ".forum_name, " . TOPICS_TABLE . ".forum_id, " . TOPICS_TABLE . ".topic_views, " . TOPICS_TABLE . ".topic_replies, " . TOPICS_TABLE . ".topic_id AS topic_id, " . TOPICS_TABLE . " .topic_title AS topic_title, MAX(". POSTS_TABLE . ".post_time) AS post_time, " . USERS_TABLE . ".username, MAX(". POSTS_TABLE . ".post_id) AS post_id FROM " . TOPICS_TABLE . ", " . POSTS_TABLE . ", " . USERS_TABLE . ", " . FORUMS_TABLE . " WHERE " . TOPICS_TABLE . ".topic_id = " . POSTS_TABLE . ".topic_id and " . POSTS_TABLE . ".poster_id = " . USERS_TABLE . ".user_id AND " . TOPICS_TABLE . ".forum_id = " . FORUMS_TABLE . ".forum_id AND " . FORUMS_TABLE . ".forum_id = 20 AND " . FORUMS_TABLE . ".auth_read = 0 GROUP BY " . POSTS_TABLE . ".post_id ORDER BY post_time DESC LIMIT 6;"; 



$result = $db->sql_query($sql); 
while( $row = $db->sql_fetchrow($result) ) 
{ 
  echo "<tr align=center><td align=left class=row2><img src=http://informatruc.com/image/news.gif>&nbsp;<span class=genmed><b><font size=1 face=Verdana, Arial, Helvetica, sans-serif><a href=forum/viewtopic.php?p=" .$row['post_id']. "#" .$row['post_id']. ">" .$row['topic_title']. "</span> </b></a> - <span class=genmed> " .create_date("d M Y", $row['post_time'], -4) . "</span></font><center><hr width=200></center></td>"; 
} 



// 
//END OF PAGE 
// 

echo"</table></td></tr></table></center>"; 






 
if ($config_footer == YES) 

?>
J'aimerai savoir comment afficher les lien sour la forme ftopic au lieu de la forme viewtopic quelqu'un sait comment faire?

Merci.
 
WRInaute passionné
Et alors pourquoi tu ne modifie pas viewtopic en ftopic ?
Il faut le changer dans le code source de ta page et aussi dans celui du htaccess

Apres je peux me tromper je n'utilise pas PHPBB
 

➡️ Offre MyRankingMetrics ⬅️

pré-audit SEO gratuit avec RM Tech (+ avis d'expert)
coaching offert aux clients (avec Olivier Duffez ou Fabien Faceries)

Voir les détails ici

coaching SEO
Discussions similaires
Haut