Support » Plugins » [Plugin: NextGEN Gallery] NextGEN WebSlices not playing well with Docking Boxes

  • Hi,
    I am the author of a theme called Suffusion. My theme makes use of BrotherCake’s Docking Boxes (dbx) for sidebar drag and drop functions. One of my theme’s users reported that the NextGEN plugin was not working with my theme. Specifically, it seemed to be messing up the layout of the widgets.

    I played with the plugin a bit and figured out that if web-slices are disabled then it works fine, but otherwise not.

    I took a look at the code for your plugin and found that you have the following section:

    if ( $webslice ) {
    			//TODO:  If you change the title, it will not show up in widget admin panel
    			$before_title  = "\n" . '<div class="hslice" id="ngg-webslice" >' . "\n";
    			$before_title .= '<h2 class="widgettitle entry-title">';
    			$after_title   = '</h2>';
    			$after_widget  =  '</div>'."\n" . $after_widget;
    		echo $before_widget . $before_title . $title . $after_title;
    		echo "\n" . '<div class="ngg-widget entry-content">'. "\n";

    This conflicts with my setup:

    	    'name' => 'sidebar-1',
    	    'before_widget' => '<!--widget start --><div id="%1$s" class="dbx-box %2$s">',
    		'after_widget' => '</div></div><!--widget end -->',
            'before_title' => '<h3 class="dbx-handle">',
    		'after_title' => '</h3><div class="dbx-content">',

    So if web-slices are turned on, the before_title, after_title and after_widget parameters that I have are overwritten, causing a mismatch in the starting and closing div tags. I believe the problem can be resolved by adding appropriate filters but I am not really sure of what filter to call, since your code is being invoked after mine.

    Is there some way to resolve this? My gut feeling is that every theme that uses Docking Boxes will face this problem, and so will any theme that treats the widget title as a “handle” for dragging the rest of the content. I could provide an option to disable docking boxes if the layout gets messed up, but I would prefer using that as plan B.


  • The topic ‘[Plugin: NextGEN Gallery] NextGEN WebSlices not playing well with Docking Boxes’ is closed to new replies.