• bkjproductions

    (@bkjproductions)


    In the other thread (now closed) someone wanted to launch the new media interface, rather than the old interface.
    Try adding this to the bottom of the gallery-metabox-ajax.js file:

    jQuery(‘#manage_gallery’).click(function() {jQuery(‘#insert-media-button’).click();});

    I think that might work. Basically, you want to effectively divert the click of the “Manage Gallery” button that comes with Gallery metabox, so that it clicks instead on the “Insert Media” button.

    https://www.ads-software.com/plugins/gallery-metabox/

Viewing 1 replies (of 1 total)
  • Thread Starter bkjproductions

    (@bkjproductions)

    One thing I noticed about the OLD “insert media” interface for WordPress pre-3.5, is that while you can still access it via Gallery Metabox, it’s broken in its layout for some reason.

    That is, the original WP media interface has a list of images attached to the current post, where the thumbnail, file name, order box, and action are shown. Here’s the iframe that is loaded into Thickbox when the “Manage gallery” button is clicked:
    wp-admin/media-upload.php?post_id=799&type=image&tab=gallery&
    (Substitute some other post_id=799 for your own existing post_id, of course!)

    When viewed by itself it’s fine. When viewed in the Thickbox context, apparently some other Post Editor css is interfering.

    Below is the updated CSS for fixing this. The tricky thing is you need to find a way to insert it when the “insert media”. I did a rewrite of the plugin for my own use, which affected several files. The CSS below is what I added to the plugin’s CSS file, and to the metabox-gallery.php I added this:

    function be_gallery_metabox_admin_theme_style() {
    	// add it only when we're on the gallery page
    	if (@$_GET['tab']=='gallery') {
    		wp_enqueue_style('be_gallery_metabox-admin-theme', plugins_url('lib/css/gallery-metabox-style.css', __FILE__));
    	}
    }
    add_action('admin_enqueue_scripts', be_gallery_metabox_admin_theme_style');

    Add to bottom of gallery-metabox-style

    .media-item .filename {
    	margin-left: 50px;
    }
    #media-items .media-item {
    	clear: both;
    	position: relative;
    }
    .media-item .pinkynail {
    	position: absolute;
    }
    #media-items .menu_order_input {
    	padding: 2px 4px;
    	width: 4em;
    	text-align: right;
    }
    #media-items .menu_order {
    	width: 20%;
    	margin: 7px 0px;
    	padding-right: 60px;
    }
    #media-items a.toggle {
    	width: auto;
    	padding-right: 3px;
    }

Viewing 1 replies (of 1 total)
  • The topic ‘New Media 3.5 interface continued’ is closed to new replies.