[EventCalendar] Conflict with WP-Sticky
Mathias Block
mathias at ww.tu-berlin.de
Fri Aug 31 18:26:27 UTC 2007
Hi Chris,
> So, I am still hoping someone can find a fix, and am willing to try
> out other modifications. Perhaps I should put up a test site and
> give admin role to whoever wants to try something out?
I've had the same problem before (and reported it as a bug a few weeks
ago not realizing that I wasn't even the first one). This will
obviously happen with every plugin trying to change the post order.
For my page, I wrote a simple hack (but I think I switched the "Keep
events seperate" option off again later). Here's the hack attached but
please keep in mind: This _really_ is just a hack, It might not work
with whatever configuration details you have. Try at your own risk. I
can't 100% remember what the hack changed in full details but if
necessary I'll dig into this again, just drop me a line offlist.
Regards,
Mathias.
Here's the changes I made to ec3_filter_posts_orderby in
eventcalendar3.php:
/** Change the order of event listings (only advanced mode). */
function ec3_filter_posts_orderby(&$orderby)
{
global $ec3;
// $regexp='/\bwp_posts.post_date\b( DESC\b| ASC\b)?/i';
$regexp='/\bwp_posts.post_date\b([^)]*\))( DESC\b| ASC\b)?/i';
if($ec3->order_by_start && preg_match($regexp,$orderby,$match))
{
if($match[2] && $match[2]==' ASC')
$orderby=preg_replace($regexp,'ec3_sch.start \1',$orderby);
else
$orderby=preg_replace($regexp,'ec3_sch.start \1 ASC',$orderby);
}
return $orderby;
}
More information about the EventCalendar
mailing list