• Resolved Taro

    (@sicktb)


    Im trying to get the Thumbnails sorted. Some(most) of the thumbnails are not loading and i have to press recover. But now i have to scroll tru 15 pages. I want to sort the “no image” with thumbnail on top.

    I tryed the following, but its not working…:

    add_filter( ‘my_sortable_ngg_page_content_column’, ‘my_sortable_ngg_page_content_column’ );
    function my_sortable_ngg_page_content_column( $columns ) {
    $columns[‘column column-3’] = ‘column column-3’;

    return $columns;
    }

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Taro

    (@sicktb)

    tryed the following but did not work:

    add_filter( ‘manage_edit-nggallery-manage-gallery_sortable_columns’, ‘thumbnail_post_column’ );
    function thumbnail_post_columnn( $columns ) {
    $columns[‘thumbnail’] = __(‘Thumbnail’, ‘nggallery’);

    return $columns;
    }

    Plugin Contributor photocrati

    (@photocrati)

    @sicktb – Looking at your example code neither of the hooks you are trying to use exist in NextGEN Gallery so any callback code used will not be applied. Aside from this, can you provide any additional details on the sort issue you are having?

    Thanks!

    – Cais.

    Thread Starter Taro

    (@sicktb)

    I’m trying to sort the thumbnail field from a gallerie “Manage Galleries”.
    I like it to sort the “broken” image first. When i upload new images to the folder and press scan folder all the thumbnails are broken. This is probably because i don’t use downsampling of the orignal image.

    I can fix this by press ‘recover’ one by one. The bulk option is not working for me.

    https://domain.com/wp-admin/admin.php?page=nggallery-manage-gallery&mode=edit&gid=1&_wpnonce=be5d9e8029

    This is the field i like to make sortable:
    Sort

    This are the settings:

    Image Options: Image Options

    Thumbnail Options: Thumbnail Options

    • This reply was modified 8 years, 6 months ago by Taro.
    Plugin Contributor photocrati

    (@photocrati)

    @sicktb – The hooks available for the manage galleries image list (based on the screen snippet) can be found within the following file:
    ../wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/admin/manage-images.php

    I would recommend trying to make your changes from those filters.

    Thanks!

    – Cais.

    Thread Starter Taro

    (@sicktb)

    @cais.

    I have been looking at the php file but it seems not to be working.

    add_filter( 'manage_edit-ngg_manage_images_columns', 'ngg_thumbnail_column' );
    function ngg_thumbnail_column( $columns ) {
    	$columns['thumbnail'] = 'thumbnail';
    
    	//To make a column 'un-sortable' remove it from the array
        //unset($columns['date']);
    
    return $columns;
    }
    • This reply was modified 8 years, 5 months ago by Taro.
    Plugin Contributor photocrati

    (@photocrati)

    @sicktbmanage_edit-ngg_manage_images_columns is not one of our hooks (as noted above). If you want to use a specific “hook” to do something it must exist first. In this case, there is no auto-generated hook like it appears you are trying to use, you are only left with the hooks that do exist as referenced in the file above.

    Thanks!

    – Cais.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Sortable admin column’ is closed to new replies.