WordPress.org

Ready to get started?Download WordPress

Forums

WebLibrarian
[resolved] Show Thumbnail (or ThumbURL) on Admin Collection Page? (3 posts)

  1. KPRoche
    Member
    Posted 6 months ago #

    Would it be possible to add either the thumbnail image or the url for the image to the columns on the Librarian Collection admin page?

    I've successfully bulk-uploaded our collection into the database, and now my librarians are working to add the images. It would be very helpful to be able to see if an image is associated with an item without having to open each one in turn.

    I am moderately fluent in php, so if there is a hack I could try to test this I'm perfectly willing to do so.

    http://wordpress.org/plugins/weblibrarian/

  2. Robert Heller
    Member
    Plugin Author

    Posted 6 months ago #

    It is possible. You would need to edit the code in includes/WEBLIB_Collection_Admin.php, specificly changing the function get_columns() in class WEBLIB_Collection_Admin (at line 187) to add the column. You would need to add a function column_thumbnail that echos or returns a suitable img tag. The column you want to add is 'thumburl'. Its value would be a URL of an image (eg http://www.host.com/mumble.png) or empty (you can use WEBLIB_IMAGEURL . '/nothumb.png' as the url to display a 'no image available' image).

  3. KPRoche
    Member
    Posted 6 months ago #

    Thanks! Got it working.
    All we need to see is whether there is a url in the field, to make it easy to see which items need updating.

    I then got creative and added the ISBN to the list, and puzzled out how to make that a sortable field as well.

    Once I realized how that worked, I made the url field sortable as well so the librarians can sort the no-image part of the collection right to the top.

    It only took about 20 minutes to get it all done!

    If you want a copy of my hacked file, let me know where to send it.

Reply

You must log in to post.

About this Plugin

About this Topic