May 21, 2012, 08:43:53 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Revenue sharing launched. This is offered as a "thank you" for being a member of webmasterstalks.com community! If you have an Adsense/Yahoo publisher account then you can start right away !
 
  Home   Forum   Help Search Directory Calendar Login Register    RSS 2.0 feedAtom feed


News
Revenue sharing launched. This is offered as a "thank you" for being a member of webmasterstalks.com community! If you have an Adsense/Yahoo publisher account then you can start right away !
Pages: [1]
  Print  
Author Topic:

Seo4SMF 0.2.9.9 (French)

 (Read 2305 times)
0 Members and 1 Guest are viewing this topic.
Jefekoi
Newbie
*

Points: 0
Offline Offline

Posts: 2


« on: October 22, 2008, 21:23:19 »

Bonjour,

Sorry, I don't know speak English  Roll Eyes


 Rewriting Seo4SMF 0.2.9.9

----------------------------------------------------------------
My forum PHPBB3 is :
...../forum/porte-jeune-place-europe-t3867.html

My forum SMF 1.1.6  is :
...../forum2/mulhouse/porte_jeune_place_de_leurope-t3867.0.html

----------------------------------------------------------------
I want (forum SMF 1.1.6)
...../forum2/porte-jeune-place-europe-t3867.html
----------------------------------------------------------------

Help me please Cry



QueryString.php

Quote
// Rewrite URLs to include the session ID.
function ob_sessrewrite($buffer)
{
   global $scripturl, $modSettings, $user_info, $context;

   // If $scripturl is set to nothing, or the SID is not defined (SSI?) just quit.
   if ($scripturl == '' || !defined('SID'))
      return $buffer;

   $scripturl1=str_replace("/index.php","",$scripturl);


   // Do nothing if the session is cookied, or they are a crawler - guests are caught by redirectexit().  This doesn't work below PHP 4.3.0, because it makes the output buffer bigger.
   // !!! smflib
   if (empty($_COOKIE) && SID != '' && empty($context['browser']['possibly_robot']) && @version_compare(PHP_VERSION, '4.3.0') != -1 && ($modSettings['seo4smf_enable']!="on"))
      $buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '(?!\?' . preg_quote(SID, '/') . ')(\?)?/', '"' . $scripturl . '?' . SID . '&', $buffer);
   // Debugging templates, are we?
   elseif (isset($_GET['debug']))
      $buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '(\?)?/', '"' . $scripturl . '?debug;', $buffer);

   // This should work even in 4.2.x, just not CGI without cgi.fix_pathinfo.
   if (!empty($modSettings['queryless_urls']) && (!$context['server']['is_cgi'] || @ini_get('cgi.fix_pathinfo') == 1) && $context['server']['is_apache'])
   {
      // Let's do something special for session ids!
      if (defined('SID') && SID != '')
         $buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?(?:' . SID . 'Wink((?:board|topic)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html?' . SID . '\$2\"'", $buffer);
                    if ($modSettings['seo4smf_sb_enable'] == "on")
                    {
                        $buffer = preg_replace('/<!-- Seo4SMF Social Bookmark -->/', create_sb() , $buffer);
                    }

                    if ($modSettings['seo4smf_enable'] == "on")
                    {      

                        $buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?((?:board|topic|page)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl1 . '/' . beautify_urls(strtr('\$1', '&;=', '//,')) . '\$2\"'", $buffer);

                        if ($modSettings['seo4smf_beautify_profiles'] == "on")
                        {
                            $buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?action=profile;u=([^#"]+?)?"/e', "'\"' . \$scripturl1 . '/' . beautify_url_profiles(strtr('\$1', '&;=', '//,')) . '\$2\"'", $buffer);
                        }

                        if ($modSettings['seo4smf_beautify_actions'] == "on")
                        {   
             $buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?action=([^#"]+?)?"/e', "'\"' . \$scripturl1 . '/' . beautify_url_action('\$1'). '\$2\"'", $buffer);
         }

         if ($modSettings['seo4smf_keywords'] == "on")
         {
                           $buffer = preg_replace('<meta name="keywords" content=(.*) />', create_keywords() , $buffer);
         }
         if ($modSettings['seo4smf_description'] == "on")
         {
                           $buffer = preg_replace('<meta name="description" content=(.*) />', create_description() , $buffer);
         }

                        $buffer = preg_replace('/<a href=\"http:\/\/www.simplemachines.org\/about\/copyright.php\" title=\"Free Forum Software\" target=\"_blank\">SMF &copy; 2006-2007, Simple Machines LLC<\/a>/', '<a href="http://www.simplemachines.org/about/copyright.php" title="Free Forum Software" target="_blank">SMF &copy; 2006-2007, Simple Machines LLC</a><br /> <a href="http://www.webmasterstalks.com" target="blank_">Seo4Smf v0.2 &copy; Webmaster\'s Talks</a>' , $buffer);
                        $buffer = preg_replace('/<a href=\"http:\/\/www.simplemachines.org\/about\/copyright.php\" title=\"Free Forum Software\" target=\"_blank\">SMF &copy; 2006, Simple Machines LLC<\/a>/', '<a href="http://www.simplemachines.org/about/copyright.php" title="Free Forum Software" target="_blank">SMF &copy; 2006, Simple Machines LLC</a><br /> <a href="http://www.webmasterstalks.com" target="blank_">Seo4Smf v0.2 &copy; Webmaster\'s Talks</a>' , $buffer);
                        $buffer = preg_replace('/<a href=\"http:\/\/www.simplemachines.org\/about\/copyright.php\" title=\"Free Forum Software\" target=\"_blank\">SMF © 2001-2006, Lewis Media<\/a>/', '<a href="http://www.simplemachines.org/about/copyright.php" title="Free Forum Software" target="_blank">SMF &copy; 2001-2006, Simple Machines, Lewis Media</a><br /> <a href="http://www.webmasterstalks.com" target="blank_">Seo4Smf v0.2 &copy; Webmaster\'s Talks</a>' , $buffer);
                    }
                    else
                    {
                        $buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html\$2\"'", $buffer);
                    }
   }

   // Return the changed buffer.
   return $buffer;
}

?>


.htaccess

Quote
RewriteEngine on

#Some apache servers need Rewritebase.
#delete # from start of Rewrite base to enable it.
#If your forum is something like http://www.forum-example.com/forum then modify your
#RewriteBase in this way: RewriteBase /forum

RewriteBase /forum2

#Archive/Sitemaps
RewriteRule ^sitemaps-([a-zA-Z0-9-]*)\.html index.php?dummy=1&action=seo4smfsitemaps&sa=$1 [L]

#uncomment if you use beautifying url actions
#RewriteCond %{REQUEST_METHOD} =GET
#RewriteCond %{QUERY_STRING} ^action=(.*)$
#RewriteRule  ^(.*)$ seo4smf-redirect.php?a=%1 [R=301,L]

RewriteCond %{QUERY_STRING} ^topic=([0-9]*)$
RewriteRule  ^(.*)$ seo4smf-redirect.php?t=%1 [R=301,L]

RewriteCond %{QUERY_STRING} ^topic=([0-9]*).([0-9]*)
RewriteRule  ^(.*)$ seo4smf-redirect.php?t=%1 [R=301,L]

RewriteCond %{QUERY_STRING} ^board=([0-9]*).([0-9]*)
RewriteRule  ^(.*)$ seo4smf-redirect.php?b=%1 [R=301,L]

RewriteCond %{QUERY_STRING} ^action=profile;u=([0-9]*);(.*)$
RewriteRule  ^(.*)$ seo4smf-redirect.php?u=%1;param=%2 [R=301,L]

RewriteCond %{QUERY_STRING} ^action=profile;u=([0-9]*)
RewriteRule  ^(.*)$ seo4smf-redirect.php?u=%1 [R=301,L]

#Tiny Portal Old Url's
RewriteCond %{QUERY_STRING} ^page=([0-9]*)
RewriteRule  ^(.*)$ seo4smf-redirect.php?p=%1 [R=301,L]

#Rewrite Old urls
RewriteRule  ^index.php/board,(.*).html seo4smf-redirect.php?b=$1 [R=301,L]
RewriteRule  ^index.php/board,(.*).html;(.*) seo4smf-redirect.php?b=$1&o=$2 [R=301,L]

RewriteRule  ^index.php/topic,(.*).html seo4smf-redirect.php?t=$1 [R=301,L]
RewriteRule  ^index.php/topic,(.*).html;(.*) seo4smf-redirect.php?t=$1&o=$2 [R=301,L]

#Bad Url's
#RewriteCond %{REQUEST_URI} ^(.*)\.html$
#RewriteCond %{REQUEST_URI} !^(.+)/(.*)-t([0-9]*)\.([0-9]*).html$
#RewriteRule ^(.*)-t([0-9]*)\.([0-9]*)\.html seo4smf-redirect.php?t=$2 [R=301,L]

RewriteRule  ^(.*)/-t(.*).html seo4smf-redirect.php?t=$2 [R=301,L]
RewriteRule  ^-b(.*)/$ seo4smf-redirect.php?b=$1 [R=301,L]
RewriteRule  ^-b(.*)/(.*)$ seo4smf-redirect.php?b=$1 [R=301,L]
RewriteRule  ^(.*)/-b(.*)/$ seo4smf-redirect.php?b=$2 [R=301,L]

#New board URL's
RewriteRule ^(.*)-b([0-9]*)\.([0-9]*)/;(.*) index.php?dummy=1&board=$2.$3&$4 [L]
RewriteRule ^(.*)-b([0-9]*)\.([0-9]*)/$ index.php?dummy=2&board=$2.$3 [L]
RewriteRule ^(.*)-b([0-9]*)\.([0-9])$ index.php?dummy=2&board=$2.$3 [L]

#New topic URL's
RewriteRule ^(.*)-t([0-9]*)\.([0-9]*)\.html;((\?:from|msg|new)[0-9]*);(.*)$ index.php?dummy=1&topic=$2.$4&$6 [L]
RewriteRule ^(.*)-t([0-9]*)\.([0-9]*)\.html;((\?:from|msg|new)[0-9]*) index.php?dummy=1&topic=$2.$4 [L]
RewriteRule ^(.*)-t([0-9]*)\.([0-9]*)\.html;(.*)$ index.php?dummy=1&topic=$2.$3&$4 [L]
RewriteRule ^(.*)-t([0-9]*)\.([0-9]*)\.html$ index.php?dummy=1&topic=$2.$3 [L]

#New profiles URL's
RewriteRule ^(.*)-u([0-9]*)\.html;sa,(.*);start,([0-9]*);delete,([0-9]*);sesc,([a-z0-9]*)$ index.php?dummy=1&action=profile;u=$2;sa=$3;start=$4;delete=$5;sesc=$6 [L]
RewriteRule ^(.*)-u([0-9]*)\.html;sa,(.*);start,([0-9]*)$ index.php?dummy=1&action=profile;u=$2;sa=$3;start=$4 [L]
RewriteRule ^(.*)-u([0-9]*)\.html;sa,(.*)$ index.php?dummy=1&action=profile;u=$2;sa=$3 [L]
RewriteRule ^(.*)-u([0-9]*)\.html index.php?dummy=1&action=profile;u=$2 [L]

#New Tinyportal Articles URL's
RewriteRule ^(.*)-p([0-9]*)\.html index.php?dummy=1&page=$2 [L]

#New action Url's - uncomment if you use beautifying url actions
#RewriteRule ^(.*)\.html(.*)$ index.php?dummy=1;action=$1;$2 [L]
#RewriteRule ^(.*)\.html$ index.php?dummy=1;action=$1 [L]

#Sitemaps
RewriteRule sitemap.xml sitemaps.php [L]
RewriteRule urllist.txt urllist.php [L]
« Last Edit: October 23, 2008, 10:18:31 by Jefekoi » Logged


Jefekoi
Newbie
*

Points: 0
Offline Offline

Posts: 2


« Reply #1 on: October 23, 2008, 11:15:49 »

Help me please Cry
« Last Edit: October 23, 2008, 21:17:41 by Jefekoi » Logged
jaman017
Guest
« Reply #2 on: September 22, 2011, 04:04:39 »

soory but i can't understand


Webmaster Questions
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.7 © Bloc
Valid XHTML 1.0! Valid CSS!