• Resolved jweidler

    (@jweidler)


    Hi Chouby and hi to anyone else who might have an idea,

    first off thank you for this neat plugin, it is so far the best multilang solution I’ve come across.
    I’m facing some problems because of the absence of lang information in the wordpress admin backend though. Some of my posts have the same title even though they’re written in a different language cause the titles are names. So once I’m trying to build some menus or attach images to posts I can start trying guessing which post is the right one since WordPress only provides post_titles in these lists. What I did so far was editing the function wp_ajax_find_posts() wp-admin/includes/ajax-actions.php to print out some post language information, but my hands feel really dirty now and I didn’t sleep that well, too.
    I know you’re not into WordPress that much but do you know if there’s a cleaner way to hook up with these functions or any other way at all to solve this?

    Thanks in advance and have a nice day,
    Jonas

    http://wordpress.org/extend/plugins/polylang/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Chouby

    (@chouby)

    I wrote a plugin (which will be merged with Polylang 0.9) to filter the content by language on admin side. Probably not bug free but may be useful for you though. http://pastebin.com/tQurU2ji

    Thread Starter jweidler

    (@jweidler)

    Thank you, you’re a genius! And thanks for the quick reply. The extension shows great promise, it will definitely help me once the bugs and FIXMEs are solved 🙂 especially this one:
    // FIXME add ajax to manage tag cloud and list table when changing language ?

    the bugs that I found now:

    • no media is listed if anything else than “Show all languages” is chosen (which is comprehensible since at least my media items don’t have a language)
    • Appearance/Menus: Filter filters meta boxes wonderfully but the menu boxes on the right are always empty

    I solved my current issue for now by making my custom post types hierarchically and giving them distinguishable parents.

    I’m gonna resolve this topic once 0.9 rolls out 🙂 do you have any rough estimate for that?

    Thanks again and have a nice day,
    Jonas

    I have placed a code in my functions.php

    add_filter('manage_posts_columns', 'my_custom_columns');
     function my_custom_columns($defaults) {
        unset($defaults['tags']);
        $defaults['post_modified'] = 'Modif';
        $defaults['menu_order'] = 'Order';
        return $defaults;
    }
    add_action('manage_posts_custom_column',  'my_show_columns');
     function my_show_columns($name) {
         global $post;
         $mypost = $post->ID;
         switch ($name) {
             case 'menu_order':
                 echo $post->menu_order;
                 break;
             case 'post_modified':
                 echo $post->post_modified;
                 break;
    	 }
     }

    that’s works for pages and articles.

    Plugin Author Chouby

    (@chouby)

    I edited my code in pastebin. This should improve the situation for media and menus. v0.9 is planned for the end of the summer.

    Thread Starter jweidler

    (@jweidler)

    Hi Chouby,

    thanks again, the modifications work like a charm! Only thing missing is the ajax stuff, but that’s probably going to be a little more tricky.
    But that’s fine for me, I’ve got my dirty hack for that for now.
    End of summer sounds good 🙂

    Best regards,
    Jonas

    Thread Starter jweidler

    (@jweidler)

    Oh, and as good as resolved of course.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Polylang] How to add post language information to post lists/tables in the admin backend’ is closed to new replies.