·  News ·  Travel ·  Food ·  Arts ·  Sciences ·  Sports ·  Advice ·  Religion ·  Life ·  Greensboro · 

Sitemap for Google - PHPBB 3 Mod

User avatar
by I show you something fantastic and you find fault.
Published on October 31st, 2006, 9:19 am
Rift: Advice
  
Modification Name: PHPBB Site Map for Google Mod
Modification Version:: 12 (8/11/2010)
Author: Liv Jones

Modification Description::
    PHPBB SiteMap for Google Mod produces an XML (by redirect) or pseudo XML compliant link tree for use with various sitemap submission softwares such as Google's Webmaster tools sitemap submission service or Yahoo's Site Explorer

Features:
    Simple installation, "upload and go" if your forum is in the root domain. Simply upload the PHP file (sitemap.php) and add the link to your index page. Otherwise, modify the domain variables in the top of the PHP file and off you go. The site-map provides real-time 24 hour data on topics to Search Engines down to the second.

Screenshots:
phpbb_sitemap_mod.jpg

Demo URL: sitemap.xml

Modification Download:

phpbb sitemap v12.zip
(3.35 KiB) Downloaded 85 times


Site Map Install Instructions:
    1) Download google_sitemap_for_phpbb_3.zip and decompress. (above)

    2) If Your PHPBB3 Forum is installed in the root folder, for instance at http://greensboring.com then skip "a"
      a) modify the $folder or $subdomain variable to match your forum. An example is given at the top of the PHP code.
    3) Upload to your forum root folder. (where PHPBB's index.php is)
    4) Access your PHPBB's index.php from your forum root folder and open it for editing, find:
    Code: Select all
    'TOTAL_POSTS'   => sprintf($user->lang[$l_total_post_s], $total_posts),

    After that add:
    Code: Select all
    'SITE_MAP' => '<a href="sitemap.php" title="sitemap" rel="alternate" type="application/rss+xml">SiteMap</a> by <a href="http://greensboring.com/">Greensboring.com - Outside the media. Beyond the News.</a>',

    5) Go into your administrator control panel -> styles -> template -> edit -> "index_body.html" ->
    find in template:
    Code: Select all
    <!-- INCLUDE overall_footer.html -->


    before it add:
    Code: Select all
    {SITE_MAP}


    Click submit, and you're almost done...

    6) Submit to Google, at Google Sitemaps.

      This sitemap also works for Yahoo, (and others) etc. If you wish to submit it you may do so at Yahoo Site Explorer

    7) Go get a lovely pint of Guinness and drink because you are officially done!

    EXTRA CREDIT!!!! (optional)
    Advanced users may wish to add to their .htaccess file the following command to make it fully xml compliant. This really has no effect on anything unless a random bot comes along looking for a sitemap.xml. I would honestly just recommend skipping this, unless it's important to you to have it as sitemap.xml

    add (or create) in .htaccess file
    Code: Select all
    Options +FollowSymlinks
    RewriteEngine on
    RewriteRule sitemap.xml sitemap.php [NC]


PHPBB3 Sitemap Change Log:
    Ver 12 (and prior) Changes:
    -Updated code to handle parent forums and "1969" issue with Google sitemaps.
    -Depreciated file_get_contents() in favor of Curl. (hat-tip to Marcel)
    -Added Limits to the number of URLs, set default to Google's 50,000 Max.
    -Fixed glitch where forums with subforums wouldn't display topics or forums.
    -Added a echo statement for path if script die()'s because of faulty path.
    -XML Compliant Header added.
    -Corrected last mod tags format for W3c standards.
    -Added LastMod tags to sitemap with data pulled from phpbb3 database.
    -Only displays non-private content of both forums and topics.
    -Non-Indexable forums have been removed from the sitemap.
    -Changed Mysql_fetch_array to sql_fetchrow per Dave Turner to solve database compatibility issues.
    -Add subdomain variable for ease. Allows user to change domain if not set by server.
    -Pulls PHPBB prefix from config.php
    -removed the need to state domain and path. Made it more intuitive by only needing to state folder of PHPBB install.
    -Moved Forums to be listed last.
    -Changed viewtopic posts to only those that are approved.
    -List latest topics first rather then last.
October 31st, 2006, 9:19 am   Share
 
thanks will give a try good that someone makes sitemapper for phpbb regards
September 16th, 2008, 6:08 pm
pr10google
 
HI

now i can see below in my google webmaster page -

Status OK
Total URLs in Sitemap 59
Indexed URLs in Sitemap Help Help No data available. Please check back soon.

PLZ TELL WAT THIS MEANS ???????????????????No data available. Please check back soon.
October 28th, 2008, 1:27 pm
Guest
 
Indexed URLs mean the URLs which actually appear in Google's index. You can see the URLs for your website that appear in Google's index by using the site command in the Google search box.

Code: Select all
Site:mydomain.com


Generally URLs that appear in your sitemap show up in the index based on algorithmic performance indicators, in 24 hours to 30 days in my experience. Though I've found the RSS feature can quicken indexing.
October 28th, 2008, 6:02 pm
User avatar
Liv
I show you something fantastic and you find fault.
 
Posts: 10595
Joined: October 5th, 2005, 1:59 pm
Location: Greensboro, NC
I was able to install the sitemap.php at my forum then i submited the sitemap.php to google webmastertools site.

Google reads it but there are no words inside the list where google shows what the googlebot does see.
The XML Sitemaps page shows 231 read pages, but when i search the net for any of the words inside the forum there are no hits.


when i run the script asthe bot would do, then i receive a page with lots of lines like this:

<url>
<loc>http://forum.konsolenpunkt.de/viewtopic.php?f=45&t=151</loc>
</url>

can anybody help me?
April 14th, 2009, 4:38 pm
TecD0c
 
Posts: 1
Joined: April 11th, 2009, 2:46 pm
Hi,

Giving Google bot the sitemap is one thing. Now you'll have to wait few days until it will pull the sitemap and process it for their search engine.

Lots of line is great! that means Google can process each link and add it to their engine.

I would also suggest for you to *make sure* that Googlebot can actually access your forum messages. I had an issue that google didn't index my forum for few weeks even when I gave him my sitemap. Apparently, I didn't let their bot to access the content :)

Try installing in your firefox "user agent switcher" and then switch the user-agent to Google-bot, and try accessing different parts of your forum to see if Googlebot will be able to access them as well. See more info here

Good luck,
Hetz
April 14th, 2009, 5:28 pm
User avatar
hetz
 
Posts: 1
Joined: February 20th, 2009, 7:31 pm
TecD0c wrote:I was able to install the sitemap.php at my forum then i submited the sitemap.php to google webmastertools site.

Google reads it but there are no words inside the list where google shows what the googlebot does see.
The XML Sitemaps page shows 231 read pages, but when i search the net for any of the words inside the forum there are no hits.


when i run the script asthe bot would do, then i receive a page with lots of lines like this:

<url>
<loc>http://forum.konsolenpunkt.de/viewtopic.php?f=45&t=151</loc>
</url>

can anybody help me?


Well your sitemap is working flawless. The "lines" are the psuedo XML which Google will read and try to index. Remember, all a sitemap does is "submit" the content to Google, it does not necessarily mean Google will include it.

Your site is lower in page-rank, so it may take time. Get inbound links, and you should see an increase in the number of indexed pages.

Another helpful step is to look at this page: SEO for PHPBB which can do a lot for making things easier on Googlebot. After all we don't want to stress the little guy (or gal) out. (If you haven't already)
April 14th, 2009, 7:17 pm
User avatar
Liv
I show you something fantastic and you find fault.
 
Posts: 10595
Joined: October 5th, 2005, 1:59 pm
Location: Greensboro, NC
StoneRanger wrote:Thanks for the code!

On Google Webmaster, the status for the sitemap gives me a caution sign. Is this normal? Downloading the table showed it as a warning. I did change the .htaccess edit at first, but changed it back and the caution sign still shows up after a delete and submit.


I have seen on some installs where the timestamp is showing up without the GMT adjustment, meaning instead of this:

Code: Select all
<lastmod>2009-08-14T06:47:14-05:00</lastmod>


It's echoing:

Code: Select all
<lastmod>2009-08-14T06:47:14P</lastmod>


Which I believe Google can still parse, but isn't necessarily correct. It could be a server configuration error, or perhaps merely that the server isn't running PHP4/5 yet...

If you post your URL, I'll be glad to see what I think...
August 14th, 2009, 7:09 am
User avatar
Liv
I show you something fantastic and you find fault.
 
Posts: 10595
Joined: October 5th, 2005, 1:59 pm
Location: Greensboro, NC
Thanks for the amazing mod.
August 20th, 2009, 12:03 am
snow
 
Posts: 3
Joined: August 19th, 2009, 11:31 pm
Your welcome...

I'd also like to thank, "God", his son "Jesus" whom without this mod it couldn't be possible.... My mother, and father, grandmother, grandfather.... the people of wales, the queen of England, Barack Obama..... the secret society of Greensboring.... and my cat Sunshine... thank you, all of you.
August 20th, 2009, 6:50 am
User avatar
Liv
I show you something fantastic and you find fault.
 
Posts: 10595
Joined: October 5th, 2005, 1:59 pm
Location: Greensboro, NC
Hi.

Im using php3 seo mod and my urls are like phpbb3.com/a-new-topic/

in your sitemap mod the urls will go /viewtopic.php?f=6&t=3329

How can I change this?
September 7th, 2009, 4:37 am
Sj0din
 
You can use the mod in the form it is if the pages are reachable by both URLs and you use a canacolization tag on your pages....

else you can revert back to the original PHPBB url architecture...

else I'd be glad to write you a custom version for a few hundred dollars.
September 7th, 2009, 7:18 am
User avatar
Liv
I show you something fantastic and you find fault.
 
Posts: 10595
Joined: October 5th, 2005, 1:59 pm
Location: Greensboro, NC
Liv is there a way to remove certain forums from being generated in the sitemap?
And since this is constantly updated, do I have to resubmit everyday to Google?
How many times should I resubmit the sitemap?

Regards,
snow
September 7th, 2009, 3:29 pm
snow
 
Posts: 3
Joined: August 19th, 2009, 11:31 pm
snow wrote:Liv is there a way to remove certain forums from being generated in the sitemap?
And since this is constantly updated, do I have to resubmit everyday to Google?
How many times should I resubmit the sitemap?

Regards,
snow


Yes, under forum administration in your ACP change this option to "no" for the forums you don't want included:
Code: Select all
Enable search indexing:
If set to yes posts made to this forum will be indexed for searching.


And... No... you should never have to re-submit the sitemap after the first time, Google is intelligent enough to check the sitemap prior to crawls. If your site is popular enough you'll see it automatically updated with crawl dates every so many days. The only time you would want to resubmit the sitemap is if your site suffered a pro-longed outage resulting in Google not finding the sitemap for prolonged period of time.
September 7th, 2009, 4:44 pm
User avatar
Liv
I show you something fantastic and you find fault.
 
Posts: 10595
Joined: October 5th, 2005, 1:59 pm
Location: Greensboro, NC
I'm pretty new to all this, so please forgive me if this is an ignorant question.

My site uses the subsilver2 template. When I came to edit index_body.html I could not find the

<!-- INCLUDE overall_footer.html -->

line of code, which does exist in the prosilver template.

Is there a way to use this mod with the subsilver2 template?
March 19th, 2010, 10:58 pm
newbie111
 
That's okay... basically just add

Code: Select all
{SITE_MAP}


...anywhere at the bottom of the template and you'll be fine. You can even move it where you want.... it just adds a link to your sitemap so crawlers can find it, and a courtesy link to my site for all my hardwork. That's all.

As long as the info appears on your index page you'll be fine.
March 20th, 2010, 8:41 am
User avatar
Liv
I show you something fantastic and you find fault.
 
Posts: 10595
Joined: October 5th, 2005, 1:59 pm
Location: Greensboro, NC
Thanks heaps, it works just great :D
March 21st, 2010, 7:04 pm
newbie111
 
Hello,

Will this work with SEF urls?

Thanks!
April 12th, 2010, 8:28 am
jv
 
Indirectly if you have the proper redirects.... Google should be able to find it, but unfortunately this does not alter PHPBB's URL structure on its own.
April 12th, 2010, 5:31 pm
User avatar
Liv
I show you something fantastic and you find fault.
 
Posts: 10595
Joined: October 5th, 2005, 1:59 pm
Location: Greensboro, NC
Thanks it worked..
April 25th, 2010, 9:03 am
Jackz
 
miimii wrote:What could cause this: 'TOTAL_POSTS'=> sprintf($user->lang[$l_total_post_s], $total_posts),'SITE_MAP' => 'SiteMap by Greensboring.com - Outside the media. Beyond the News.',[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4284: Cannot modify header information - headers already sent by (output started at /index.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4286: Cannot modify header information - headers already sent by (output started at /index.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4287: Cannot modify header information - headers already sent by (output started at /index.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4288: Cannot modify header information - headers already sent by (output started at /index.php:1)


Assuming that this problem didn't occur until you tried to modify your index.php with the code in in this mod, then I assume it's just a syntax error. Perhaps a comma or a quote was removed accidentally in the copy and paste from a subsequent line?

You should have something like this:

Code: Select all
$template->assign_vars(array(
                'TOTAL_POSTS'   => sprintf($user->lang[$l_total_post_s], $total_posts),
                'SITE_MAP' => '<a href="sitemap.php" title="sitemap" rel="alternate" type="application/rss+xml">SiteMap</a> by <a href="http://greensboring.com/">Greensboring.com - Outside the media. Beyond the News.</a>',
   'TOTAL_TOPICS'   => sprintf($user->lang[$l_total_topic_s], $total_topics),
   'TOTAL_USERS'   => sprintf($user->lang[$l_total_user_s], $total_users),
   'NEWEST_USER'   => sprintf($user->lang['NEWEST_USER'], get_username_string('full', $config['newest_user_id'], $config['newest_username'], $config['newest_user_colour'])),
May 8th, 2010, 1:56 pm
User avatar
Liv
I show you something fantastic and you find fault.
 
Posts: 10595
Joined: October 5th, 2005, 1:59 pm
Location: Greensboro, NC
i really can´t seem to be able to fix it :(

the problem is just on the index-page, others work just well. could you take a look and help me out here a bit? :)

(NSW) address is http://dailycelebpixxx.atbhost.net/phpbb/
May 8th, 2010, 2:38 pm
miimii
 
I'd be glad to, unfortunately just looking at the index page doesn't tell what code we have... can you copy and paste the surround section of code you have basically including the several lines before the code change and the several lines after wards?
May 8th, 2010, 4:02 pm
User avatar
Liv
I show you something fantastic and you find fault.
 
Posts: 10595
Joined: October 5th, 2005, 1:59 pm
Location: Greensboro, NC
i have this on the top of my index-file:

Code: Select all
'TOTAL_POSTS'=> sprintf($user->lang[$l_total_post_s], $total_posts),'SITE_MAP' => '<a href="sitemap.php" title="sitemap" rel="alternate" type="application/rss+xml">SiteMap</a> by <a href="http://greensboring.com/">Greensboring.com - Outside the media. Beyond the News.</a>',<?php
May 10th, 2010, 9:20 am
Guest
 
Guest wrote:i have this on the top of my index-file:

Code: Select all
'TOTAL_POSTS'=> sprintf($user->lang[$l_total_post_s], $total_posts),'SITE_MAP' => '<a href="sitemap.php" title="sitemap" rel="alternate" type="application/rss+xml">SiteMap</a> by <a href="http://greensboring.com/">Greensboring.com - Outside the media. Beyond the News.</a>',<?php


There's the problem... Shouldn't be at the top... You need to delete everything before the

Code: Select all
<?php


Then find (ctrl-F)

Code: Select all
'TOTAL_POSTS'=> sprintf($user->lang[$l_total_post_s], $total_posts),


then directly below it add:

Code: Select all
'SITE_MAP' => '<a href="sitemap.php" title="sitemap" rel="alternate" type="application/rss+xml">SiteMap</a> by <a href="http://greensboring.com/">Greensboring.com - Outside the media. Beyond the News.</a>',


without erasing any other data. It should be appended to the style output.
May 10th, 2010, 6:56 pm
User avatar
Liv
I show you something fantastic and you find fault.
 
Posts: 10595
Joined: October 5th, 2005, 1:59 pm
Location: Greensboro, NC

Return to Advice



cron