tvfoto
12-11-2009, 07:02 PM
Hi all,
Can someone tell me or point me to a good place where I can learn how to set up a page where I can update the content of the page via some sort of text editor like CKeditor, ActivEdit etc. I dont need a fancy interface just some basic function.
For example, I have a page that has 4 paragraphs (or four divisions):
a) How do I change just the content of paragraph 2 & 4
b) what if I want to add a piece of graphic between para 1 & 2
The information I am not clear here is:
a) Do I need one editor per page and that editor will give me the editing capability for the entire page, so I can take care of all the above?
b) how do I hide/disable the editor from anyone else but me and an authenticated person.
c) Does this process need a trip to the server (if authentication via a DB is not needed)?
Thanks
djr33
12-11-2009, 07:40 PM
You should look into a content management system (CMS). There are lots on google and some are free.
You could program this all yourself using PHP (and javascript if you want a fancy setup), but if you want everything editable, you may as well go with a prebuilt solution that will handle that. If you just want a couple things modifiable, then you may be better off writing it yourself, assuming you have the background in PHP (if you don't, the CMS will probably work fine).
1)
a) You can either modify the whole page and just not change the text of paragraphs 1 and 3, or you can setup individual text boxes for each paragraph. That would be more work and probably something you'd code yourself rather than in a CMS. A CMS would just give you (generally) one big content area to work with for the pages.
b) If you want to have a dynamic (changing) layout, then a system with a specific form for each layout element would be hard. In other words, one big text box for the whole page will be a lot easier than trying to have it dynamically generate elements as you go-- that's like trying to build an entire HTML WYSIWYG app in the browser. Lots of work, and you can just as easily edit it as one big chunk.
Look at openWYSIWYG (in the DD library) or another similar script for a way to have a WYSIWYG approach to the editing rather than just html. That would be very time consuming to code by yourself.
2)
a) You need the editor to be on each page. You can of course borrow code onto each page from a main script, and if you do use a CMS it will actually give you the option of creating/modifying/removing pages from your site all from within the CMS. A full-featured CMS is a very powerful, dynamic tool, assuming you don't need to do anything too unusual (because then there might not be a feature for it).
b) You do this with the normal methods of accounts. In PHP you can use sessions and only allow someone in who has the password. User accounts (or admin accounts... same code) are a big topic in themselves, if you are coding it yourself. A CMS handles this for you.
c) Yes, you of course need to involve the server because you need to save the data onto the server once you are done editing (just like a basic form needs to be submitted to the server to send an email or store something in the database). You will need a database, or you could try to do it with dynamic text files, but that only works if you are doing a very simple setup-- anything that gets complex will get out of control quickly and you'll want to move to a database then. DBs take longer to setup, but they save time in the end if the project is big at all. A CMS will handle all of this as well, except that it will first need access to the database to get things started (and store stuff later).
Look into Joomla: http://www.joomla.org/
It is a popular, free / open source CMS that will probably do everything you need.
There are others as well, and some that are fairly expensive but might fit your needs better (in the end, it's not that expensive if it saves you lots of time, right?). But Joomla is a good starting point.
The only problem with a CMS is if you end up wanting to have some custom options (let's say you want to add dynamic PHP content to your pages, for example), at some point this may become tedious or impossible with the CMS if it doesn't allow for that. But the good news with an open source CMS is that people are constantly adding features. (In that sense it will be overkill if you only need a couple options, so maybe you should build something yourself, but if you want a general management system, it will be useful.)
tvfoto
12-11-2009, 08:04 PM
Wow, thanks for taking times and explain the process to me. I really appreciate this outstanding helping attitude. I will give it a try soon. Thanks again....
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.