Creating a dynamic news system

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
User avatar
Sindarin
Forum Regular
Posts: 521
Joined: Tue Sep 25, 2007 8:36 am
Location: Greece

Creating a dynamic news system

Post by Sindarin »

Alright, let's say we have a client that needs to have a dynamic news page on his site that he can edit from a cms-like system and add news articles to it.
The client though needs to keep the previous articles accessible and not delete them.
The problem that will soon or later arise from this, is that the webpage will end up really lengthy as more news are added. Pagination would help right? But what if the client adds so many news that the pages go from 1 to 5000?
So what would be the best and nicer-looking method to do this?
User avatar
freeformer
Forum Newbie
Posts: 14
Joined: Tue May 13, 2008 1:54 pm
Location: UK

Re: Creating a dynamic news system

Post by freeformer »

I can't see that there is another solution.

What I've done in the past when creating admin interfaces is good old pagination with a predictive text search box to go with it.

This allows the administrators to quickly find any articles they're looking for.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: Creating a dynamic news system

Post by onion2k »

Just don't link to all 5000 pages. The usual solution is to display a link to the first page, the last page, and a few pages around the user's current page. Eg "Previous 1 ... 13 14 15 ... 5000 Next".
Post Reply