[TYPO3] Management of news articles (purge).. and TStamp question
myicq
myicq2 at 3gmx.net4
Wed Jan 16 10:24:35 CET 2008
myicq <myicq2 at 3gmx.net4> wrote in news:mailman.1.1200405581.4849.typo3-
english at lists.netfielders.de:
> But how do you practically go about managing news after some time,
> imagine over some months, years there will be 100s of news items
> listed in the backend.
>
> Is there a "purge" script which moves the news to an archive, or
> what is the process ?
No input ?
well, after talking to ppl in the IRC channel, I think the following
will be the solution:
* define date interval for cleanup
* make "archive folder"
* run this SQL command to clean up
update tx_mininews_news
set pid = $archive_page_id
where
pid = $news_page_id
and (date difference > $number_of_days)
and hidden = 1
that way, all articles hidden, and of certain age, is archived.
This could be built into mininews.. but guess you can't have everything.
Btw, I did find the answer to second question:
To get from Typo3 timestamps to human-readable, simply do
select DATE_FORMAT(FROM_UNIXTIME(tstamp), '%Y-%m-%d %H:%i')
Obvious to 99% but I did not know, and thought someone else might
benefit.
- torben
More information about the TYPO3-english
mailing list