This is a PHP script that generates a sitemap file from an SMF installation with PrettyURLs mod, which is a must-have SEO package. The generated XML can be submitted to Google via Google Webmaster Tools.
The script is very much the http://code.google.com/p/smf-pretty-sitemap itself. It has been modified to work with the latest version of SMF and PrettyURLs. The raw modifications can be seen in this commit https://github.com/xtranophilist/sitemap-for-smf/commit/d9501e85b4704860f24b58acf1dabefbb1bc7e46
mysql_query is used instead of SMF's
db_query (or the latest
$smcFunc['db_query']). The database field names have been corrected to
match the latest version of SMF. Support for search-engine friendly URLs
for member profiles (e.g.
http://mysite.com/profile/username) has been
added. Users may switch to not-pretty URLs (e.g.
http://mysite.com/index.php?action=profile;u=2 ) by modifying the boolean
FALSE at the start of the script. Also, the
retrieval of pretty URLs for topics had to be corrected by adding the
Tested against one live forum and it works fine, zero errors or warnings from Google Webmaster Tools.
Gist on Github:
Raw PHP File :