No Future Posts

Diese Plugin ändert den Post Status von “future” auf “publish”.

Warum? Normalerweise werden Einträge, die in der Zukunft liegen von Wordpress ausgefiltert. Das hat den Vorteil, dass man Beiträge schreiben kann, die automatisch erst zu einem gewählten späteren Zeitpunkt veröffentlicht werden. Nachteil des Ganzen ist aber, dass man keine Termine einblenden kann. Durch mein Plugin werden nun auch vordatierte Beiträge ganz normal angezeigt.

Ausnahmen (Status bleibt “future”) können per Artikel oder per Kategorie angegeben werden.

Momentane Probleme:

  • Die Post-Anzahl in der Kategorieliste ignoriert diese Manipulation da sie einen eigenen Filter nach post-datum benutzt. Aber die Zahlen kann man ja ausblenden. ;)
  • Um die Posts auch im Kalender(-Widget) anzuzeigen muss man an die Core-Dateien da auch hier eine eigene Abfrage benutzt wird. Siehe Patch unten.

Download bei Wordpress

Calendar Patch:

To show the future posts in the calendar widget too you have to edit wp-includes/general-template.php about row 656 (Wordpress 2.6.1).

Look for

$dayswithposts = $wpdb->get_results("SELECT DISTINCT DAYOFMONTH(post_date)
FROM $wpdb->posts WHERE MONTH(post_date) = '$thismonth'
AND YEAR(post_date) = '$thisyear'&
AND post_type = 'post' AND post_status = 'publish'
AND post_date < '" . current_time('mysql') . ''', ARRAY_N);

and change to

$dayswithposts = $wpdb->get_results("SELECT DISTINCT DAYOFMONTH(post_date)
FROM $wpdb->posts WHERE MONTH(post_date) = '$thismonth'
AND YEAR(post_date) = '$thisyear'
AND post_type = 'post' AND post_status = 'publish' ", ARRAY_N);


No Future Posts 1.2.1


Contributors: Tom Braider
Donate link: http://www.unicef.org
Tags: posts, future, events
Requires at least: 2.0
Tested up to: 2.8
Stable tag: 1.2.1

Changes the post status from "future" to "publish".

Description



Changes the status of all posts from "future" to "publish".
So future posts will show in your blog like other posts.
I use it to show events. No calendar plugin is needed.

Exclude liste for posts and categories.

Installation


  1. unzip plugin directory into the /wp-content/plugins/ directory
  2. activate the plugin through the Plugins menu in WordPress
  3. fill the exclude lists on options page

Frequently Asked Questions



Need Help? Find Bug?



read and write comments on plugin page

Screenshots



Arbitrary section



Known Issues
  • post counter in the category list ignores future posts because it is using the post_date
  • plugin "Customizable Post Listings" must change because it is using it own sql-query

Changelog



1.2.1
  • new translation: russian, thanks Marcis Gasuns http://www.fatcow.com

1.2
  • new: uninstall function for wp 2.7

1.1
  • new: exclude lists for posts and categories
  • new: languages english, german

1.0
  • first release
created by Readme Parser

RSS-Feed 22 Kommentare

alle Kommentare anzeigen / show all comments
  1. baron sagt:

    hi. Thanks for plugin

    perfect.

    Regards

  2. tru sagt:

    I have an event site and love this plugin but is there anyway to reverse it so that the dates/posts are in chronological order?

  3. Tom sagt:

    Hello tru,
    the post order is made by wordpress not by the plugin. Maybe the “query-posts” tag can help you. Sorry, it’s german.

  4. TOM!

    Still loving your plugin. I have another challenge for you, though:
    I use your plugin for events that get posted to our site. It allows upcoming events to be viewed. What I’d like to do now, though, is make a list of posts in only our “Events” category that will list posts starting with the current date and into the future.

    We can display the Events category just fine, but when it comes to listing, I can either do highest (farthest in the future) date and back, or lowest (starting with the farthest in the past). What I’m going for is a list that starts on the current date and displays Event posts into the future.

    I’ve been picking through the codex for the last couple days trying to find how i can do this, but no luck. As best I can tell there should be an argument that would fit in our WP_Query(“cat=11&showposts=10″); but searching the codex and asking around the WordPress forums has been no help so far.

    So, if you know anything that might help, I’d be much obliged to you once again!

    Thank you.

    • Tom sagt:

      OK, for the first problem you can try Different Posts Per Page to change order an number of posts per category. Older posts at the top newer at the bottom.
      The second problem ist to start “now”. I don’t know a solution. Maybay it’s ok to show only one month e.g. <a href=".../?cat=4&m=200901">Events January 2009</a>?

  5. David sagt:

    Tom – Great looking plugin. To display list of both future and previous events in sidebar, could use this with your plugin:
    http://webdemar.com/wordpress/display-future-posts-in-your-wordpress-theme/

    I think the advantage of your plugin is that it will actually publish on single.php.

  6. Hello!

    I’m to translate your plugin in belorussian language. when You publish this? My email – mrilyuha@gmail.com. Please answer me!

  7. FatCow sagt:

    Hello!

    I’m to translate your plugin to belorussian language. when You publish this? My email – mrilyuha@gmail.com. Please answer me!

  8. [...] events. The user can set post dates into the future and they will still appear on the blog. › Visit plugin site › Share and [...]

Kommentare Seite:«12
alle Kommentare anzeigen / show all comments

Kommentar schreiben




Quicktags:

Stoppt die Vorratsdatenspeicherung! Jetzt klicken & handeln!Willst du auch bei der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien:
Tiny Corner