Index
Forums
Annuaire
Référencement
Télécharger
  phpBB SEO : Référencement Google, MSN, Yahoo, Annuaires, Forums  
phpBB SEO
Boards
Directory  
SEO  
Downloads
 
  Rechercher Search
    S'enregistrer
Pseudo :  Passe :  Auto  
Register  
 
   
demande d'addaptatin du rewite sur mn fil rss

 
Poster un nouveau sujet   Répondre au sujet    phpBB SEO » Forum Référencement  » mod Rewrite phpBB
::  
Auteur Message
xenos



Inscrit le: 09 Oct 2006
Messages: 17

demande d'addaptatin du rewite sur mn fil rssPosté le: Mar Oct 10, 2006 5:02 pm    Sujet du message: demande d'addaptatin du rewite sur mn fil rss

bonjour a tous et toutes
je viens de rewiter mon phpbb avec le mod rewite avancé
super ça marche nickel

mais j'ai un petit bug ,
mon fil rss ne prends pas en compte les url rewitées
voyez ce que ça donne
http://theparadise.joom.in/rss.xml
que dois je modifier sur mon fichier rss.php pour obtenir les url rewitées ?

voici a tout hazard mn code ,si vous pouvez m'aider ce serait trop gentil

Code:
<?php
/***************************************************************************
*               rss.php
*              -------------------
*   begin       : Monday, July 7, 2003
*   notes       : This code is based on the work of the original
*            developer below.  Portions of this code
*            'borrowed' from phpbb_fetch_posts, an
*            untitled rdf content syndicator posted at
*            phpbb.com, and phpbb itself.
*   email       : rss@wickedwisdom.com
*
*
*   $Id: rss.php,v 2.0.1 2003/07/17 10:11:00 nschindler Exp $
*
*
***************************************************************************/

/***************************************************************************
*               rdf.php
*              -------------------
*   begin       : Saturday, Mar 2, 2002
*   copyright       : (C) 2002 Matthijs van de Water
*                Sascha Carlin
*   email       : phpbb@matthijs.net
*            sc@itst.org
*
*   $Id: rdf.php,v 1.3.1 2003/02/16 14:43:11 mvdwater Exp $
*
*
***************************************************************************/

/***************************************************************************
*
*   This program is free software; you can redistribute it and/or modify
*   it under the terms of the GNU General Public License as published by
*   the Free Software Foundation; either version 2 of the License, or
*   (at your option) any later version.
*
***************************************************************************/

//
// BEGIN Configuration
//
// Set the relative path from this file to your phpBB root folder
$phpbb_root_path = './';
// How many posts do you want to returnd (count)?  Specified in the URL with "c=".  Defaults to 15, upper limit of 50.
$count = ( isset($HTTP_GET_VARS['c']) ) ? intval($HTTP_GET_VARS['c']) : 15;
$count = ( $count == 0 ) ? 15 : $count;
$count = ( $count > 50 ) ? 50 : $count;
// Which forum do you want posts from (forum_id)?  specified in the url with "f=".  Defaults to all (public) forums.
$forum_id = ( isset($HTTP_GET_VARS['f']) ) ? intval($HTTP_GET_VARS['f']) : '';
$sql_forum_where = ( !empty($forum_id) ) ? ' AND f.forum_id = ' . $forum_id : ' ';
// Return topics only, or all posts?  Specified in the URL with "t=".  Defaults to all posts (0).
$topics_only = (isset($HTTP_GET_VARS['t']) ) ? intval($HTTP_GET_VARS['t']) : 0;
$sql_topics_only_where = '';
if ( $topics_only == 1 )
{
   $sql_topics_only_where = 'AND p.post_id = t.topic_first_post_id';
}
//
// END Configuration
//

//
// BEGIN Includes of phpBB scripts
//
define ('IN_PHPBB', true);
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
//
// END Includes of phpBB scripts
//

//
// BEGIN Session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

//
// BEGIN Create main board information (some code borrowed from functions_post.php)
//
// Build URL components
$script_name = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path']));
$viewpost = ( $script_name != '' ) ? $script_name . '/viewtopic.' . $phpEx : 'viewtopic.'. $phpEx;
$index = ( $script_name != '' ) ? $script_name . '/index.' . $phpEx : 'index.'. $phpEx;
$server_name = trim($board_config['server_name']);
$server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://';
$server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/';
// Assemble URL components
$index_url = $server_protocol . $server_name . $server_port . $script_name . '/';
$viewpost_url = $server_protocol . $server_name . $server_port . $viewpost;
// Reformat site name and description
$site_name = strip_tags($board_config['sitename']);
$site_description = strip_tags($board_config['site_desc']);
// Set the fully qualified url to your smilies folder
$smilies_path = $board_config['smilies_path'];
$smilies_url = $index_url . $smilies_path;
$smilies_path = preg_replace("/\//", "\/", $smilies_path);
//
// END Create main board information
//

//
// BEGIN Initialise template
//
$template->set_filenames(array(
   "body" => "rss_body.tpl")
);
//
// END Initialise template
//

//
// BEGIN Assign static variables to template
//
// Variable reassignment for Topic Replies
$l_topic_replies = $lang['Topic'] . ' ' . $lang['Replies'];
$template->assign_vars(array(
   'S_CONTENT_ENCODING' => $lang['ENCODING'],
   'BOARD_URL' => $index_url,
   'BOARD_TITLE' => $site_name,
   'BOARD_DESCRIPTION' => $site_description,
   'BOARD_MANAGING_EDITOR' => $board_config['board_email'],
   'BOARD_WEBMASTER' => $board_config['board_email'],
   'BUILD_DATE' => gmdate('D, d M Y H:i:s', time()) . ' GMT',
   'L_AUTHOR' => $lang['Author'],
   'L_POSTED' => $lang['Posted'],
   'L_TOPIC_REPLIES' => $l_topic_replies,
   'L_POST' => $lang['Post'])
);
//
// END Assign static variabless to template
//

//
// BEGIN SQL statement to fetch active posts of public forums
//
$sql = "SELECT f.forum_name, t.topic_title, u.user_id, u.username, u.user_sig, u.user_sig_bbcode_uid, p.post_id, pt.post_text, pt.post_subject, pt.bbcode_uid, p.post_time, t.topic_replies, t.topic_first_post_id
   FROM " . FORUMS_TABLE . " AS f, " . TOPICS_TABLE . " AS t, " . USERS_TABLE . " AS u, " . POSTS_TABLE . " AS p, " . POSTS_TEXT_TABLE . " as pt
   WHERE
      t.forum_id = f.forum_id
         AND f.auth_view = " . AUTH_ALL . "
         AND p.poster_id = u.user_id
         AND pt.post_id = p.post_id
         AND p.topic_id = t.topic_id
         $sql_topics_only_where
         $sql_forum_where
   ORDER BY p.post_time DESC LIMIT $count";
$posts_query = $db->sql_query($sql);
//
// END SQL statement to fetch active posts of public forums
//

//
// BEGIN Query failure check
//
if ( !$posts_query )
{
   message_die(GENERAL_ERROR, "Could not query list of active posts", "", __LINE__, __FILE__, $sql);
}
else if ( !$db->sql_numrows($posts_query) )
{
   message_die(GENERAL_MESSAGE, $lang['No_match']);
}
else
{
//
// END Query failure check
//

//
// BEGIN "item" loop
//
   while ($post = $db->sql_fetchrow($posts_query))
   {

// Variable reassignment and reformatting for post text
$post_text = $post['post_text'];
$post_text = str_replace("\n", "\n<br />\n", $post_text);
$post_text = bbencode_second_pass($post_text, $post['bbcode_uid']);
$post_text = smilies_pass($post_text);
$post_text = preg_replace("/$smilies_path/", $smilies_url, $post_text);
$post_text = make_clickable($post_text);
// Variable reassignment and reformatting for user sig
$user_sig = $post['user_sig'];
$user_sig = bbencode_second_pass($user_sig, $post['user_sig_bbcode_uid']);
$user_sig = smilies_pass($user_sig);
$user_sig = preg_replace("/$smilies_path/", $smilies_url, $user_sig);
$user_sig = make_clickable($user_sig);
   if ( $user_sig != '' )
{
      $user_sig = '<br />_________________<br />' . str_replace("\n", "\n<br />\n", $user_sig);
}
// Variable reassignment and reformatting for post subject
$post_subject = $post['post_subject'];
   if ( $post_subject != '' )
{
      $post_subject = $lang['Subject'] . ': ' . htmlspecialchars($post_subject) . '<br />';
}
// Variable reassignment for topic title, and show whether it is the start of topic, or a reply
$topic_title = $post['topic_title'];
// Variable reassignment and reformatting for author
$author = $post['username'];
if ( $post['user_id'] != -1 )
{
        $author = '<a href="' . $index_url . 'profile.' . $phpEx . '?mode=viewprofile&u=' . $post['user_id'] . '" target="_blank">'
 . $author . '</a>';
}
$author = make_clickable($author);
// Assign "item" variables to template
      $template->assign_block_vars('post_item', array(
         'POST_URL' => $viewpost_url . '?' . POST_POST_URL . '=' . $post['post_id'] . '#' . $post['post_id'],
         'TOPIC_TITLE' => htmlspecialchars($topic_title),
         'AUTHOR' => htmlspecialchars($post['username']),
         'POST_TIME' => create_date($board_config['default_dateformat'], $post['post_time'], $board_config['board_timezone']),
         'POST_SUBJECT' => htmlspecialchars($post_subject),
         'FORUM_NAME' => htmlspecialchars($post['forum_name']),
         'POST_TEXT' => htmlspecialchars($post_text),
         'USER_SIG' => htmlspecialchars($user_sig),
         'TOPIC_REPLIES' => $post['topic_replies']
)
      );
   }
}
//
// END "item" loop
//

//
// BEGIN XML and nocaching headers (copied from page_header.php)
//
if (!empty($HTTP_SERVER_VARS['SERVER_SOFTWARE']) && strstr($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'Apache/2'))
{
   header ('Cache-Control: no-cache, pre-check=0, post-check=0, max-age=0');
}
else
{
   header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
}
header ('Expires: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT');
header ('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header ('Content-Type: text/xml');
//
// End XML and nocaching headers
//

//
// BEGIN Output XML page
//
$template->pparse('body');
//
// END Output XML page
//

?>
Revenir en haut de page
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Inscrit le: 28 Avr 2006
Messages: 13354

demande d'addaptatin du rewite sur mn fil rssPosté le: Mer Oct 11, 2006 8:36 am    Sujet du message: Re: demande d'addaptatin du rewite sur mn fil rss

Arf, il est pas génial ce mod, il sort des URLs de message que nous devons interdire par robots.txt.

Je bosse sur une solution rss 2.0 qui va le faire Wink

Mais en attendant, trouve :

Code:
         'POST_URL' => $viewpost_url . '?' . POST_POST_URL . '=' . $post['post_id'] . '#' . $post['post_id'],


Remplace par :

Code:
         'POST_URL' => append_sid($viewpost_url . '?' . POST_POST_URL . '=' . $post['post_id']) . '#' . $post['post_id'],


Comme ça les url des messages seront bien réécrites Wink

++

_________________
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
Visiter le site web de l'utilisateur
xenos



Inscrit le: 09 Oct 2006
Messages: 17

demande d'addaptatin du rewite sur mn fil rssPosté le: Mer Oct 11, 2006 9:28 am    Sujet du message: Re: demande d'addaptatin du rewite sur mn fil rss

merci dcz pour le suport
ais ça marche pas

moi j'ai fait ceci

Code:
'POST_URL' => append_sid($viewpost_url . $topic_title . '.' . html),


mais ça marche pas

tu a une idée dcz ?

pur avoir la repercution de ce genre d'url
http://theparadise.joom.in/test-vt59.html

moi j'ai ceci en ce moment
http://theparadise.joom.in/viewtopic.phptest.html

donc il faut benner le viewtopic et ajouter le -[id]
Revenir en haut de page
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Inscrit le: 28 Avr 2006
Messages: 13354

demande d'addaptatin du rewite sur mn fil rssPosté le: Jeu Oct 12, 2006 12:43 pm    Sujet du message: Re: demande d'addaptatin du rewite sur mn fil rss

Qu'est ce qui ne marche pas ?

Tu n'as pas des URL du type postxx.html ?

dcz a écrit:
Arf, il est pas génial ce mod, il sort des URLs de message que nous devons interdire par robots.txt.

Je bosse sur une solution rss 2.0 qui va le faire Wink

_________________
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
Visiter le site web de l'utilisateur
xenos



Inscrit le: 09 Oct 2006
Messages: 17

demande d'addaptatin du rewite sur mn fil rssPosté le: Ven Oct 13, 2006 10:30 am    Sujet du message: Re: demande d'addaptatin du rewite sur mn fil rss

si j'ai bien ce genre d'urls avec ta modif
mais alors je tombe dans le duplicate content

le but du jeux c'est de pouvoir retranscrire mes url seo avanced dans le feed

je t'ai fait un pm avec ce que j'ai fait et mon probleme
d'url
donc les - entre les mots sont pas integrés et les id ne correspondent plus

la modif pour rappel :

Code:
'POST_URL' => append_sid('http://theparadise.joom.in/' . $topic_title .'-vt' . $post['post_id'] . '.' . html),


tu aurais une zidée ?
Revenir en haut de page
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Inscrit le: 28 Avr 2006
Messages: 13354

demande d'addaptatin du rewite sur mn fil rssPosté le: Ven Oct 13, 2006 10:34 am    Sujet du message: Re: demande d'addaptatin du rewite sur mn fil rss

dcz a écrit:
Arf, il est pas génial ce mod, il sort des URLs de message que nous devons interdire par robots.txt.


C'est le mod ça, il sort des URL de messages et pas de sujets.

T'inquiètes pas des duplicates, si ton robots.txt est à jour, il n'en sera rien.

Il est bien entendu possible de modifier totalement le mod, mais je préfère me consacrer à la mise à jour de mx Google sitemaps qui nous fera de beaux fil RSS avec des URLs de sujets Wink

En plus sans cache, ce mod est pas vraiment utilisable, il saturera assez vite ton serveur.

En attendant, tu peux l'utiliser tel quel, juste, il ne servira pas directement le référencement de ton forum, sans pour autant créer de duplicate pour peut que ton robots.txt soit à jour Wink

++

_________________
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
Visiter le site web de l'utilisateur
xenos



Inscrit le: 09 Oct 2006
Messages: 17

demande d'addaptatin du rewite sur mn fil rssPosté le: Sam Oct 14, 2006 1:20 pm    Sujet du message: Re: demande d'addaptatin du rewite sur mn fil rss

oui un disalow pourais regler la question mais alors c'est une reele perte nette en referencement ,surtout si je joue du feed rss sur les autre sites

bha je vais regler ce probleme de feed a coups d'include ...
Revenir en haut de page
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Inscrit le: 28 Avr 2006
Messages: 13354

demande d'addaptatin du rewite sur mn fil rssPosté le: Sam Oct 14, 2006 6:04 pm    Sujet du message: Re: demande d'addaptatin du rewite sur mn fil rss

Tu ne pourrais pas faire tourner ce script sur beaucoup de sites de toutes façons, sans cache c'est vite lourd d'exporter des liens.

Un peut de patience pour une vrai solution rss optimisée pour le référencement Wink

_________________
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
Visiter le site web de l'utilisateur
Montrer les messages depuis:   
Poster un nouveau sujet   Répondre au sujet    phpBB SEO » Forum Référencement  » mod Rewrite phpBB
Page 1 sur 1

Navigation Autres sujets de discussion

Sauter vers: