Rewriting pour les derniers messages
4 messages
• Page 1 sur 1
Consultez la formation URL Rewriting et sites dynamiques de WebRankInfo / Ranking Metrics
-

informatruc - WRInaute discret

- Messages: 224
- Inscription: 16 Jan 2004
Rewriting pour les derniers messages
Bonjour,
j'utilise ce script pour afficher les news sur ma page d'accueil à partir de mon forum phpbb:
J'aimerai savoir comment afficher les lien sour la forme ftopic au lieu de la forme viewtopic quelqu'un sait comment faire?
Merci.
j'utilise ce script pour afficher les news sur ma page d'accueil à partir de mon forum phpbb:
- Code: Tout sélectionner
<?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> <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.
-

Borower - WRInaute passionné

- Messages: 2151
- Inscription: 18 Avr 2005
Utilise le htaccess
Voici sinon un post sur l URL rewrit et PHPBB
http://www.webrankinfo.com/forums/viewtopic_31831.htm
- Code: Tout sélectionner
Options FollowSymLinks
RewriteEngine on
RewriteRule ^ftopic.php$ viewtopic.php [L]
Voici sinon un post sur l URL rewrit et PHPBB
http://www.webrankinfo.com/forums/viewtopic_31831.htm
-

informatruc - WRInaute discret

- Messages: 224
- Inscription: 16 Jan 2004
Borower a écrit:Utilise le htaccess
- Code: Tout sélectionner
Options FollowSymLinks
RewriteEngine on
RewriteRule ^ftopic.php$ viewtopic.php [L]
Voici sinon un post sur l URL rewrit et PHPBB
http://www.webrankinfo.com/forums/viewtopic_31831.htm
C'est déja fait, ce que je veux modifier, c'est le MOD en haut.
4 messages
• Page 1 sur 1
Formation recommandée sur ce thème :
Formation URL Rewriting et sites dynamiques : apprenez comment mettre en place la réécriture d'URL, comment optimiser vos URL et profiter de vos pages dynamiques pour booster votre référencement. Formation animée par Olivier Duffez et Fabien Facériès, experts en référencement naturel.
Tous les détails sur le site Ranking Metrics : programme, prix, dates et lieux, inscription en ligne.
Lectures recommandées sur ce thème :
Qui est en ligne
Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 0 invités
