• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 123
  • Last Modified:

I am trying to make a Content Management System by anylizing huffingtonpost.com

I have never made a CMS before. I want the ability to place a varying number of images within the body of the text article on the page php will serve. So imagine a page top to bottom that has text, image, text, image, text and so on. Some pages may have a lot of images and some may have none.

I look at news paper sites like the huffington post to try and figure out how on earth they manage there content. I know there are programs like Word Press, but I just want something simple for my site.

So I look at the url: http://www.huffingtonpost.com/2015/01/27/iphone-6-sales_n_6557550.html
and I wonder do they store every news article as an html page in a folder directory like folder 2015 > folder 01 > folder 27 has the html. and store all images in one big image folder. There for the database does not hold the meet of the article. It holds only the title and image names?

Sometimes there is no .html at the end of the url. Does this mean the url fragments are for the sole purpose of accessing the database to retrieve the entire text of the article plus image names and a php template is used to contact the database and layout the whole article on the page?

Can someone with experience show me how this is done? Thanks.
0
kadin
Asked:
kadin
  • 4
  • 3
  • 2
1 Solution
 
Dave BaldwinFixer of ProblemsCommented:
A site like http://www.huffingtonpost.com/ is enormously more complicated than Wordpress.  URLs without 'html' are either directory names or they are translated to something else on the server.

If you right-click on the image and open it in a separate window, you can see the URL for the image.  A large site like http://www.huffingtonpost.com/ will normally use a 'cookie-less' domain to serve images.  A small amount of time is saved by not dealing with cookies on the image links.

http://www.huffingtonpost.com/ has dozens if not hundreds of people working for them.  Their list of 'news sources' at the bottom of the home page is more than 100.  The people who produce the articles probably have templates they use although I'm sure that the different departments have slightly different versions of the templates.

While analyzing http://www.huffingtonpost.com/ may give you some ideas, it would months if not years to duplicate what they have done.  No one person does a site like that.  The most important thing for your own purposes is to develop a plan that will accommodate all the things you want to do.
0
 
kadinAuthor Commented:
Thanks for the advice. That's very helpful. I shall develop a plan specific to my needs then.

The only other question I have regarding a simple CMS, is how to deal with a varying number of images intermixed in the article text. At the moment I am visualizing a CMS form that has - multiple - text inputs, each representing just a few paragraphs of the long article (a block of text). The database would have to have multiple separate columns that represents each article text block. Some articles have just one block of text and no images, other articles have a lot more.

And then another form to upload images. Maybe each image would be named with a number that can later be read by php to place each image in the right location between each article text block. Remember, the number of article text blocks and number of images in the page vary from page to page so the php page that delivers the article must somehow be dynamic.

Any thoughts on how I might go about this?
0
 
Dave BaldwinFixer of ProblemsCommented:
I think storing it all in the database is probably not a good idea.  I would use separate page files and put only the reference information in the database so you can look up the articles.  If you are only going to have small articles like is normal in Wordpress, I guess storing them in the database is ok.  Having many large articles like http://www.huffingtonpost.com/ is a different situation.

The article editor for Wordpress lets you insert images into the articles.  I believe the image upload is part of that editor.  http://www.huffingtonpost.com/ probably uses a similar but more powerful article template page to enter their articles.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
kadinAuthor Commented:
Thanks for your help.
0
 
Dave BaldwinFixer of ProblemsCommented:
You're welcome, thanks for the points.
0
 
Ray PaseurCommented:
No points for this, please, but building a CMS from scratch is kind of like building a car from scratch.  Others have already done it, and your results are likely to be suboptimal if you don't have substantial financial backing and experience, because you're going to need to hire a lot of programmers to catch up to the status of the current standards in the open source community.

The Huffinton Post site is an aggregator, bringing together several data sources.
http://builtwith.com/huffingtonpost.com

These are the state-of-the-art CMS systems:

Drupal, Joomla, WordPress.  Drupal is the "industrial strength" tool.  WordPress powers about 25% of the internet, from the very smallest blogs, right up to major newspapers.  Joomla is still in wide use, but is not as popular as the others.

If you look at those three and you're still interested in a "build-your-own" solution, then you probably want to start with a platform instead of trying to write all the code yourself.  The current state-of-the-art platform is Laravel.
0
 
kadinAuthor Commented:
Thanks for that Ray.

Your right. Starting from scratch can be a colossal undertaking, I just spent 4 years building my very first site.

What I did not mention above is that I am not starting from scratch. Most of my site is done already. I just needed to find a way to program a form that can upload a text article and images and present them intermixed together in unpredictable ways on a web page instead of presenting as a consistent pattern. I was unsure if newspaper sites stored there articles as html files on their server or store them in a database. And if they store them as an html file, how does that work exactly. I am assuming a php program can be written that can collect a text article and images via a form put it together as an html file and save it on the server. I was about to research that now.

If I were starting from scratch, I would go with WordPress or Laravel as per your advice.
0
 
kadinAuthor Commented:
Now that I think about it maybe I can just save it as a php file and include it that way.

require_once '/home/bla/bla/my article_with_images_file.php';
0
 
Ray PaseurCommented:
Given that you already have a good foundation, you might want to look into how WordPress does it.  You can join their site and mailing list.  They use the database to store the information.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now