• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CodeIgniter Forum System / Discussion Area

#1
[eluser]Xeoncross[/eluser]
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. Wink


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.

UPDATE:

I have created a google code page for people to suggest things
http://code.google.com/p/cxforum/

#2
[eluser]Phil Sturgeon[/eluser]
PM'ed.

#3
[eluser]drewbee[/eluser]
That looks nice. Simple. Clean.

#4
[eluser]Bramme[/eluser]
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)

#5
[eluser]Xeoncross[/eluser]
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.

#6
[eluser]Bramme[/eluser]
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.

#7
[eluser]Bramme[/eluser]
Sorry for double post, but to bring this to the attention: I've added this to my (free) beanstalk account: http://brammm.svn.beanstalkapp.com/cxforum/trunk/

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?

#8
[eluser]Mark LaDoux[/eluser]
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!

#9
[eluser]Xeoncross[/eluser]
Ok, I need some MySQL Help for this.

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.

Code:
/* 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.

#10
[eluser]Tom Glover[/eluser]
[quote author="Bramme" date="1221879311"]Sorry for double post, but to bring this to the attention: I've added this to my (free) beanstalk account: http://brammm.svn.beanstalkapp.com/cxforum/trunk/

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?[/quote]

If required i can move it to my assembla svn, where the only limit is 500mb, which can be upgraded


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.