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.
| Attachment | Size |
|---|---|
| smackdown_context.patch | 988 bytes |

#1
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
committed http://drupal.org/cvs?commit=278840
#3
Missed the important hunk :-D
#4
Oops ;) As you can see I don't really want to maintain this module anymore. Let me know if you know anyone interested.
#5
Automatically closed -- issue fixed for 2 weeks with no activity.