/    Sign up×
Community /Pin to ProfileBookmark

developing a Simple CMS with PHP

Hi All,

I recently came across this simple cms (attached) coded in php, it’s good but i want to know how i can expand it??

To have more fields, how to include images but most importantly how to style the published posts.

Thats if for now i may have more questions soon

Thanks

[upl-file uuid=f58cfb6a-2568-4422-8fb6-74b954d71c01 size=4kB]SimpleCMS.zip[/upl-file]

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@SrWebDeveloperMay 04.2010 — This is as much as I can offer:

1) To have more fields you'll need to identify the portions of the script that include the forms to add content. Then, update the HTML with the new fields, update the scripts that process the form submission, and update the database queries to handle insert, update and deletion. Plus modify any logging or form validation associated with that form.

2) To include images you need to do all of the above but change the form encoding to allow uploading files, update the editor if it exists to allow image uploading and/or add the HTML form element to handle the upload, process the upload server side (possibly adding in rules for image mime type, size limitations, thumbnail creating using GD and so on) and setup a directory to store the files, then move the upload to that directory and be sure the paths are saved correctly in the database.

3) Make sure all content uses CSS for styling, i.e. create a master style sheet referencing all the id's and classes already in use and consider integrating popular styles into the editor if you have one.

In short, a CMS is never "simple" - even the simple ones actually have alot of technologies built in, when you think about it.

[B]Thus, here is my real answer - and it involves effort on your part:

[/B]


First, you learn how it works in depth. Test all features.

You then identify the portions of code related to the features that are there which you wish to modify. To find stuff more easily, do a "view HTML source" in your browser and use that to search in the actual PHP source for things like form field names to help you find where things are. Then you do any of the things I listed above that appeal to you. I was careful to list stuff that's common in most any CMS, but it's daunting, isn't it?

You question is so generic, what else did you expect?

The reason I wrote all this is to let you know quality CMS's really take a lot of work with a lot of moving parts all working together. I know you never expected us to supply code, just ideas in general. Consider this some real world advice from someone experienced -- if you want to avoid most of what I wrote, you'll end up with a shoddy CMS, better off just switching to one of the open source freeware versions (WordPress, Drupal, Joomla, list goes on and on) unless you want to DO IT RIGHT.

And... with a CMS, it should always be done right.

Don't mean to scare ya, or make mountains out of mole hills, but your question comes across as someone who might not have realized the amount of work it really takes even to do the small list you posed here.

-jim
×

Success!

Help @rbrown spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.24,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...