On Thu, 2006-02-23 at 15:18, John Nichel wrote:
> Nicholas Couloute wrote:
> > LOL. I see the point your trying to make! I have made a news script 
> > before but how would I add coments to each individual new article! How 
> > would I keep it all together! and also to show only the lastest news 
> > articles!

On the filesystem:

category_0000001 (dir -- everything for category 1)
    details.txt (file -- title, description, perms, *shrug*)
    article_0000001.txt (file -- you know... THE ARTICLE)
    comments_0000001 (dir -- all the comments for article of same index)
        comment_0000001.txt (a comment)
        comment_0000002.txt (another comment)
        comment_0923874.txt (a very busy article)
category_0000002 (dir -- everything for category 2)
    details.txt (file -- title, description, perms, *shrug*)
    article_0000001.txt (file -- you know... THE ARTICLE)
    comments_0000001 (dir -- all the comments for article of same index)
        comment_0000001.txt (a comment)
        comment_0000002.txt (another comment)
    article_0000002.txt (file -- you know... THE ARTICLE)
    comments_0000002 (dir -- all the comments for article of same index)
        comment_0000001.txt (a comment)
        comment_0000002.txt (another comment)
        comment_0000002.txt (yet another comment)
category_0000xxx (dir -- everything for category xxx)
    details.txt (file -- title, description, perms, *shrug*)
    article_0000xxx.txt (file -- article title, details, perms, etc.)
    comments_0000xxx (dir -- all the comments for article of same index)
        comment_0000xxx.txt (a comment)

By using this kind of organization it becomes simplistic to retrieve
ordered entries, first 5 entries, last 5 entries, whatever you want.
Mind you, ordering by category name will be more work, but I'll leave
that to you since I'd use a database :)

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to