[TYPO3] seasonal content

Bas van der Togt b.vandertogt at profinit.com
Mon Nov 20 13:34:51 CET 2006


Hello list,

I want to use this script too.
I have the following code now but it's not working yet.
Can somebody help me please?

Your help would be great!
cheers,
Bas

My code:

# Image
config.includeLibrary = fileadmin/templates/class.tx_season.php

[userFunc = user_isSeason(1)]
temp.Image = IMAGE
temp.Image {
   file.width = 800
   file.height = 250
   file = fileadmin/templates/images/image_spring.jpg
}
[end]

[userFunc = user_isSeason(2)]
temp.Image = IMAGE
temp.Image {
   file.width = 800
   file.height = 250
   file = fileadmin/templates/images/image_summer.jpg
}
[end]

[userFunc = user_isSeason(3)]
temp.Image = IMAGE
temp.Image {
   file.width = 800
   file.height = 250
   file = fileadmin/templates/images/image_autumn.jpg
}
[end]

[userFunc = user_isSeason(4)]
temp.Image = IMAGE
temp.Image {
   file.width = 800
   file.height = 250
   file = fileadmin/templates/images/image_winter.jpg
}
[end]

Bernhard Kraft schreef:
> Lee M. Childress wrote:
>> I know you can set an expiration date for content, BUT ... what if I want seasonal content? Let's say
>> I want content to show up EACH year from May to September. What would be a good way to implement that?
> 
> You can do that using userFunc conditions ...
> 
> ad the follwing php-user-func object to your fileadmin/ dir or elsewher where it is accesible for T3:
> 
> http://think-open.org/kraftb/index/class.tx_season.php.txt
> 
> (of course you must rename it to .php - remove the .txt ending which i added so you can see the source)
> 
> and then you can have conditions like:
> 
> [userFunc = user_isSeason(3)]
> 
> where
> 1 = spring
> 2 = summer
> 3 = autumn
> 4 = winter
> 
> ... as you see from the top of the php file there is a table defining start and stop of each season exactly.
> this is taken from :
> 
> http://de.wikipedia.org/wiki/Jahreszeiten#Beginn_der_Jahreszeiten
> 
> and valid till 2014 :)
> 
> 
> greets,
> Bernhard



More information about the TYPO3-english mailing list