Implement hook_context_conditions()

Scott Reynolds - October 8, 2009 - 23:09
Project:Smackdown
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

This patch allows for a context to be set after a user has voted on a smackdown. This would be valuable so that a new block could be shown with results of the previous smackdown.

AttachmentSize
smackdown_context.patch988 bytes

#1

Scott Reynolds - October 22, 2009 - 18:29

That would be a bad patch as it would require context to be enabled.

/**
+ * Implementation of hook_init().
+ */
+function smackdown_init() {
+  if ($_GET['smackdown_vote'] && module_exists('context')) {
+    context_set_by_condition('smackdown', TRUE);
+  }
+}
+
+/**

#2

sirkitree - October 23, 2009 - 16:42
Status:needs review» fixed

committed http://drupal.org/cvs?commit=278840

#3

Scott Reynolds - October 23, 2009 - 17:16
Status:fixed» needs review

Missed the important hunk :-D

AttachmentSize
smackdown_599614-3.patch 941 bytes

#4

sirkitree - October 23, 2009 - 17:31
Status:needs review» fixed

Oops ;) As you can see I don't really want to maintain this module anymore. Let me know if you know anyone interested.

#5

System Message - November 6, 2009 - 17:40
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.