I’ve been using e107 as a content management for over two years. The old stratosector was actually a portal using this CMS and i did quite a work on it. I coded a few plugins and the tournaments one was quite a success. Recently, as you all know, i closed up my portal and created a small “portfolio” site. But, there where news items and forum posts i didn’t want to lose. So, naturaly, i started googling for an archive solution for the e107 platform.
Unfortunately, i didn’t come up with anything and since i needed it i decided to code a simple one my self. It is actually a team of two very simple scripts. What each of them does is connect to the db of the e107 base, select the news/forum posts and export them individualy to a simple HTML file with the name of the news id or thread id. Moreover, it creates a simple index file that lists all the news/forum posts for easy access. Pretty simple isn’t it?
What you need to setup is the db access variables along with the head titles for the index pages. On e107_forum_export.php you need to define this block:
$server = 'localhost';
$db = 'test';
$user = 'test';
$pass = 'testpass';
$forum_title = 'YOURSITE Fora';
In the e107_news_export.php you need to define this:
$server = 'localhost';
$db = 'test';
$user = 'test';
$pass = 'testpass';
$news_title = 'YOURSITE News';
Actually, as you can see, this is the same block on both files. One more thing i’d like to add is that for both exporters there is a style.css file provided so you can tweak your archives as you need. You can see an example of the news archive here and the forum archive here.
To use the scripts here is what you need to do:
- Setup the script variables on both files as described above.
- Put the forum and news folder on a folder with write permissions to the scripts.
- Run both scripts either by accessing them with a browser or running them with the php command line. If nothing is outputted then everything went fine. Else, check out the errors.
- When run successfully, in the two folders there should be an index.html file with an index to all the news/forum posts and .html files for each individual post.
- Take the folders (without the .php files) and upload them anywhere you want the archive and you are done!
Now, if no error is echoed and you get no .html files then please check your php error reporting level (it should be set to echo both errors and warnings) on the php.ini file, because something went wrong and you didn’t get a notice for it.
Finally, if you use it and like it please consider leaving a link on your archives back here and please just say a thanks here (consider it as a “thanksware” script 🙂 ). For any problems or any help you need please feel free to post a comment here and i’ll be more than glad to help you!
Download the package here: [download#3#size]
That’s nice,but why don’t you use a php script or something to make your archives a little bit more beautiful?
@#FN$#: that’s the point mate… to have it as simple as i can…. it’s like an export.
Well I’m a little bit confused,but could be useful to you something like that??
no. the point of the script is to create an HTML file for each thread on the forum and each news post. also it creates an index file for all the threads/news. it’s exactly as the ones in stratosector. it’s not a directory lister it’s a forum/news exporter/archiver.
😕 OK,you know better! 😛