开发者

Change article_custom so that 'past' doesn't exclude an event on the current date

开发者 https://www.devze.com 2023-02-20 09:54 出处:网络
I\'m using textpattern and trying to display a list of upcoming events.I\'m using article_custom. <txp:article_custom

I'm using textpattern and trying to display a list of upcoming events. I'm using article_custom.

<txp:article_custom
   form="eventshome"
   limit="4"
   time="future"
   sort="Posted 
   section="events" />

The issue I have is that this is supposed to show events coming up but using 'future' means that when an event is on the current date it's not showin开发者_JAVA百科g (it's not future anymore). Both 'past' and 'future' time options seem to exclude the current date. That means people coming on the site don't see an event on that day which is a bit of an issue.

I've had a quick look around the code but can't seem to work out how to change the SQL statement so that future includes the current date.

Any help appreciated.


Its a bit oldie, but since i've just fixed the same issue, i thought i could provide my very simple soution to this matter.

What i did was simply set article date and time to its date and 25:59:59 time, so its visible all day on current day, but disappears immeadetly when day changes.

Since i didn't want to type those times always again and again, i run small javascript on article page which sets those automaticly to fields.


You can try plugin smd_calendar - http://stefdawson.com/sw/plugins/smd_calendar it supports a lot of methods to display upcomming and past events.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号