[TYPO3] change crdate field

JoH info at cybercraft.de
Wed Apr 12 16:32:01 CEST 2006


>> The fact that "joomla has this" is no reason to do it the same way
>> in TYPO3. In fact it's no good idea, since the crdate represents the
>> date when the record has been created in the DB.
>> It doesn't matter when you wrote it, or what you want to display as
>> the date of creation, it's just an internal field.
>> If some things went wrong you can find out which element was
>> responsible, who created it and when exactly this happened.
>> This is why you should NEVER change this field manually, not even
>> with Joomla.
>>
>> If you want something like "date of publishing" you could use the
>> start field to acchieve this.
>> Nice sideffect: The article will be published automatically at the
>> "date of publishing".
>> IMHO this is a much more elegant solution and it's leaving the
>> internal field crdate as is.
>>
>
> yeah thats true you are right, good idea, but the the date of
> publishing should be set automatically (i know i can do this with ts)
> for the noob publishers.

Well - if the publisher is a "noob", the date will be the crdate, since he
doesn't know how to set publishing dates to future dates using starttime.
So what you want is a combination of crdate and starttime fields like this:

temp.publishingDate = COA
temp.publishingDate {
    10 = TEXT
    10.value = Publishing Date:
    20 = TEXT
    20.field = starttime // crdate
    20.date = %e:%m:%y %T
}

If starttime is empty, crdate will be used instead.
Not sure about the sorting though, since this is something you will have to
acchieve in the select statement.

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.cybercraft.de





More information about the TYPO3-english mailing list