views:

110

answers:

2

Hi,

I'm planning on making a self-moderated site where people ca share specific information on tons of items. It will be as following:

  1. If the item a site visitor is looking for isn't available, he can create it. Registration is not needed. Other visitors would help correct his item name if it's invalid.

  2. Visitors can add information to an item that other visitors could correct.

And that's basically it.

My question is: What do I need to learn (or use) to implement such system? any good reading resources for example? I've never done this before, and have no idea where to start.

A wikipedia-like system won't work. I'm trying to code something that is extremely simple and accessible for everyone to use.

I'm using PHP with CodeIgniter framework.

Appreciate your help :)

A: 

It sounds like you're looking for a simple wiki (MediaWiki, the software that powers Wikipedia, is terribly complex). Even simpler is something like Faq-O-Matic.

Greg Hewgill
I was thinking of something where a user enters a limited amount of information to an item (say 50 characters), and then other visitors would either vote that up/down, insert a completely different on, or help edit it.
KeyStroke
A: 

Well I believe that if you know how to do the basic CRUD stuff all you need is a revision table that holds the various edits users make to the page, to display you select the revision with the highest number and provide a rollback link if for some reason the user wants to revert the page to a previous state.

Sample "article" Table Schema:

id
user // if you want to
title
content
revision 
date_created
date_updated

Sample UPDATE Query:

UPDATE article SET title = $_POST['title'], content = $_POST['content'], revision = revision + 1, ... WHERE id = 42 LIMIT 1;

Sample SELECT Query to return the last revision:

SELECT * FROM article WHERE id = 42 ORDER BY revision DESC LIMIT 1;
Alix Axel
Yes, I want to do just what you described. Is there a key word for that so I can research it? "wiki" for example gets me tons of wikipedia-like stuff I'm not interested in.
KeyStroke
Check my edit, you can also try Googling for "how to make a article revision system" or something similar to that.
Alix Axel