I know there has been a buttload of discussion about flexinode sorting methods and while the best fix for this is to rewrite the flexible content module or switch to an unfinished CCK module, I just need to hard code the change and call it done.

All of my lists will be fine sorted first by sticky, then by start date, then by creation date. I want my lists of flexinodes to be ordered by the associated start date (the date field that comes from the event module, not a date field made in flexinode content type). I have found lots of posts about "just hard code the sucker" but there are no code examples. Can someone help a guy out?

My best stab is searching for code in node.module, event.module or flexinode.module that looks like this:

ORDER BY n.sticky DESC, n.created DESC

And try to make it look like this:

ORDER BY n.sticky DESC, n.startdate DESC

where start date gets is values from some portion of this:

$node->event_start

But I'm not fluent in this PHP language and maybe someone out there has a better head for it than me. I don't even know what module is supposed to handle the list creation, since the flexinode module holds the content and the event module just sticks on the date, but no matter what I do the list order never actually changes.

Comments

seaneffel’s picture

I didn't note that I was using Drupal 4.6.6, most recent Flexinode and Event modules. Despite, I believe the file I am meant to edit is the core taxonomy.module but i don't know what syntax to insert in the ORDER BY line...

Maybe: ORDER BY n.sticky DESC, e.event_start DESC, n.created DESC

Where event_start is a value from the events module. Anyone know the syntax for this?

Also, I fully understand that another module might do this better, but I don't need the flexibility nor sophistication of something like cck, views, etc. I actually WANT a barbaric hard coded fix...