4 Replies - 483 Views - Last Post: 24 June 2014 - 06:03 AM

#1 Eoiser  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 05-April 14

How to program blog?

Posted 20 June 2014 - 12:51 PM

I have built a personal website.
Im wondering how to program a very simple editor and getting the post in correct order and on new pages.
I don't want to use a premade blog software, i want to build it myself.
Is This A Good Question/Topic? 0
  • +

Replies To: How to program blog?

#2 Eoiser  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 05-April 14

Re: How to program blog?

Posted 20 June 2014 - 01:00 PM

Just some thoughts.
1. I should have a very simple text editor, something like im writing this post with.
2. It should then send the post to a database, and store that post in position 1.
3. The blog itself should get latest post (position 1.) and push all the other post down a number.

Im not sure how it should automaticly make a new page when needed for new post.
Any suggestions on that?
Was This Post Helpful? 0
  • +
  • -

#3 ArtificialSoldier  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 471
  • View blog
  • Posts: 1,729
  • Joined: 15-January 14

Re: How to program blog?

Posted 20 June 2014 - 01:08 PM

Do you have any code so far, or a database set up for this? You should store the date of the post in the database table, you can use that to put them in the right order. If you want something more than a plain text field, then look into something like CKeditor. This forum does not have a "very simple" text editor, it has a rich text editor. A plain HTML textarea field is an example of "very simple".

You can have a page that gets the post ID in the URL and looks up that post in the database and displays it. If you want the URL to have keywords, like the title of the post, then you'll need to use URL rewriting for that.
Was This Post Helpful? 0
  • +
  • -

#4 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1184
  • View blog
  • Posts: 7,254
  • Joined: 07-September 06

Re: How to program blog?

Posted 20 June 2014 - 01:21 PM

I did a very simple blog system back in college for a class project (it uses the now-deprecated mysql_* functions instead of PDO, but that wasn't around at the time I wrote it).

Basically, you just need to know how to deal with POST data from forms, have some simple user permissions (such as if their posts are visible by default or require approval, if they can create articles, etc.), and interact with the database.

If you are interested, I have the code for my system out on github:
https://github.com/J...3308blogproject

If nothing else, you may be able to use it as a pointer on how to accomplish some things.
Was This Post Helpful? 0
  • +
  • -

#5 peace_fixation  Icon User is offline

  • D.I.C Head

Reputation: 46
  • View blog
  • Posts: 198
  • Joined: 01-November 11

Re: How to program blog?

Posted 24 June 2014 - 06:03 AM

There's free course @ Udacity that will teach how to make a blog like you have described. It's taught by the guy who founded Reddit and he uses Python running on Google App Engine. Even the first two modules will get you a lot of the way there.

Web Application Engineering
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1