Page 1 of 1

how can i put a database into my cms site?

Posted: Fri Apr 28, 2006 3:40 am
by sydneysunshine
Hello! Well if the title didn't give it away, I'm not knowledgeable about these things so much.
The people I work with want the following and I would like to know if I can install something into my cms site:
1. A form that people can fill out with their contact details, service type and details about their service (there are maybe 50 questions all related to charity food services)
2. That form to go into an online database that can be searchable.
The site is www.wscf.org.au and it would be a list of migrant community food services.

Re: how can i put a database into my cms site?

Posted: Sat May 06, 2006 10:43 am
by Raven
Hello

You get a bit of late respond on your question here, perhaps you have already figured out this by yourself now. I'll try to give you an answer, and it might also help others with similar questions. The answer to your question is yes, but you have to program the forms and form handling yourself. I am not aware of any plugin in the cmsms system that easily fits in to your particular purpose or any others that does it by the way. Extra programming is most likely needed anyway.

Databases
When you install cmsmadesimple you already have access to an database. A simplified anatomy of an database is that it is a collection of tables ( yes, you might imagine them as tables in excel...). During the standard installation of cmsmadesimple all tables needed for cmsmadesimple is prefixed with 'cms_'. You can use this database to store your form data. If you have a large demand on your database, it might be an idea to have a seperate database for handling your data in your forms. This is would not be a problem either.

Integrating your own forms into cmsmadesimple
As with all CMS systems cmsmadesimple does just show your content together with an applied pagestyle(layout). To add more functionlity cmsmadesimple comes with two alternatives, one is called tags (or plugins), the other one is called modules. Tags are probably the easiest to get started with. A good starting point is the file 'function.contact_form.php' under the /plugin directory. This shows an example of an form and form handling for a simple contact form. See the help section under Extensions>Tags under the admin panel of cmsms on how tags are inserted to the page. 

Modules are a bit 'heavier' way of adding functionallity to cmsmadesimple. I won't get into the details here, but under http://dev.cmsmadesimple.org/ you have a list of both tags and modules ready for downloading. The starting point here is a module called 'skeleton' that explains how to start progamming modules  You have to open this code in an editor and start reading it comments.

Re: how can i put a database into my cms site?

Posted: Mon May 08, 2006 2:43 am
by sydneysunshine
Hi and thanks for the reply.
I suppose I'm ok with the idea that CMS made simple is based around a database and I have installed a number of modules and use a lot of tags within the site. The thing I can't get my head around is the programming of the forms that would assist users to search and view the contents of the 'database' of service details.

I will look into the skeleton module and the contact form plugin, but I've only dabbled in changing my current modules, so I'm not very advanced at that stuff.

Thanks again for the reply - it was really useful!
- Christine