By cschall on
I am trying to display all of the events with end dates greater than or equal to today, but I don't think that this is working correctly because I still get a July 10 event on my calendar.
I have this in a block.
event.event_end >= dayofyear(now())
and I've tried
event.event_end >= now()
Any help to point out my error would be appreciated.
Comments
Use event_start ?
I normally use event_start when looking for events in the future. Small side note, the event module does provide an upcoming events block.
More customized
I actually use the upcoming events block in another area of my site, but I need to only display select categories and didn't think that I could focus it in by category. If I can, please let me know where I can find out how to do that.
Thanks.
This is probably a formating
This is probably a formating problem. I've never worked with this module but it seems to me that they won't work because event_end probably isn't in either day of year format or the same format returned by now. What does event_end return exactly what size integer in what format.
Value
When I print out the value, this is what I see: 1154397600 which looks like a UNIX timestamp.
So I'm wondering if the best way to go about this would them be to set the current datetime to a UNIX value variable and then pass that into my where clause. No clue how to do that.
Any thoughts?
try using the event views module
it's part of the event download.
you can set the view based on event start or end day, month, year or date (m/d/y).
Poolitics
The problem is that I had to
The problem is that I had to create a flexinode in order to get all of the data that I needed formatted in various places the way that I needed it. I display event details in many different places with different fields on different pages. The view doesn't let me select my custom fields from the flexinode. If someone can tell me how to do that, then this will be solved. Otherwise, I need to figure out how to get the PHP date to match the UNIX date.
Thx
you can use multiple templates for the same flexinode type
I use different flexinode templates (containing different fields) contingent upon whether or not the event start and/or end dates have passed, and whether or not the user is logged in.
Poolitics
Why not use the event
Why not use the event module's block code as a model? Does that block work for you to display upcoming events?
---
Work: BioRAFT
Do you know where I should
Do you know where I should look in the code to find this? I was scanning it yesterday, but didn't see it, but there's a lot of code there and wasn't sure what words to search on in order to find the right code. I thought that I could just cut and paste something into my custom block.
Is that possible?
Look for event_block_upcoming
The function in the event module you want to look at is event_block_upcoming.