Feature #313

Create Plugin/Widget for Hero Image Space on Commons Homepage

Added by Matt Gold over 11 years ago. Updated over 11 years ago.

Priority name:
Category name:
WordPress (misc)
Target version:
Start date:
Due date:
% Done:


Estimated time:


Please see discussion on Basecamp.


#1 Updated by Boone Gorges over 11 years ago

  • Status changed from New to Assigned
  • Assignee set to Ron Rennick

#2 Updated by Boone Gorges over 11 years ago

I've installed Ron's plugin on the wp-3.0-upgrade branch with Still needs some styling and bugfixing to make it work with our theme.

#3 Updated by Boone Gorges over 11 years ago

  • Status changed from Assigned to Resolved

I've made the changes necessary to make the widget look right on the front page.

For some reason there were some weird styling conflicts between Ron's release version and the Commons style. I stared at the CSS and markup for a long time, guessing at a lot of stuff, before I finally got it to look right. It needs cross-browser checks, and I encourage you not to look at the code, as it is messy and sucky. But as of now it looks right, at least.

Ron, I was having problems with the way that the plugin was feeding inline height/width attributes on the images. I changed line 114 to

<?php                echo apply_filters( 'pgw_image_markup', $p->tag ); ?>

Then I put a filter in our theme's functions.php that grabs the height/width attributes in the markup and changes them to the correct values. Again, this is probably a stupid way to do it, but for the life of me I couldn't get it to work with CSS, and a stupid working method is better than a proper non-working one :)

There is also a slight issue with the way that the widget loads. It seems as if there's a hiccup before it loads the plugin's stylesheet. You can see it at This seems like an issue beyond Ron's plugin, so I'll open a separate ticket for it.

A note to myself and anyone else who manages the Gallery Posts data type. Don't put images directly into the post, as they'll show up double. Just upload them from the post edit screen, so that they're associated with the plugin. Also, when launching on the real site, choose "Large" as the image size on the widget.

Also available in: Atom PDF