[Archive] mx Sitemaps 0.0.1

Support for the phpBB2 SEO mods released in the phpBB2 SEO Toolikt forum.

Moderator: Moderators

Postby dcz » Tue Jul 25, 2006 4:51 pm

All right the whole thing is :

open :

includes/sessions.php

find :

Code: Select all
            // mx Sitemaps Module (cat URL injection)
            //"'(?)sitemaps([0-9]+)\.html(".$amp."){0,1}'",


replace with :
Code: Select all
            // mx Sitemaps Module (cat URL injection)
            "'(?)sitemaps([0-9]+)\.html(".$amp."){0,1}'",


find :

Code: Select all
             // mx Sitemaps Module (cat URL injection)
             //"".format_url($seo_cat_name)."-sc\\1.html".if_query('\\2')."",



replace with :

Code: Select all
             // mx Sitemaps Module (cat URL injection)
             "".format_url($seo_cat_name)."-sc\\1.html".if_query('\\2')."",



find :

Code: Select all
            // mx Sitemaps Module (forum URL injection + pagination)
            //"'(?)forum-map([0-9]+)\.html".$amp."start=([0-9]+)(".$amp."){0,1}'",
            //"'(?)forum-map([0-9]+)\.html(".$amp."){0,1}'",


replace with :

Code: Select all
            // mx Sitemaps Module (forum URL injection + pagination)
            "'(?)forum-map([0-9]+)\.html".$amp."start=([0-9]+)(".$amp."){0,1}'",
            "'(?)forum-map([0-9]+)\.html(".$amp."){0,1}'",


find :

Code: Select all
             // mx Sitemaps Module (forum URL injection + pagination)
             //"".format_url($seo_forum_name)."-fmp\\1-\\2.html".if_query('\\3')."",
             //"".format_url($seo_forum_name)."-fmp\\1.html".if_query('\\2')."",


replace with :

Code: Select all
             // mx Sitemaps Module (forum URL injection + pagination)
             "".format_url($seo_forum_name)."-fmp\\1-\\2.html".if_query('\\3')."",
             "".format_url($seo_forum_name)."-fmp\\1.html".if_query('\\2')."",


As you don't use mxBB you can delete :

Code: Select all
         // mx Sitemaps Module (mxBB map URL + pagination)
         //"'(?)mx-map\.html".$amp."start=([0-9]+)(".$amp."){0,1}'",


and :
Code: Select all
          // mx Sitemaps Module (mxBB map URL + pagination)
          //"mx-map\\1.html".if_query('\\2')."",


As you can see, it's just un-commenting lines of code, longer to explain than to do ;)

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21376
Joined: Fri Apr 28, 2006 9:03 pm

Advertisement

Postby legal » Wed Jul 26, 2006 8:43 am

OK, I've obviously done something very wrong. This is my sessions.php file:

Code: Select all
//
// Append $SID to a url. Borrowed from phplib and modified. This is an
// extra routine utilised by the session code above and acts as a wrapper
// around every single URL and form action. If you replace the session
// code you must include this routine, even if it's empty.
//
function append_sid($url, $non_html_amp = false)
{
   global $SID;   
   // www.phpBB-SEO.com SEO TOOLKIT BEGIN
   global $phpEx, $seo_cat_name, $seo_forum_name;
   $amp = ($non_html_amp) ? '&' : '&';
   $find = array(   $amp.'start=0',
         $amp.'postdays=0',
         $amp.'topicdays=0',
         $amp.'postorder=asc',
      );
   $url = str_replace ($find, "", $url);
   if ( $seo_cat_name ) {
      $urlin = array( "'(?)index.".$phpEx."\?c=([0-9]+)(".$amp."){0,1}'",
            // mx Sitemaps Module (cat URL injection)
            //"'(?)sitemaps([0-9]+)\.html(".$amp."){0,1}'",
         );
      $urlout = array( "".format_url($seo_cat_name)."-vc\\1.html".if_query('\\2')."",
            // mx Sitemaps Module (cat URL injection)
            //"".format_url($seo_cat_name)."-sc\\1.html".if_query('\\2')."",
         );
      $url = preg_replace($urlin, $urlout, $url);
   }
   if ( $seo_forum_name ) {
      $urlin = array( "'(?)viewforum.".$phpEx."\?f=([0-9]+)".$amp."start=([0-9]+)(". $amp ."){0,1}'",
            "'(?)viewforum.".$phpEx."\?f=([0-9]+)(".$amp."){0,1}'",
            // mx Sitemaps Module (forum URL injection + pagination)
            //"'(?)forum-map([0-9]+)\.html".$amp."start=([0-9]+)(". $amp ."){0,1}'",
            //"'(?)forum-map([0-9]+)\.html(". $amp ."){0,1}'",
         );
      $urlout = array( "".format_url($seo_forum_name)."-vf\\1-\\2.html".if_query('\\3')."",
            "".format_url($seo_forum_name)."-vf\\1.html".if_query('\\2')."",
             // mx Sitemaps Module (forum URL injection + pagination)
             "".format_url($seo_forum_name)."-fmp\\1-\\2.html".if_query('\\3')."",
             "".format_url($seo_forum_name)."-fmp\\1.html".if_query('\\2')."",
         );
      $url = preg_replace($urlin, $urlout, $url);
   }
   $urlin = array( "'(?)viewtopic.".$phpEx."\?t=([0-9]+)".$amp."start=([0-9]+)(". $amp. "){0,1}'",
         "'(?)viewtopic.".$phpEx."\?t=([0-9]+)(".$amp."){0,1}'",   
               "'(?)viewtopic.".$phpEx."\?p=([0-9]+)(".$amp."){0,1}'",
         "'(?)profile.".$phpEx."\?mode\=viewprofile".$amp."u=([0-9]+)(". $amp ."){0,1}'",
         // mx Sitemaps Module (mxBB map URL + pagination)
         //"'(?)mx-map\.html".$amp."start=([0-9]+)(".$amp."){0,1}'",
      );
   $urlout = array( "topic\\1-\\2.html".if_query('\\3')."",
         "topic\\1.html".if_query('\\2')."",
         "post\\1.html".if_query('\\2')."",   
         "member\\1.html".if_query('\\2')."",
         // mx Sitemaps Module (mxBB map URL + pagination)
         //"mx-map\\1.html".if_query('\\2')."",
      );
   $url = preg_replace($urlin, $urlout, $url);
   $url = (substr($url, strlen($url) - 1, 1) == '?') ? substr($url, 0, strlen($url) - 1) : $url;
   // www.phpBB-SEO.com SEO TOOLKIT END

   if ( !empty($SID) && !preg_match('#sid=#', $url) )
   {
      $url .= ( ( strpos($url, '?') !== false ) ?  ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID;
   }

   return $url;
}
?>
legal
 
Posts: 42
Joined: Wed Jul 05, 2006 3:22 pm

Postby dcz » Wed Jul 26, 2006 8:57 am

I am sorry it really is simple.

Change your append_sid function (eg the code you posted) with :
Code: Select all
function append_sid($url, $non_html_amp = false)
{
   global $SID;   
   // www.phpBB-SEO.com SEO TOOLKIT BEGIN
   global $phpEx, $seo_cat_name, $seo_forum_name;
   $amp = ($non_html_amp) ? '&' : '&';
   $find = array(   $amp.'start=0',
         $amp.'postdays=0',
         $amp.'topicdays=0',
         $amp.'postorder=asc',
      );
   $url = str_replace ($find, "", $url);
   if ( $seo_cat_name ) {
      $urlin = array( "'(?)index.".$phpEx."\?c=([0-9]+)(". $amp ."){0,1}'",
            // mx Sitemaps Module (cat URL injection)
            "'(?)sitemaps([0-9]+)\.html(". $amp ."){0,1}'",
         );
      $urlout = array( "".format_url($seo_cat_name)."-vc\\1.html".if_query('\\2')."",
            // mx Sitemaps Module (cat URL injection)
            "".format_url($seo_cat_name)."-sc\\1.html".if_query('\\2')."",
         );
      $url = preg_replace($urlin, $urlout, $url);
   }
   if ( $seo_forum_name ) {
      $urlin = array( "'(?)viewforum.".$phpEx."\?f=([0-9]+)".$amp."start=([0-9]+)(" . $amp ."){0,1}'",
            "'(?)viewforum.".$phpEx."\?f=([0-9]+)(". $amp ."){0,1}'",
            // mx Sitemaps Module (forum URL injection + pagination)
            "'(?)forum-map([0-9]+)\.html".$amp."start=([0-9]+)(". $amp ."){0,1}'"  ,
            "'(?)forum-map([0-9]+)\.html(". $amp ."){0,1}'",
         );
      $urlout = array( "".format_url($seo_forum_name)."-vf\\1-\\2.html".if_query('\\3')."",
            "".format_url($seo_forum_name)."-vf\\1.html".if_query('\\2')."",
             // mx Sitemaps Module (forum URL injection + pagination)
             "".format_url($seo_forum_name)."-fmp\\1-\\2.html".if_query('\\3')."",
             "".format_url($seo_forum_name)."-fmp\\1.html".if_query('\\2')."",
         );
      $url = preg_replace($urlin, $urlout, $url);
   }
   $urlin = array( "'(?)viewtopic.".$phpEx."\?t=([0-9]+)".$amp."start=([0-9]+)(". $amp ."){0,1}'",
         "'(?)viewtopic.".$phpEx."\?t=([0-9]+)(". $amp ."){0,1}'",   
               "'(?)viewtopic.".$phpEx."\?p=([0-9]+)(". $amp ."){0,1}'",
         "'(?)profile.".$phpEx."\?mode\=viewprofile".$amp."u=([0-9]+)(". $amp ." ){0,1}'",

      );
   $urlout = array( "topic\\1-\\2.html".if_query('\\3')."",
         "topic\\1.html".if_query('\\2')."",
         "post\\1.html".if_query('\\2')."",   
         "member\\1.html".if_query('\\2')."",
      );
   $url = preg_replace($urlin, $urlout, $url);
   $url = (substr($url, strlen($url) - 1, 1) == '?') ? substr($url, 0, strlen($url) - 1) : $url;
   // www.phpBB-SEO.com SEO TOOLKIT END

   if ( !empty($SID) && !preg_match('#sid=#', $url) )
   {
      $url .= ( ( strpos($url, '?') !== false ) ?  ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID;
   }

   return $url;
}
?>



If you look at it, I only got rid of some "//" at the beginning of the lines of code I mentioned.

Maybe you should use an editor with highlight capabilities, it makes it very simple to find comments.

This is a comment.
Code: Select all
             // mx Sitemaps Module (forum URL injection + pagination)



++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21376
Joined: Fri Apr 28, 2006 9:03 pm

Postby legal » Tue Aug 01, 2006 9:04 am

Thanks it's all working.
:D
legal
 
Posts: 42
Joined: Wed Jul 05, 2006 3:22 pm

Postby dcz » Tue Aug 01, 2006 10:06 am

Nice indeed :D

I think you should install the auto link add on to show up links to your sitemaps, you'll just need to install this simple one and to apply this patch (the php part as you already did the .htaccess).

Then, have you noticed the sitemap index was acp configurable ? You can add links sorted in categories ;)

As well, one of this mod's most powerful feature, as far as Search Engine Optimization, is the last active topic listing configurable on all pages (there is a small bug on index, but very simple). Because it will make the page be different upon every new post, thus every bot's visit most likely.
Search Engine Bots will thus love to crawl those pages because they'll be always updated.

And this will lead to those pages having better PageRank to transmit to your forum's pages.

Here an example.
-http://www.pixelistes.com/portal/ PR 3 <= home
-http://www.pixelistes.com/portal/sitemaps.html PR 3 <= sitemap index
-http://www.pixelistes.com/portal/forum-map.html PR 3 <= forum map
-http://www.pixelistes.com/portal/panoramas-fmp85.html PR 1 <= forum n°85 map.

These PageRank are the very first to be obtained by the mx sitemaps pages. The mod was installed a month and a half before last Google dance (July 06), so these are the very first PageRank obtained.

As you can see, the PageRank transmission is not a myth :D and mod rewritten URLs do transmit it better, I mean, the same PageRank as the Home with only internal linking is a real good result.

And as well, if the forum n°xx map only get a PR1 this first time, it's still very good for a deeper page like this after this few amount of time. Let's wait one or two more Google dance and PageRank will be transmitted from the sitemap index to the forum maps and to you forum :D
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21376
Joined: Fri Apr 28, 2006 9:03 pm

Postby legal » Wed Aug 02, 2006 7:53 am

Thanks - is there a way to show the last active topic on the index page?
That would be great!
:wink:
legal
 
Posts: 42
Joined: Wed Jul 05, 2006 3:22 pm

Postby dcz » Wed Aug 02, 2006 7:55 am

Atually yes, but you need to apply this small patch with 0.0.1, then, the acp switch will work ;)

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21376
Joined: Fri Apr 28, 2006 9:03 pm

Postby legal » Wed Aug 02, 2006 12:02 pm

Thanks, I've done that but how do I get the link to show on my index page please?
legal
 
Posts: 42
Joined: Wed Jul 05, 2006 3:22 pm

Postby dcz » Wed Aug 02, 2006 1:38 pm

Go to mx Sitemaps ACP and look for the Last Active Topics settings ;)

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21376
Joined: Fri Apr 28, 2006 9:03 pm

Postby dcz » Sat Aug 12, 2006 6:16 pm

One other bug fix :


Open :

Code: Select all
includes/SitemapIndex.php

Find :

Code: Select all
         $sitemap_cat_url = ($Sitemaps->rewrite_sitemaps) ? 'sitemaps'.$id.'.html' : "sitemaps.$phpEx?" . POST_CAT_URL . "=" . $title['sm_id'];


Replace With :
Code: Select all
         $sitemap_cat_url = ($Sitemaps->rewrite_sitemaps) ? 'sitemaps'.$title['sm_id'].'.html' : "sitemaps.$phpEx?" . POST_CAT_URL . "=" . $title['sm_id'];


This will fix category linking on the site map index when using mod Rewrite.

We are getting close to next version.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21376
Joined: Fri Apr 28, 2006 9:03 pm

Postby AmirAbbas » Tue Aug 15, 2006 7:37 am

hello again

i think i found a little bug in MX sitemap

see this two page

-http://forum.irani.ch/sitemaps.html
-http://forum.irani.ch/forum-map.html

please see the source code of that two pages
all persian characters are changed to ascii code
for example see the title of the page

Code: Select all
<title>& #1606;& #1602;& #1588;& #1607; & #1578;& #1575;& #1604;& #1575;& #1585;</title>
User avatar
AmirAbbas
phpBB SEO Team
phpBB SEO Team
 
Posts: 534
Joined: Thu May 11, 2006 3:30 pm
Location: IRAN

Postby dcz » Tue Aug 15, 2006 8:21 am

It's no big deal, actually, as long as they are outputted correctly.

Then, I am not even sure browser shows us all the correct encoding, you remember, sometime you see Persian letters in the code but you don't know if it's either UTF-8 or Html ASCII.

Here I am not sure why these are outputted in html ASCII, the site map index titles comes from the mods Lang file, it could come from it.

Actually the fact -http://forum.irani.ch/forum-fmp1.html shows us a mixed title (actually for this file, the title partly comes from the Lang file and the php file as well.

So I'd bet on setlocale() in the lang_sitemaps_main.php, but I am not sure.

By the way I find the UTF-8 version really nice on this site :D

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21376
Joined: Fri Apr 28, 2006 9:03 pm

Postby AmirAbbas » Tue Aug 15, 2006 8:30 am

you mean that its not a problem ? :roll:
User avatar
AmirAbbas
phpBB SEO Team
phpBB SEO Team
 
Posts: 534
Joined: Thu May 11, 2006 3:30 pm
Location: IRAN

Postby dcz » Tue Aug 15, 2006 8:34 am

Well, not this much.

Actually, all Persian words posted here are coded in HTML ascii, and you remember Google do find those ;)

As long as they show up right, it's ok, but have you checked the mx sitemaps Lang file encoding?

Because if not so, I guess it's our browser to trick us on the final encoding, but the fact some title appear mixed html ASCII and UTF-8 suggest it's the setlocale().

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21376
Joined: Fri Apr 28, 2006 9:03 pm

Postby AmirAbbas » Wed Aug 16, 2006 6:01 am

:oops:

my language file had problem
i had translated language file to persian but i forgot to save it in UTF-8
i had saved it in iso-8859-1 charset and all the character were changed to ASCII code :oops:
User avatar
AmirAbbas
phpBB SEO Team
phpBB SEO Team
 
Posts: 534
Joined: Thu May 11, 2006 3:30 pm
Location: IRAN

PreviousNext

Return to phpBB2 SEO MODS

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 3 guests


 
cron