dmorison - 12:37 pm on May 22, 2013 (gmt 0)
Can you explain how you setting the lastmod to the last comment date, i also have a forum section in my site.
When I created mine I studied the code that generates the index page for humans to find out how to query the thread list and date/time of the last comment and then it's a case of creating a script which executes that query and outputs the results in the required format.
Have a search for "[your forum script] dynamic xml sitemap lastmod" - somebody may already have created similar for whatever system you're using.
Don't forget that you can have multiple sitemaps - the only restriction is that they can only map URLs at or below their own location, so if you found a dynamic script for your forum software, and it is installed in the /forum/ folder you could still use your generator script (with the /forum/ folder excluded) to make:
...and at the same time serve:
...to map forum pages with LastMod