Author: L. 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. The file is tiny, and simple to install.
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:
Demo URL: sitemap.php
Modification Download:
Site Map Install Instructions:
- 1) Download the above sitemap in Zip form and decompress on your computer. (above)
- Code: Select all
'TOTAL_POSTS' => sprintf($user->lang[$l_total_post_s], $total_posts),
- Code: Select all
'SITE_MAP' => '<a target="_blank" href="sitemap.php" title="sitemap" rel="alternate" type="application/rss+xml">SiteMap</a> by <a target="_blank" href="http://www.livjones.com">Liv</a>',
- Code: Select all
<!-- INCLUDE overall_footer.html -->
- Code: Select all
{SITE_MAP}
- Code: Select all
Options +FollowSymlinks
RewriteEngine on
RewriteRule sitemap.xml sitemap.php [NC]
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.
4) Access your PHPBB's index.php from your forum root folder and open it for editing, find:
After that add:
5) Go into your administrator control panel -> styles -> template -> edit -> "index_body.html" ->
find in template:
before it add:
(Running a SubSilver or a custom theme? No problem... just add it where you feel most comfortable in the template)
Click submit, and you're almost done...
6) Submit to Google, at Google Sitemaps.
- This sitemap also works for Bing, (and others) etc. If you wish to submit it you may do so at Bing Webmaster Tools (formerly 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
PHPBB3 Sitemap Change Log:
- Version: 18 (and prior) Changes:
-Split Sql requests into forums for use in large forums (v18)
-Added NOINDEX X-tag header (v17)
-Fixed cURL extension issue, when extension is not installed.
-Added Gzip compression which greatly increases the speed.
-Refined SQL SELECTs to speed reduce resource overhead.
-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 than last.