WordPress.org

Ready to get started?Download WordPress

Forums

Editorial Calendar
Drag and drop (5 posts)

  1. Daiv Mowbray
    Member
    Posted 4 years ago #

    I need to drag and drop posted entries to order them on the calender.
    Can I edit the plugin code to be able to do this?
    What file, and code line would I need to edit?
    The FAQ says:

    Why can't I move published posts?
    Moving published posts can cause problems with some RSS feeds and is generally not a very popular thing to do. The calendar only allows you to move scheduled and draft posts.

    Thanx for any pointers.

  2. Daiv Mowbray
    Member
    Posted 4 years ago #

    Ok, I found the following and have made some changes,
    I can now drag a published post to a new day.
    This may create new bugs...
    file:edcal.js line 1131;
    find the if clause:f (edcal.isPostMovable(post)) {
    and comment out the if structure.
    Also change the class of the returned li:
    class="post draft draggable"
    Also changed line 1072 to:
    return post.editlink && post.status == "publish"

    As I said this may cause problems with other functionality, but all I wanted was to drag and drop the order of posted posts.

    Now All I need is for the post name to have an image to see what it is.

  3. Zack Grossbart
    Member
    Plugin Author

    Posted 4 years ago #

    Hello Daiv,

    We can't really support the plugin after you make changes to it, but...

    The easiest way to make this change is to comment out the isPostMovable function in edcal.js. Normally it looks like this:

    isPostMovable: function(/*post*/ post) {
    return post.editlink && post.status !== "publish";
    }

    Change it to look like this and all posts will be editable

    isPostMovable: function(/*post*/ post) {
    //return post.editlink && post.status !== "publish";
    return true;
    }

    This one change will handle all of the classes, the dragging and dropping, and the editing. It should be pretty stable, but I haven't given it extensive testing and can't really support it.

    Good luck.

    -Zack

  4. Daiv Mowbray
    Member
    Posted 4 years ago #

    Thanx for the tip,
    I'll put it to use..
    I'm setting up WP as a portfolio.
    Adding work from the past to past dates.
    Plus using bulk post creation,
    Then I have to publish the post before adding an image.
    This gives me my year/ month upload folder structure.
    With hundreds of posts, it's a big project.

    I'd love to see this plugin with the following functionality:
    - option to see first attached or featured image in mini beside post title.
    - option to drag and drop published works
    - function to jump from year to year and month to month,
    ie: from 2010 to 1990, of from january to september.

    Thanx again

  5. Zack Grossbart
    Member
    Plugin Author

    Posted 4 years ago #

    Hello Daiv,

    Adding images to the calendar is a great idea. I need to think about how to implement that.

    Dragging and dropping published posts has been a running debate. We are still thinking about the best solution here.

    We do support jumping around the calendar by using the up and down arrow keys on your keyboard and the jump buttons in the title. We've considered adding the ability to jump to a specific date. We're working on the best solution.

    Thank you,
    Zack

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic