This plugin is really great, I think it’s gonne be really useful.
One slight issue – I want to use it with an event plugin, so people can post events without having to login to the admin panel.
The plugin I’m using, uses the date of the post for posts in a specific category, so I need to be able to change the post date.
I guess I need to write a widget to do this, but I looked at the code for the other widgets and don’t have a clue as to how I’d go about doing that. Could I have a pointer in the right direction (if what I want to do is possible…)
I am doing something different where I am placing a custom field for the categories of events, then placing the custom field ( eventdate ) into the TDO forms ( which is why I am here now ).
When I get a chance, I will post the code. It uses arguments to change integers into dates ( 900604 ) June 4, 2009 ) which posts into the post and arranges events by the event date and not post date.
I am also working on the argument of dismissing dates out of the archives after a specific date so there won’t be events listed from 2005 or something. I would say reply to me in about two weeks and I would have something.
If this is the official “wishlist” post for a date widget please count me in as well. I am attempting to set up an events category that will post future events. It would be great if TDOMF allowed you to enter the future date of the post. I have already installed “the Future is Now” plugin to allow future posts to be displayed. The missing link is the ability to enter in the event date.
As someone has noted above, this is already possible – to some extent – through the use of a custom field. I’ve done it by adding a custom field to my form for “eventdate”, and making the following request of people inputting events into the form:
“Event date (must be entered in yyyy-mm-dd format; i.e., 2 July 2008 would be entered as 2008-07-02)”.
Then, in the relevant page (in my case index.php) I’ve used this code to order the events in event date order (by reference to the custom field data) rather than post order. The relevant bit of code looks like this:
Legal events
posts
LEFT JOIN $wpdb->postmeta ON($wpdb->posts.ID = $wpdb->postmeta.post_id)
LEFT JOIN $wpdb->term_relationships ON($wpdb->posts.ID = $wpdb->term_relationships.object_id)
LEFT JOIN $wpdb->term_taxonomy ON($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)
WHERE $wpdb->term_taxonomy.term_id = 13
AND $wpdb->term_taxonomy.taxonomy = 'category'
AND $wpdb->posts.post_status = 'publish'
AND $wpdb->postmeta.meta_key = 'tdo_date'
ORDER BY $wpdb->postmeta.meta_value ASC limit 7
";
$pageposts = $wpdb->get_results($querystr, OBJECT);
?>
<a href="" title="">
For what seem to be similar solutions, see: Order posts by custom key revisited and Sort events by date in WordPress using custom fields.
You can see my implementation in action here.
The only downside with this, is that the custom field data doesn’t go into the event category feed. As such, third parties who may wish to take the event feed and parse it onto their own site (using, e.g., FeedWordPress) won’t be able, automatically, to order by event rather than post date.
Anyway, hope the above helps. If anyone has a solution to the feed problem I just mentioned, would be very grateful if you could post it here.
Cheers
Richard
Hmmm. My code excerpt above didn’t seem to come through properly, even those I used the code tags. Will try again:
Legal events
posts
LEFT JOIN $wpdb->postmeta ON($wpdb->posts.ID = $wpdb->postmeta.post_id)
LEFT JOIN $wpdb->term_relationships ON($wpdb->posts.ID = $wpdb->term_relationships.object_id)
LEFT JOIN $wpdb->term_taxonomy ON($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)
WHERE $wpdb->term_taxonomy.term_id = 13
AND $wpdb->term_taxonomy.taxonomy = 'category'
AND $wpdb->posts.post_status = 'publish'
AND $wpdb->postmeta.meta_key = 'tdo_date'
ORDER BY $wpdb->postmeta.meta_value ASC limit 7
";
$pageposts = $wpdb->get_results($querystr, OBJECT);
?>
<a href="" title="">
svenl77
Guest
May 24th, 2008 at 9:05 pm
I’m looking for exactly the same info!
Permalink | Quote