It is time that one was built so I started on one today.
I am not building the next vB or even punBB - but rather a simple discussion area that is easy to control for admins and simplistic for users.
I also want to build something that will help people new to CI when building a site. Like any beginner will tell you, reverse engineering a complex script like phpBB is really hard - so I hope that I can build something really simple to take apart.
I think that I will use ReduxAuth for the user management as it is so simple (1 file) yet complete (forgot password?, groups, etc).
I finished a simple 4 table structure for the database and was able to finish a model and basic controller for the system. (You can download my work below.) Right now you can browse forums, topics, and posts but you can’t do much else.
I am looking for a some people that would like to help put this together. I don’t think that it would be too hard for a couple guys to knock off in a day.
Good stuff good stuff! I’d definately would like to help develop this! I’d even go as far as saying we don’t need a simple bulletin board, but a (reasonably) full featured engine. Something like the one we’re posting from now, but, as you say, easy to implement in CI sites, based on a well known auth system and relying on CI sessions so it’s easy to implement cross site logins (you can login with your forum id to post comments on other stuff too)
Yes, I love to make stuff as open-ended as possible so that the developer can decide what they want to do with it. Vanilla strayed from the standard forum style (vb,phpbb,etc) as an example - but I would rather build the forum engine and then let the dev chose how to display forums, topics, and replies.
If you look at my code you will see the functions fetch_topics() can be given all kinds of values to change what is returned. For example, if you set fetch_topics(array(‘count’ => true)); it will ONLY return a number of the rows instead of the actual rows.
You shouldn’t need a bunch of functions for fetching different kinds of topics - one function should be smart enough to figure out all your needs.
I’m totally with you! I was asked to do a large project (got handed to someone else in the end though) and they needed a forum too. I asked here and I got a reply that Vanilla was the handiest, but I really don’t like the way they display their categories, I much more like the traditional way all the major players (vBulletin, phpBB, this board) use.
Though it makes perfect sense to be able to do both! I guess you could hack Vanilla to display each category though… In the end, it’s just a bunch of queries.
I’m so glad that some one is taking this up! When you have it ready, I’d be happy to beta your software. I have a very close group of friends. If there’s anything broken, we’ll find it for sure!
I have four tables that store the 1) Forum Categories, 2) Forums, 3) Topics, 4) Posts/Replies.
When you browse a forum I list all the topics (limit 10) in that forum - but all good forums also show the USERNAME/ICON and the COUNT() of posts/replies to that topic.
Originally I was doing MASSIVE Left Joins in MYSQL that joined the USERS, COUNT(*) POSTS, and TOPICS tables so that I could get this data. However, after filling my DB with 3,000 users, 3,500 topics, and 13,000 posts/replies I decided that I would join the TOPICS/USERS tables so that I could show data on the TOPIC author - and then do a separate query to COUNT() the number of posts that match the topic id.
/* Fetch Topics and User data */ SELECT ci_forum_test_topics.*, ci_forum_test_users.email, ci_forum_test_users.username FROM (`ci_forum_test_topics`) JOIN `ci_forum_test_users` ON ci_forum_test_users.id = ci_forum_test_topics.user_id WHERE `forum_id` = '1' AND `status` = 1 ORDER BY `date` desc LIMIT 10
/* Count the Number of Replies */ SELECT COUNT(*) AS `numrows` FROM (`ci_forum_test_posts`) WHERE `topic_id` = '3473' AND `status` = 1 ORDER BY `date` desc
Does anyone know of a better way to do this? Some forums keep a post_count column in each topic row so that they know how many replies there are to that topic. This saves them from needing to run a COUNT() query.
However, don’t think that I want to mess with updating that number for each post that is added/deleted.
Not much help, I know. This may just be a matter of personal preference.
Since every site should use some form of caching - I think that running an extra COUNT query will be fine. I have loaded my system with 13,000 posts, 3,000 Topics and 3,000 users and even with 30 queries for the most advanced page it only takes 0.2 seconds on my slow system.
Add to that to fact that I would then cache that page for 1-2 mins and I don’t have to worry about the load anymore. Saved me from adding UPDATE `post_count` WHERE `id` = 3… queries throughout my code.
Seemed like a good idea to put this in SVN. I can only have 3 contributing members, but we’ll see what we do if we continue this, no?
If required i can move it to my assembla svn, where the only limit is 500mb, which can be upgraded
Thanks for the hosting offers - but I only need help with building the system right now. It is hosted on http://code.google.com/p/cxforum/ anyway.
I’m implementing this for the forum on my site. I’ll gladly work on developing some of this code. I’d like to be basing my work off the latest, though (so I don’t duplicate work that’s already been done). If you’re currently working on this project, can you let us know what you’ve done?
I am not very close to releasing it (or even having my ideas worked out) but I can tell you it will use the DX Auth system that was just released. I’ll post an update when I have something.