Blog archiving question
Posted: Tue Feb 21, 2006 3:46 am
I'm building my blog as a learning project. I have all the basic functionality working fine where I have become stuck is in creating an archiving script. I have been going in circles trying to plan a script to display my archive.
They I invision it displaying is like this:-
Year
month1
week1
week2
week3
week4
month2
week1
week2
...
The weeks would be urls that pass start/end date variables to the archive script which then prints posts between the relevant dates. I think I have the theory correct. I'm just not sure how to implement this other than hardcoding the html with the date variables myself.
heres my db structure:
-- Table structure for table `news`
--
CREATE TABLE `news` (
`idnews` int(11) NOT NULL auto_increment,
`title` varchar(255) default NULL,
`text` text NOT NULL,
`iduser` int(11) default NULL,
`postdate` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`idnews`)
) TYPE=MyISAM AUTO_INCREMENT=42 ;
Any help would be greatly appreciated
They I invision it displaying is like this:-
Year
month1
week1
week2
week3
week4
month2
week1
week2
...
The weeks would be urls that pass start/end date variables to the archive script which then prints posts between the relevant dates. I think I have the theory correct. I'm just not sure how to implement this other than hardcoding the html with the date variables myself.
heres my db structure:
-- Table structure for table `news`
--
CREATE TABLE `news` (
`idnews` int(11) NOT NULL auto_increment,
`title` varchar(255) default NULL,
`text` text NOT NULL,
`iduser` int(11) default NULL,
`postdate` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`idnews`)
) TYPE=MyISAM AUTO_INCREMENT=42 ;
Any help would be greatly appreciated