[TYPO3] seasonal content
Bernhard Kraft
kraftb at kraftb.at
Mon Jul 31 20:16:47 CEST 2006
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 :)
"candiate for static info tables" : Seasons
greets,
Bernhard
--
----------------------------------------------------------------------
"Freiheit ist immer auch die Freiheit des Andersdenkenden"
Rosa Luxemburg, 1871 - 1919
----------------------------------------------------------------------
[[ http://think-open.at | Open source company ]]
More information about the TYPO3-english
mailing list