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

jmstacey - March 31, 2009 - 20:54
Title:Image depents on OG Membership» Organic Group Conditions
Component:Miscellaneous» Code
Status:active» patch (to be ported)

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.

AttachmentSize
ogcondition_5.x.patch 2.73 KB

#2

jmstacey - April 1, 2009 - 02:52
Status:patch (to be ported)» needs work

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

jmstacey - April 2, 2009 - 18:58
Version:6.x-1.x-dev» 5.x-1.x-dev
Status:needs work» needs review

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.

AttachmentSize
ogcondition_5.x-1.patch 3.19 KB

#4

jmstacey - June 4, 2009 - 22:35

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.

 
 

Drupal is a registered trademark of Dries Buytaert.