Jump to content

CMS with PHP


Greldin

Recommended Posts

Howdy!I'm fairly new at this whole webdesign thing, and after learning HTML and the more "designing" part of webdesign, I have started to build a website which I want to be a sort of blog site. Although, when you don't know PHP or don't have any kind of a CMS (I'm not even sure if that's the right word for it), posting a new entry in the blog can be quite.. tricky.So, what I want to do is learn the PHP required to create such a CMS, preferably not something any scriptkid can hack right away, which enables me to login to a kind of admin panel, write the newsbit, have it "magically" appear at the front page, and then make the older ones end up in a kind of archive.I've tried learning a bit of PHP but I find it quite complicated (I had some trouble learning HTML..). So - my question to you guys is, and I would be very grateful if I got an answer to it, what parts of PHP is necessary for me to know to be able to write this? And does anyone have any tips concerning what I should do and not do?My apologies if this is at the wrong place on the forums.Thanks in advance!Yours,Greldin

Link to comment
Share on other sites

If you don't want to use such things as WordPress or CuteNews, but build your own, like I have done here you can start looking at W3Schools PHP section. That's the codes I've used in my system, but I've just modified them and built on more stuff on the codes and put them together and a lot more.PS: my system is an open source right now, so if you want to try it, just log in with "demo" as username and password. On my system you can make pages and stuff. Yeah, you figure it out yourself.

Link to comment
Share on other sites

Yea, you can have users there if that's what you meant. And yes, it's simple, but it works and that's what counts, hehe.About the users, I just sat that up because that's just the test area of the system, and people didn't want to use "Demo User" so I created a form and some code so people could register :)But this was like version 1, where I forgot to strip tags in the title and where you can make sites and some if empty codes, but I will fix those bugs when I get time.What functions I use...hm, well, *cough cough* hehe..Just contact me further if you want to use it hehe. I'm working on the security too. I have mysql_real_escape_string around everything I think. I'm gonna put on htmlentities when I get time also so.

Link to comment
Share on other sites

To make something like a CMS, you need to understand the database connection functions. If you are using MySQL for the database, then the functions are mysql_connect, mysql_select_db, mysql_query, mysql_fetch_array, mysql_real_escape_string, and mysql_close. Check this page for an example of connecting to the database and issuing a query:http://www.php.net/manual/en/function.mysql-query.phpOther then database functions, you need to understand some of the string functions. Other then files and databases, all of the information you deal with online is in the form of a string. You will use these functions to manipulate them:http://www.php.net/manual/en/ref.strings.phpThere are a lot of functions on that page, you'll only end up using maybe 5 of them, but look through to see the type of things you can do with the string library.Other than those, you'll use some functions from here:http://www.php.net/manual/en/ref.datetime.phphttp://www.php.net/manual/en/ref.var.phpAnd maybe a few from here:http://www.php.net/manual/en/ref.info.phpIf you need to work with files, you use these:http://www.php.net/manual/en/ref.filesystem.php

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...