mikedimoi a écrit:Dans la réecriture, ne serait il donc pas possible de réécrire ces URLs ?
Réécrire la réécriture ...
postxx.html est le résultat de la réécriture des url de messages viewtopic.php?p=xx
En tous cas, voici le patch de ce message mis à jour pour les versions 0.2.x
Ouvrir :
- Code: Tout sélectionner
portal.php
Trouver :
- Code: Tout sélectionner
//
// Start output of page
//
Ajouter Avant :
- Code: Tout sélectionner
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
//
// Define censored word matches
//
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
// www.phpBB-SEO.com SEO TOOLKIT END
Donc pour sortir les URLs des sujets du bloc derniers sujets, au lieux des URLs des derniers messages, qui sont des duplicate :
Ouvrir :
- Code: Tout sélectionner
gf_portail/gf_mods/mod_recent_topics.php
Trouver :
- Code: Tout sélectionner
$template_mod->assign_block_vars('scrolling_row.recent_topic_row', array(
'U_TITLE' => append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $recent_topic_row[$i]['post_id']) . '#' .$recent_topic_row[$i]['post_id'],
'L_TITLE' => $recent_topic_row[$i]['topic_title'],
Remplacer par :
- Code: Tout sélectionner
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$seo_topic_name = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $recent_topic_row[$i]['topic_title']) : $recent_topic_row[$i]['topic_title'];
if ( !isset($phpbb_seo->seo_url['topic'][$recent_topic_row[$i]['topic_id']]) ) {
$phpbb_seo->seo_url['topic'][$recent_topic_row[$i]['topic_id']] = $phpbb_seo->format_url($seo_topic_name);
}
$template_mod->assign_block_vars('scrolling_row.recent_topic_row', array(
'U_TITLE' => append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $recent_topic_row[$i]['topic_id']),
'L_TITLE' => $seo_topic_name,
// www.phpBB-SEO.com SEO TOOLKIT END
Trouver :
- Code: Tout sélectionner
$template_mod->assign_block_vars('classical_row.recent_topic_row', array(
'U_TITLE' => append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $recent_topic_row[$i]['post_id']) . '#' .$recent_topic_row[$i]['post_id'],
'L_TITLE' => $recent_topic_row[$i]['topic_title'],
Remplacer par :
- Code: Tout sélectionner
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$seo_topic_name = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $recent_topic_row[$i]['topic_title']) : $recent_topic_row[$i]['topic_title'];
if ( !isset($phpbb_seo->seo_url['topic'][$recent_topic_row[$i]['topic_id']]) ) {
$phpbb_seo->seo_url['topic'][$recent_topic_row[$i]['topic_id']] = $phpbb_seo->format_url($seo_topic_name);
}
$template_mod->assign_block_vars('classical_row.recent_topic_row', array(
'U_TITLE' => append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $recent_topic_row[$i]['topic_id']),
'L_TITLE' => $seo_topic_name,
// www.phpBB-SEO.com SEO TOOLKIT END
Les news :
Ouvrir :
- Code: Tout sélectionner
gf_portail/gf_mods/mod_news.php
Trouver :
- Code: Tout sélectionner
$template_mod->assign_block_vars('post_row', array(
'TITLE' => $posts[$i]['topic_title'],
Remplacer par :
- Code: Tout sélectionner
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$seo_topic_name = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $posts[$i]['topic_title']) : $posts[$i]['topic_title'];
if ( !isset($phpbb_seo->seo_url['topic'][$posts[$i]['topic_id']]) ) {
$phpbb_seo->seo_url['topic'][$posts[$i]['topic_id']] = $phpbb_seo->format_url($seo_topic_name);
}
$template_mod->assign_block_vars('post_row', array(
'TITLE' => $seo_topic_name,
// www.phpBB-SEO.com SEO TOOLKIT END

Français |
Anglais

