Betr.: RE: [ic] Timed news_feature doesn't work
J van Dijk 'BV Kunststoffenindustrie Attema'
j.vandijk at attema.nl
Thu May 27 08:56:23 EDT 2004
>> Hi all,
>>
>> I use the /eg news_feature files deliverd with the foundation store.
I
>> created the mysql news table and use the standard pages and
>> template files.
>>
>> It works great but the timed_news function doesn't work. The date
>> (Start and
>> End) is displayed correctly in the mysql table and in the field
>> timed_news=1. So everything seems to be right.
>>
>> Is there anyone who can tell me how I can let the
start_date/finish_date
>> work.
>First you have to store a start and end date in that field, like
20040527
>and 20040531. After that you create a query that checks those dates
with the
>current date: select * from news where start_date > [scratch
current_date]
>and finish_date < [scratch current_date] (untested)
>You set the current_date to a scratch like this:
>[seti current_date][time]%Y%m%d[/time][/seti]
>René
We use this piece of code:
[query prefix=news list=1 more=1 sql=|
SELECT *
FROM news
WHERE (featured = '[control news_type algemeen]' AND
lang='[scratch mv_locale]' AND timed_news<>'1')
OR ( featured = '[control news_type algemeen]' AND
lang='[scratch mv_locale]' AND timed_news='1'
AND start_date <= [time]%Y%m%d[/time]
AND finish_date >= [time]%Y%m%d[/time] )
ORDER BY posted_on DESC
|
ml="[control matches 3]"
]
Jan van Dijk
_______________________________________________
interchange-users mailing list
interchange-users at icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users
Met vriendelijke groet,
Jan van Dijk
j.vandijk at attema.nl
B.V. Kunststoffenindustrie Attema
tel : 0183-650650 tst 674
fax: 0183-650751
www.attema.nl
More information about the interchange-users
mailing list