MyBB Community Forums

Full Version: [Release] mybb 1.4 auto sitemap genrator
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
I was waiting for mavericck to upgrade his nice sitemap plugin
but he seems to be not here this days..
so I created this simple one and I would like to share it with you guys.

upload both attched files to your mybb root folder
and call sitemap_index.php via your browser. (u would submit this file to your google webmasters tools.)


2 things I would like to note here.

1- if u set your seo url's detection to be auto
the script will use non-seo url's. so if you use the seo url's you will need to make it active instead of auto detect.
2- all the credits for priorityIntelliSense function that used in this script goes to mavericck..

hope you like it.
Nice, Thanks!
Just a quick question before I try this: Does this sitemap generator use set_time_limit or attempt to change the amount of memory allowed in the PHP ini? If not, would this script run for more than 30 seconds on a forum of this size?
not it's not change the amount of allowed max_time_out in your php.ini
and no I don't think it can run if it excute the maximum allowed time out.
but as my experience, u can see my forum sitemap here http://www.dd4bb.com/sitemap_index.php
it's have 4000 url or so.. and it's not take more then few seconds..
Ok, so I have it running great (I made a MyBB task script to have Google updated hourly), but I noticed that it indexes ALL forums and threads, including ones that only administrators should be able to view. Can you maybe have it do a check if guests can read the forum/thread before it is added to the index?
as long as I can't see any fileds in the forums table, that give a values for the forum visibility status. the script can't decide what forum are public view able, and what is no.
but u can do it manualy and very easy..
let's say the forum id (the forum you don't want it to be indexed) is 18
edit sitemap_index.php find
$q2 = $db->simple_select('forums', 'fid, lastpost, threads', 'fid !=77 AND fid !=39 AND fid !=75 AND fid !=38');
(look at the part that have this values fid !=77 AND fid !=39 AND fid !=75 AND fid !=38 (it's included by mistake))
and replace it with
$q2 = $db->simple_select('forums', 'fid, lastpost, threads', 'fid !=18');

and the file has been updated to fix my mistake.
Thanks!!
Really thanks Toungue
Well what to do the output after running that sitemap_index file? I have this:

http://www.projectw.pk/sitemap_index.php

After i run this .. what to do with the output page.. What i mean is how to submit that to Google?
On Google.com, click 'Business Solutions', then click Webmaster Central then Sign into Webmaster Tools (you need a Google/Gmail account). Then you submit a site, verify it and submit the file on your site as the sitemap. You should also have a script that contacts Google every hour to keep it updated.
I have to say thank you much! I switched my domain and did a 301 redirect to the new domain but I also deleted all the forums and started from scratch due to phpBB conversion issues. All my old urls were no longer valid and the bots were indexing my 404 page. My new domain was basically non-existant in all the search engines. Now within a day, my site is in the google index. Now the only thing we need is a task to ping the big 3. I submitted to Yahoo and MSN but Yahoo is still wandering aimlessly and I've always had a problem with MSN. For MSN, you need to go to http://webmaster.live.com and sign in or create an account. Then you submit a sitemap. Then for the ping service you do like this: http://webmaster.live.com/webmaster/ping.aspx?siteMap=[your sitemap web address] so it looks like this: http://webmaster.live.com/webmaster/ping..._index.php . If anyone knows what all the ping url's are, we could make a simple task file to auto ping once a day or however often you think it needs to run.
Pages: 1 2 3 4