Organic Group Conditions
Apfel007 - January 19, 2009 - 14:42
| Project: | Header image |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Description
Hi,
what about a function to change the image for specifc OG-Groups
Cheers

#1
We also needed the ability to set conditions based on Organic Groups, so I whipped up a small patch to accomplish this. The patch is for the 5.x branch and needs to be tested. I should have a 6.x patch to share when we begin the upgrade process to Drupal 6 in mid-April. Hopefully somebody will beat us to this though as well as bring the 6.x branch of Header Image to a stable release.
#2
Sorry, I forgot to mention that this implementation is incomplete. At the moment, only group home pages will have their headers changed. Any sub pages of the group would end up using some other condition, such as URLs. This is obviously not the desired behavior, so I'll have it fixed up as soon as I can.
#3
Here's the updated patch. The group ownership of each node will be looked at when determining whether or not a node matches the conditions. The node must simply be in one of the condition groups.
Test it out and let me know how it goes.
#4
We'll be moving to the 5.x-dev version next week to make use of random images. I'll roll this patch for OG support on the dev branch at that time.