[TYPO3] Down counter (solved)
Peter Klein
peter at umloud.dk
Fri Feb 10 10:25:43 CET 2006
Hi tapio. All values in TS are strings, but depending on the stdWrap
properties you use, you can convert tose to dates or numbers, and even
perform aritmatic operations on the values..
For aritmatic operations you use the "prioriCalc" property.
For date manipulation you use the properties "date", "strftime" & "age"
http://typo3.org/documentation/document-library/doc_core_tsref/stdWrap/
The various parameters for "date", "strftime" can be found here:
http://typo3.org/documentation/document-library/doc_core_tsref/Datatype_reference/
The reson why I used a Constant, was just to avoid entering the countdown
date more than once. ;)
---
Peter Klein / Umloud Untd
"tapio" <tapio.markula at dnainternet.net> wrote in message
news:mailman.1.1139561026.19839.typo3-english at lists.netfielders.de...
>
>> Put this in CONSTANTS:
>> -- cut --
>> # The countdown date (In UNIX time format)
>> lib.countdown.date = 1142095231
>
> why the the constant is an object?
> integer?
> myDate=1142095231
> is a string - would that be handled incorrectly?
> is there a common way to convert
> myDate=1142095231
>
> as integer
>
> what I should do to use following setup
>
>> And put this in SETUP:
>> -- cut --
>> lib.countdown = COA_INT
>> lib.countdown {
>> 10 = TEXT
>> 10.cObject = TEXT
>> 10.cObject.data = date:U
>> 10.cObject.wrap = ({$myDate} -|)/86400
>> 10.prioriCalc = intval
>> 10.wrap = It is now | days until
>> 20 = TEXT
>> 20.value = {$myDate}
>> 20.strftime = %d %B %y
>> }
>> -- cut --
>>
>> ---
>> Peter Klein / Umloud Untd
>>
>>
>> "Allan Jacobsen" <allan.jacobsen at tips.dk> wrote in message
>> news:mailman.14209.1139496541.6406.typo3-english at lists.netfielders.de...
>> Hi
>>
>> I want to make a down counter until a certain date.
>> I don't want any graphics or anything like that, just a text like this:
>> "It is now xx days until xxx"
>> Can't whis be made in typoscript, I have googled and read tsref etc. but
>> can't seem to find any examples.
>>
>>
>> Best regards/MVH
>> Allan Jacobsen
>> Infrastruktur, Dansk Tipstjeneste A/S
>> Korsdalsvej 135, 2605 Brøndby
>>
More information about the TYPO3-english
mailing list