Sitemap For MyBB Forums
I set up a Forum for my Yamaha SRV250 using a subdomain and discovered I had to create a separate sitemap for it. So here’s the how to:
What we are going to use is the Google SEO plugin for MyBB. You need to get the PluginLibrary for this to work, so I’ll walk you through that first. Another thing we are going to do along the way is make these plugins compatible with MyBB 1.8.
(Note: I’m using a MacBook for this so some of the processes may be a little different than Windows. Leave a comment if you get stuck and I’ll try to help you out.)
- Download PluginLibary from Here. Unzip the file.
- We need to edit the php file to make it compatible with 1.8. I use Filezilla for editing and upload, so I go to the inc/plugins/pluginlibrary.php, file right click on it and choose edit.
- Go to the function plugin_name_info section and find the line that reads:
'compatibility' => '16*',
-
Change the number to 18*
-
Save, Close then Upload to your Forums root/inc/plugins folder
Now For Google SEO:
- Download the Plugin from Here. Unzip the file.
- Follow the above instructions 3, 4, and 5 for this file: /inc/plugins/google_seo/plugin.php to make it compatible with MyBB 1.8.
- Move everything in the /inc folder to the matching folders on your site. (Don’t forget the language files!)
Next up is some work on your forums, so:
- Open up your Admin Control Panel (ACP) and click on plugins in the Quick Access section on the left.
- At the bottom of the page, choose Install & Activate for PluginLibrary. (I got the message that this plugin doesn’t need to be activated, so I’m not sure if this is necessary.)
- Then choose Install & Activate for Google SEO.
- Click on Configure in the section telling you which parts are not enabled and turn on the SiteMap feature.
At this point we have to use the htaccess.txt file in your root folder to make a .htaccess file. (If you already are using .htaccess then you may be ahead of the game. But I’m a newbie when it comes to Apache so I’m not sure how things will work out.)
I used the command line to copy the file and change the name. Then I used nano to edit it.
After the:
<IfModule mod_rewrite.c>
RewriteEngine on
Add the following: (Replace the 2 areas in all caps):
# Some hosts require RewriteBase to make RewriteRules work.
RewriteBase /FORUM_ROOT_FOLDER/
# Google SEO workaround for search.php highlights:
# Make this rule the first rewrite rule in your .htaccess!
RewriteRule ^([^&]*)&(.*)$ http://YOUR_SITES_URL/$1?$2 [L,QSA,R=301]
# Google SEO Sitemap:
RewriteRule ^sitemap\-([^./]+)\.xml$ misc.php?google_seo_sitemap=$1 [L,QSA,NC]
# Google SEO URL Forums:
RewriteRule ^Forum\-([^./]+)$ forumdisplay.php?google_seo_forum=$1 [L,QSA,NC]
# Google SEO URL Threads:
RewriteRule ^Thread\-([^./]+)$ showthread.php?google_seo_thread=$1 [L,QSA,NC]
# Google SEO URL Announcements:
RewriteRule ^Announcement\-([^./]+)$ announcements.php?google_seo_announcement=$1 [L,QSA,NC]
# Google SEO URL Users:
RewriteRule ^User\-([^./]+)$ member.php?action=profile&google_seo_user=$1 [L,QSA,NC]
# Google SEO URL Calendars:
RewriteRule ^Calendar\-([^./]+)$ calendar.php?google_seo_calendar=$1 [L,QSA,NC]
# Google SEO URL Events:
RewriteRule ^Event\-([^./]+)$ calendar.php?action=event&google_seo_event=$1 [L,QSA,NC]
I had to comment out the first line (below) in the .htaccess file to get mine to work.
#Options -MultiViews +FollowSymlinks -Indexes
Then, I realized that my Apache didn’t have the mod_rewrite enabled so I used Webmin to enable it as so:
Webmin → Apache Webserver → Global Configuration → Configure Apache Modules → Check the Rewrite Mod → Click the enable checked mods button at the bottom
You can check your Apache by going to:
MyBB Admin Control Panel → Tools & Maintenance → View PHP Info
Then look in the second main section which should be labeled: Configuration apache2handler
Well, that got my sitemap generated and working so I could submit it to Webmaster tools. It looks like the other features in Google SEO could come in handy as well but they’ll have to wait until I have enough time to look into them.
Addendum: Webmaster tools is returning an error that the sitemap is html (which is not usable.) I haven’t figured out a fix yet, but will post an update.