HTML Forum archive
#1
Sorry if it's the wrong forum to ask, but would there be a way with existing MyBB functions / functionalities to make a php script to export the forum in a XHTML / HTML archive that can be viewed offline? I just want to know the feasibility of this, I know my way around myBB a bit and I can code php.

Ideally I'd like to excluse some forums IDs but this can come later. The archive should keep thread images if possible but probably not avatars.

Would this be a lot of work?
Reply
#2
This user has been denied support. This user has been denied support.
Visit your ACP>Configuration>Server and Optimization, here you will find at the top a few settings pertaining to search engine friendly URL's, make sure yours has Search engine friendly URL's on, as well as archive friendly URL's ( may be called something like archive in html) set to on.

Add the following code to your .htaccess file.
#SEO URL's
<IfModule mod_rewrite.c>
	RewriteEngine on
	RewriteRule ^forum-([0-9]+)\.html$ forumdisplay.php?fid=$1 [L,QSA]
	RewriteRule ^forum-([0-9]+)-page-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2 [L,QSA]

	RewriteRule ^thread-([0-9]+)\.html$ showthread.php?tid=$1 [L,QSA]
	RewriteRule ^thread-([0-9]+)-page-([0-9]+)\.html$ showthread.php?tid=$1&page=$2 [L,QSA]
	RewriteRule ^thread-([0-9]+)-lastpost\.html$ showthread.php?tid=$1&action=lastpost [L,QSA]
	RewriteRule ^thread-([0-9]+)-nextnewest\.html$ showthread.php?tid=$1&action=nextnewest [L,QSA]
	RewriteRule ^thread-([0-9]+)-nextoldest\.html$ showthread.php?tid=$1&action=nextoldest [L,QSA]
	RewriteRule ^thread-([0-9]+)-newpost\.html$ showthread.php?tid=$1&action=newpost [L,QSA]
	RewriteRule ^thread-([0-9]+)-post-([0-9]+)\.html$ showthread.php?tid=$1&pid=$2 [L,QSA]

	RewriteRule ^post-([0-9]+)\.html$ showthread.php?pid=$1 [L,QSA]

	RewriteRule ^announcement-([0-9]+)\.html$ announcements.php?aid=$1 [L,QSA]

	RewriteRule ^user-([0-9]+)\.html$ member.php?action=profile&uid=$1 [L,QSA]

	RewriteRule ^calendar-([0-9]+)\.html$ calendar.php?calendar=$1 [L,QSA]
	RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)\.html$ calendar.php?calendar=$1&year=$2&month=$3 [L,QSA]
	RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)-day-([0-9]+)\.html$ calendar.php?action=dayview&calendar=$1&year=$2&month=$3&day=$4 [L,QSA]
	RewriteRule ^calendar-([0-9]+)-week-(n?[0-9]+)\.html$ calendar.php?action=weekview&calendar=$1&week=$2 [L,QSA]

	RewriteRule ^event-([0-9]+)\.html$ calendar.php?action=event&eid=$1 [L,QSA]

	<IfModule mod_env.c>
		SetEnv SEO_SUPPORT 1
	</IfModule>
</IfModule>
#SEO URL's End


Now your forum should render pages in HTML, as well as the archive. If you need any help feel free to PM me.
[Image: BhenchodForumsBannerSmall.gif]
Reply
#3
as you know, basically MyBB uses Lite (Archive) Mode (eg.) & rss syndication (eg.)
may be you can analyze those codes & work on developing a export system ..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)