Jump to content

Archiving news updates.


JohnX

Recommended Posts

I also sent a message to Stefan about this but thought I'd also post this here

 

hello all I have a question regarding a programming skill that I see done well in many websites that aren't just using Wordpress or Blogger (which I have made an oath to myself to stay away from just so I can learn to do everything the completely manual way.)

 

Archiving news updates!

I've only had my website up for about a month so I haven't completely filled the main page with updates yet; although my site will be churning out tons of content on average twice daily once I figure out the best way to archive all of the updates I do once the main page becomes full.

 

Another example of what I'm talking about is just having an Older Posts option at the end of all my 20 or so news updates then youll be put to Page 2..

A site such as http://www.kotaku.com , or any of the Gawker.com sites do this very well... TONS of content and at the bottom you can select from Page 2,3,4,5,6,7..etc (you get the point :P.

 

I realize you could essentially create a new .html page for each page.. indexpg2.html, indexpg3.html.. and so on but this seems like the clumsy, non-professional, non-efficient way of doing things.. and once you get to the 50page mark or so it would just be a huge headache to push every page back one just because of a site update.

 

I've talked to one friend about it who somewhat knows a thing or two about programming but he's terrible at teaching anything. He mentioned how Kotaku must use a Database to be able to post and maintain that much content..

 

Is this true? Should I just learn more PHP to the point of being able to create a database and then go from there? will that allow me to archive content on my site more easily, and efficiently?

 

Again, I realize that if you create a site in Wordpress or through Blogger.com that everything to archive news posts is implemented.. but I don't want to use those programs! I want to feel the sense of accomplishment when I learn to do it myself.

 

Thanks guys.

Link to comment
Share on other sites

I think the word you are looking for is "pagination." A Google search or two should bring up some tutorials.

 

Yes, to save yourself a lot of time/effort, usually your news items would be stored in a database. I posted some sample PHP code that covers creating/removing/updating/deleting records from a database (often called "CRUD") here: http://www.killersites.com/community/index.php?/topic/3064-basic-php-system-view-edit-add-delete-records-with-mysqli/, and I also did a couple part screencast on it that is available in the KillerSites University within the PHP section (http://www.killersites.com/university - subscription required.) I cover how to do some simple pagination on the records in the database.

 

If you don't know any/much PHP though, you may want to save that tutorial for later and start with the basics. The tutorials at http://www.killerphp.com/tutorials/beginners-php/ and http://phpvideotutorials.com/free helped me get started when I was first learning. It does sound like you will want to learn some PHP/MySQL so you don't have to code everything by hand.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...