MyBB Community Forums

Full Version: Custom forum for blogs?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm mulling over different approaches to a custom plugin for my site. I'd be willing to make the code available though I don't know how useful it'd be.

Basically, users will use a custom forum as a logbook. Members of a particular group can create new entries in the forum (no problem) but the newthread.php page would be customized with several required fields - location, date, etc. Those fields would then be used to create a modified display for the thread, as well as their ordinary content. All registered users could then add replies and comments, just not new threads. Sort of a blog system built in as a forum.

Right now I'm thinking just make a custom template for the newthread.php and so on, but it's making my head hurt at the number of changes required and limiting those changes to a specific forum. Thoughts on making this easier?
I've actually done something like this myself. Easy thing to do is hack the templates cache.

Eg:
$plugins->add_hook('newreply_end', 'myhook');
function myhook()
{
 global $templates;
 $templates->cache('my_custom_template');
 // display the template my_custom_template instead of newreply
 $templates->cache['newreply'] = &$templates->cache['my_custom_template'];
}
You'll need to add the necessary forum ID checks.
(2008-08-13, 06:59 AM)ZiNgA BuRgA Wrote: [ -> ]I've actually done something like this myself. Easy thing to do is hack the templates cache.
Interesting idea, thanks. That does seem simpler than the route I was going down.