| |
| |
|
|
|
|
| |
|
| |
|
| :: |
| Auteur |
Message |
eric6779 PR1

Inscrit le: 22 Déc 2006 Messages: 149
|
Posté le: Dim Fév 24, 2008 10:04 pm Sujet du message: Adaptation zero dupes |
|
|
Bonsoir all,
dans viewtopic, il demande ceci :
| Citation: | #
#-----[ FIND ]------------------------------------------
#
//
// Define censored word matches
//
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
//
// Censor topic title
//
if ( count($orig_word) )
{
$topic_title = preg_replace($orig_word, $replacement_word, $topic_title);
}
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$phpbb_seo->seo_url['topic'][$topic_id] = $phpbb_seo->format_url($topic_title);
// www.phpBB-SEO.com SEO TOOLKIT END |
et moi j'ai ceci :
| Code: | //
// Define censored word matches
//
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
//
// Censor topic title
//
//-- mod : disable word censor for single forums -------------------------------
//-- delete
/*-MOD
if ( count($orig_word) )
MOD-*/
//-- add
if ( count($orig_word) && (!$forum_topic_data['disable_word_censor']) )
//-- fin mod : disable word censor for single forums ---------------------------
{
$topic_title = preg_replace($orig_word, $replacement_word, $topic_title);
}
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
if ( !isset($phpbb_seo->seo_url['topic'][$topic_id]) ) {
$phpbb_seo->seo_url['topic'][$topic_id] = $phpbb_seo->format_url($topic_title);
}
// www.phpBB-SEO.com SEO TOOLKIT END |
puis je faire comme ceci :
| Citation: |
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
// Moved this a little above for the zero dupe
//
// Define censored word matches
//
//$orig_word = array();
//$replacement_word = array();
//obtain_word_list($orig_word, $replacement_word);
if ( count($orig_word) && (!$forum_topic_data['disable_word_censor']) )
//-- fin mod : disable word censor for single forums ---------------------------
{
$topic_title = preg_replace($orig_word, $replacement_word, $topic_title);
}
//
// Censor topic title
//
//if ( count($orig_word) )
//{
// $topic_title = preg_replace($orig_word, $replacement_word, $topic_title);
//}
// www.phpBB-SEO.com SEO TOOLKIT END
|
ou cela vas poser problème ?
Merci dcz  |
_________________ Administrateur du site d'entraide pour Counter-Strike Source :
http://www.support-cssource.fr |
|
| Revenir en haut de page |
|
 |
|
 |
dcz Administrateur - Site Admin

Inscrit le: 28 Avr 2006 Messages: 13031
|
Posté le: Lun Fév 25, 2008 2:57 pm Sujet du message: Re: Adaptation zero dupes |
|
|
Pour conserver les effets de ton mod, il faut déplacer tout son code, donc tu mets :
| Code: | //
// Define censored word matches
//
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
//
// Censor topic title
//
//-- mod : disable word censor for single forums -------------------------------
//-- delete
/*-MOD
if ( count($orig_word) )
MOD-*/
//-- add
if ( count($orig_word) && (!$forum_topic_data['disable_word_censor']) )
//-- fin mod : disable word censor for single forums ---------------------------
{
$topic_title = preg_replace($orig_word, $replacement_word, $topic_title);
}
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
if ( !isset($phpbb_seo->seo_url['topic'][$topic_id]) ) {
$phpbb_seo->seo_url['topic'][$topic_id] = $phpbb_seo->format_url($topic_title);
}
// www.phpBB-SEO.com SEO TOOLKIT END |
A la place de :
| Code: | // Define censored word matches
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
$topic_title = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $topic_title) : $topic_title;
$phpbb_seo->seo_url['topic'][$topic_id] = $phpbb_seo->format_url($topic_title); |
dans le code ajouté par le zero dupe, et tu le remplaces (à l'endroit ou il se trouve au début dans ton fichier) par :
| Code: |
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
// Moved this a little above for the zero dupe //
// Define censored word matches
//
//$orig_word = array();
//$replacement_word = array();
//obtain_word_list($orig_word, $replacement_word);
//
// Censor topic title
//
//-- mod : disable word censor for single forums -------------------------------
//-- delete
/*-MOD
if ( count($orig_word) )
MOD-*/
//-- add
//if ( count($orig_word) && (!$forum_topic_data['disable_word_censor']) )
//-- fin mod : disable word censor for single forums ---------------------------
//{
// $topic_title = preg_replace($orig_word, $replacement_word, $topic_title);
//}
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
//if ( !isset($phpbb_seo->seo_url['topic'][$topic_id]) ) {
// $phpbb_seo->seo_url['topic'][$topic_id] = $phpbb_seo->format_url($topic_title);
//}
// www.phpBB-SEO.com SEO TOOLKIT END |
Là, on commente le code pour le rendre inactif tout en conservant trace de sa position initiale (cela pourrait être utile lors d'une MAJ), mais tu peux aussi bien l'effacer si tu veux, l'essentiel c'est que ce code doit se dérouler avant le zéro dupe.
++ |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Revenir en haut de page |
|
 |
eric6779 PR1

Inscrit le: 22 Déc 2006 Messages: 149
|
Posté le: Lun Fév 25, 2008 3:04 pm Sujet du message: Re: Adaptation zero dupes |
|
|
donc au final, ça pourrai donner ceci :
| Code: | //
// Define censored word matches
//
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
//
// Censor topic title
//
//-- mod : disable word censor for single forums -------------------------------
//-- delete
/*-MOD
if ( count($orig_word) )
MOD-*/
//-- add
if ( count($orig_word) && (!$forum_topic_data['disable_word_censor']) )
//-- fin mod : disable word censor for single forums ---------------------------
{
$topic_title = preg_replace($orig_word, $replacement_word, $topic_title);
}
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
if ( !isset($phpbb_seo->seo_url['topic'][$topic_id]) ) {
$phpbb_seo->seo_url['topic'][$topic_id] = $phpbb_seo->format_url($topic_title);
}
// www.phpBB-SEO.com SEO TOOLKIT END
//
// Was a highlight request part of the URI?
// |
par contre, j'ai deux fois :
Define censored word matches
Ligne 379 à 400 :
| Code: | // Define censored word matches
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
$topic_title = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $topic_title) : $topic_title;
$phpbb_seo->seo_url['topic'][$topic_id] = $phpbb_seo->format_url($topic_title);
$uri = $phpbb_seo->seo_req_uri();
$postorder_redir = empty($_POST['postorder']) && empty($_GET['postorder']);
if ($_GET['postorder'] == 'asc' || $_POST['postorder'] == 'asc' ) {
$postorder_redir = TRUE;
}
$phpbb_seo->seo_start( $start, $board_config['posts_per_page'] );
$phpbb_seo->page_url = $phpbb_seo->seo_url['topic'][$topic_id] . $phpbb_seo->seo_delim['topic'] . $topic_id . $phpbb_seo->start . $phpbb_seo->seo_ext['topic'];
$phpbb_seo->seo_cond(!$userdata['session_logged_in'] && ( strpos($uri, "sid=" ) !== FALSE ) );
if ( $phpbb_seo->do_redir || ( $postorder_redir && strpos($uri, 'watch=') === FALSE && strpos($uri, $phpbb_seo->page_url) === FALSE ) ) {
$phpbb_seo->seo_redirect( $phpbb_seo->seo_path['phpbb_url'] . $phpbb_seo->page_url . ( ( $post_id ) ? "#$post_id" : "" ) );
}
// www.phpBB-SEO.com SEO TOOLKIT END
//
// Is user watching this thread?
// |
et ligne 714 à 744 (la partie dont je te demandai justement) :
| Code: | //
// Define censored word matches
//
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
//
// Censor topic title
//
//-- mod : disable word censor for single forums -------------------------------
//-- delete
/*-MOD
if ( count($orig_word) )
MOD-*/
//-- add
if ( count($orig_word) && (!$forum_topic_data['disable_word_censor']) )
//-- fin mod : disable word censor for single forums ---------------------------
{
$topic_title = preg_replace($orig_word, $replacement_word, $topic_title);
}
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
if ( !isset($phpbb_seo->seo_url['topic'][$topic_id]) ) {
$phpbb_seo->seo_url['topic'][$topic_id] = $phpbb_seo->format_url($topic_title);
}
// www.phpBB-SEO.com SEO TOOLKIT END
//
// Was a highlight request part of the URI?
// |
car toi, tu me parle de modifier le premier code :s
Merci de m'éclaircir les idées  |
_________________ Administrateur du site d'entraide pour Counter-Strike Source :
http://www.support-cssource.fr |
|
| Revenir en haut de page |
|
 |
|
| Navigation |
Autres sujets de discussion |
|
|
|
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |