|
Posted by Toby A Inkster on 08/07/07 12:32
purcaholic wrote:
> P.S.: You can also dive into the core of some blogs, cms, etc. to find
> out, how they solved this...
I'm sure that the very first CMS you'd investigate would be demiblog
<http://demiblog.org> ;-)
demiblog uses roughly the technique that purcaholic describes. Blog
articles are given URLs like '/blog/YYYY/MM/DD/FOOBAR/' and the relevant
fields in the database are:
article_date timestamp
url_part varchar
So when, say, the URL in my signature is visited, the CMS will search for
blog articles with article_date='2007-08-02' AND
url_part='command-line-again'. This way the article_date can be different
from the date the article was first created on, and different from its
last-modified date, and the url_part can be different from the
article_title, which is often useful if you have a post with a really long
title, but don't want your URL to be too long!
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 47 days, 16:04.]
Command Line Interfaces, Again
http://tobyinkster.co.uk/blog/2007/08/02/command-line-again/
Navigation:
[Reply to this message]
|