WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Front-end Editor] Can I change post category as well? (15 posts)

  1. levani01
    Member
    Posted 4 years ago #

    Does this plugin allow to change post category directly from site as well?

    http://wordpress.org/extend/plugins/front-end-editor/

  2. scribu
    Member
    Posted 4 years ago #

    Currently, no:

    two reasons why it wasn’t added until now:
    - it would be really slow if you have a lot of categories
    - the interface takes up quite alot of screen space

  3. levani01
    Member
    Posted 4 years ago #

    OK, thanks for quick response.

  4. qwik3r
    Member
    Posted 4 years ago #

    YOu said "up until now" as if it can be done now. I am using the_category and was wondering if I can make those editable so I can remove a category on the fly.

  5. scribu
    Member
    Posted 4 years ago #

    I should have said "currently". The conditions haven't changed, so my position remains the same.

    Maybe this will help you: Use the_terms() to change the category

  6. Cristian Tacchi
    Member
    Posted 4 years ago #

    what about to display a dropdown list?
    if it takes longer time to load.. o don't care.. i think it will be really great to be able to change the category of a post.. indeed.. i need that too

  7. scribu
    Member
    Posted 4 years ago #

    Come to think of it, people that have a lot of categories could just disable that editable field. I'll try to include a dropdown in the next version.

  8. scribu
    Member
    Posted 4 years ago #

    I just rembembered why I didn't use a dropdown: If I used a dropdown, you could only have one category assigned per post and you couldn't add new categories if you wanted.

    In the next version of the plugin, I'll make categories be editable just like tags are editable, but I'll add an autosuggest, so that you don't mistype a category by mistake.

  9. scribu
    Member
    Posted 4 years ago #

    You can try out the new category editing capabilities by downloading the Development Version (1.6a5).

  10. Cristian Tacchi
    Member
    Posted 4 years ago #

    Hi Scribu..

    i was testing your last published version of Front-end editor and it just works fine..

    indeed i'm using it very hard in a TNT Chile web application that i has been developing.. without your plugin it would be just imposible.

    now.. i have a question..

    the case is this.. in this web app.. i have two themes at the same time.. one for editors and one for authors.. and i need that editor to be able to edit anything.. but i need for authors to not be able to edit categories.. so.. because the plugin is one and the templates are two.. i suppose that the solution is to use a code to..

    - enable category edition for editors with an inline code or
    - disable category edition for authors with an inline code

    is this possible?

    greetings

  11. scribu
    Member
    Posted 4 years ago #

    Place this code in your theme's functions.php:

    function restrict_category_editing($allow, $post_id, $filter) {
    	if ( 'the_category' != $filter )
    		return $allow;
    
    	return $allow && current_user_can('edit_others_posts');
    }
    add_filter('front_ed_allow_post', 'restrict_category_editing', 10, 3);

    As the code suggests, only users that can edit other users' posts can edit categories.

  12. Cristian Tacchi
    Member
    Posted 4 years ago #

    oooooooohh.. i love you MAN!..
    (i'm straight.. just in case)

    i dont know what i will do without you!..

    one question.. where do you learned all about wordpress programming?.. i want to learn.. maybe that way i will be ablet to sort of.. help you (and other people) in return..

  13. scribu
    Member
    Posted 4 years ago #

    You're welcome :)

    As for learning WP programming, I guess you just need to learn PHP, on top of which you add the knowledge of the Plugin API.

  14. cyrus6
    Member
    Posted 4 years ago #

    This may be the wrong thread for this but, would it be possilbe to tweak front end editor so it can ADD posts as well as edit them?

    I've tried a couple of other plugins that do just that, but they cause a conflict with another plugin that is very important to the project I'm working on.

    Thanks!

  15. nzde
    Member
    Posted 4 years ago #

    The best plugin to do that is Gravity Forms.

Topic Closed

This topic has been closed to new replies.

About this Topic