Jump to content

CMS type website. PHP MySQL.


adambedford

Recommended Posts

I am developing a website and I would like to be able to update the majority of the content from an admin section. I know I will be using PHP and MySql but I'm quite sure how.

 

the website is www.etseuro.com. I would like to be able to edit the home page, the destinations page and the news page. Any help on how to organise the table structure would be greatly appreciated. I also need to know how to get it so that each 'block' of text displays on the right page and in the right module. I am using dreamweaver. Is it also possible to keep the formatting when storing the info in MySql, maybe with Fckeditor or something?

 

Thanks

 

Adam

Link to comment
https://forums.phpfreaks.com/topic/147901-cms-type-website-php-mysql/
Share on other sites

Are all the pages just static at the moment?

 

I would create a table describing what you're editing. So from first glance here is how I would set it up. (with just field names for now)

id | page | section | sectionTitle | description | viewable

 

page = what page you're on 'homepage'

sectionTitle = 'who we are' etc...

description = your text

viewable = you can flag on or off the section if you want that functionality.

 

It is possible to keep the formatting the same either if you know how to already put it together, something like fckeditor, or what is very easy to setup is textile. I hope that helps you out.

hi

 

thank you very much!! the pages are all static at the moment yes.

 

i have a similar table structure in place (but without the viewable option) so good to know I am on the right track!

 

with the information in the table, how would i assign a row to a page? and then a row to a module? could I also get it to work with the images? and if there isnt an image assigned to that module, have it show up looking good anyway?

 

I know I'm asking really basic questions, but thanks for the help!

how would i assign a row to a page?

I wouldn't necessarily sign a specific row to a page as you might change it delete it etc in the future. That is where the 'page' field comes in hand so you would sort via that page. ("WHERE page='home'") You can setup the page field as the same name as the end of your URL with $_SERVER['PHP_SELF'] or you can do it manually on the page. (ie. 'home')

 

and then a row to a module?

Are you already using a templating system or a cms already setup?

 

could I also get it to work with the images? and if there isnt an image assigned to that module, have it show up looking good anyway?

Yup, of course you can get it setup with the images as well. There are a few ways to do that as well. If you don't have more than say 2 images I would put it in the same table. (image1 | image2) Then if you don't have a picture but there is always a space for it i would create a div for the image section and a div for the text section. Or you can just put the image on the page and float it with some padding so your text will wrap.

 

Hope that helps some more!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.