Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Creating my own CMS

Featured Replies

Does any one know any good tutorials for creating a CMS with PHP and MySQL and maybe XML? Either OO or not?

Any reason for wanting to create your own when there are very well made solid platforms already available?

  • Author

something to do I guess, I know there are plenty of platforms out there and I have used ones such as Joomla and TextPattern, just thought teaching myself the ways of building CMS's would be beneficial, the company I hav just started working creates bespoke CMS's and as a graduate I dont want to be left behind straight away.

As you are working for a company I assume they do ASP as PHP isn't really very viable as a product for commercial companies.

 

If you know ASP and you have used other CMS's you should have a general idea of what needs to be done, such as categories, how to set up a database.

 

If you don't know PHP/ASP then you have no chance.

They use PHP actually perfectly reliable when coded well

Didn't say it wasn't :rolleyes:

 

It just isn't as good of a business case. Look around at most commercial CMS and E-commerce platforms and they will most likely be ASP. The open source ones are generally PHP.

 

More money can be made out of using ASP over PHP.

I'm not sure if there are any tutorials out there to building your own CMS .. but as the name implies it is a Content Management System :D

 

The basics is that you create a CRUD (Create, Read, Update, Delete) system.

On one side you have HTML pages (with or without forms ... probably PHP generated at some point), another is the PHP that processes submitted data and all that data gets passed to MySQL as queries (SELECT, UPDATE, DELETE) ... PHP gets back the result and displays a message saying what happened.

I dunno about tutorials, but here's the basic gyst of what you want to do:

 

1) create 3 include files. One is your config.php which has the MYSQL login information. The other is your connect.php which has the mysql connection, and the third is your index.php, which will probably be all included files.

 

2) After you've established a working connection (don't forget the

mysql_close();

command!) then you can begin development. Depending on what your CMS is going to do, your basic data retrieval and editing will look like this:

 

$query = "SELECT post_title, post_text, post_date FROM posts";
mysql_query($query) or die (couldn't retrieve data); 
while ($row=$result) {
echo ' <h2>{$row['post_title']}</h2><p>{$row['post_text']}</p><p>{$row['post_date']}</p>';
}

 

That's probably full of contextual errors, but it's essentially what you'll be doing. That's not even to mention how irritating paging is and then you've got securitiy...etc...etc. Google is your friend! Also go out and buy a PHP and MYSQL phrasebook.

When I'm making a site I always make my own CMS. I make everything with PHP, it's not that hard. When it's done I can change like everything on the site, from the style to the webbadges in the footer.

 

You should start with making a .htaccess protected folder and the general HTML structure for your ACP.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.