?
Solved

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

Posted on 2015-01-27
9
Medium Priority
?
121 Views
Last Modified: 2015-01-28
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
Comment
Question by:kadin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40574370
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
 

Author Comment

by:kadin
ID: 40574419
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
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 2000 total points
ID: 40574509
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
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 

Author Closing Comment

by:kadin
ID: 40574544
Thanks for your help.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40574657
You're welcome, thanks for the points.
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 40574972
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
 

Author Comment

by:kadin
ID: 40576452
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
 

Author Comment

by:kadin
ID: 40576504
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
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 40576622
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

Industry Leaders: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question