Allow an addition to block feature syntax to mean only blocks in given regions. For instance:

skinr[second_sidebar][features][] = block-sidebar_second
skinr[second_sidebar][title] = Second sidebar
skinr[second_sidebar][description] = Theming for left-hand column blocks.
skinr[second_sidebar][type] = checkboxes

After looking through the issue queue, and not finding this functionality to greatly improve the usability of Skinr from a site administrator's perspective, i implemented it for Drupal 6. Coming to file this issue, i did find the successfully fixed issue to do the same in Drupal 7 #523820: Ability to specify regions in info file. Not sure if this should be posted to that issue, or mark it patch to be ported over there. (There never was a patch posted to that issue, it was just marked fixed.) However, this is a working patch for Drupal 6, for anyone who might be interested.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jacine’s picture

Oh, nice :)

Did you forget the patch?

mlncn’s picture

Status: Active » Needs review
FileSize
1.86 KB

Patch attached.

Note that this patch takes a different approach to the syntax put into in Drupal 7, according to Jacine's documentation at #755722: Update documentation for Drupal 7 - regions and rules. Given that only blocks can be region-specific, i think the syntax used here - which happens to be the same as originally proposed in the D7 issue #523820: Ability to specify regions in info file - makes more sense.

moonray’s picture

The only issue with region specific blocks is that when the block is put into a different region, the skin remains.

mlncn’s picture

This patch fixes two bugs in my original patch: incorrect deltas when they included dashes (needed to use explode with a limit), and using a $module variable that conflicted with the existing use of $module. Oops! This will now work for blocks not provided directly by the block module.

Jacine’s picture

I haven't had a chance to test this out, but does the latest patch in solve the issue @moonray brings up in #3? That's a bit of a WTF.

mlncn’s picture

No, the patch in #4 does not fix the problem brought up in #3. Also, i've handed off the site i added this for, and won't have an actual need for this in D6, so i recommend we leave this issue for anyone who does want this in 6, if anyone cares that much, and figure out this functionality first in 7. Maybe it has all been figured out properly? I'm happy to help anywhere the D7 issue is re-taken up.

Jacine’s picture

Thanks Ben!

Yeah, we have semi-working functionality in D7 for regions themselves. I think we'd have the same issue with moving blocks around in D7, but we could definitely try to make it work.

Jacine’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev

:)

moonray’s picture

Status: Needs review » Needs work

See post #3. This patch needs work.

We might go about this by checking the following: when a block is moved, check if the skinr settings still apply. If not, A) we toss out a warning (but where? and do we do that every time they visit the admin/build/blocks page?) or B) we drop those particular skinr settings (after a one-time warning).

Any other, better approaches? I don't like either very much, but couldn't think of a better solution.

moonray’s picture

Status: Needs work » Postponed

Postponing. This is going nowhere and we need a good plan to be able to do this.

moonray’s picture

Version: 7.x-2.x-dev » 8.x-2.x-dev
Issue summary: View changes

New features start in latest version.