Closed (fixed)
Project:
modr8
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Nov 2006 at 04:28 UTC
Updated:
26 Aug 2007 at 04:24 UTC
Jump to comment: Most recent file
Comments
Comment #1
pwolanin commentedThis is a good idea, but I'm not sure this is the best implementation. What if my module adds extra information to a variety of node types, but doesn't define any of them? I'd think this should either be a invoking only hook_nodeapi, or at least invoking it in addition to invoking this new hook.
Comment #2
scott.mclewin commentedRather than expand the cases in nodeapi, how about making this a module_invoke_all call rather than invoking it back on the data type? If you nod your virtual head I'll make that change.
Comment #3
pwolanin commentedSure, that's probably cleaner and more efficient in any case.
Comment #4
pwolanin commentedHow about something like the attached patch? Your module could look for the flag in hook_nodeapi('view') or hook_view. this way the new content gets properly rendered. I guess another option is that to add the flag and then within modr8_nodeapi('view') to do the module_invoke_all.
Comment #5
pwolanin commentedsorry, patch is for 5.x/HEAD
Comment #6
scott.mclewin commentedThat's nice and clean. When I move my main site up to 5.0 I'll use this mechanism.
Comment #7
pwolanin commentedProbably I should add to this patch a check by Modr8 itself so that the moderation message is not added when viewing the moderation page.
Comment #8
pwolanin commentedbetter patch attached- and committed to 5.x/HEAD. if you can take 5 minute to backport to 4.7.x, I'll commit that too.
Comment #9
pwolanin commentedattached patch is a backport for 4.7, and committed to 4.7 branch
Comment #10
pwolanin commentedComment #11
scott.mclewin commentedThanks Peter. I'm still reeling from newborn-baby lack of sleep. My 'playtime' with Drupal has dropped to an hour every few days. I had intended to port this for you. I have a backlog of changes to production sites that I'll work through, then I'll redo the modr8 patches from December to add the 'resubmit' functionality and some of the other mods. Is it OK if this happens against 4.7? I'm not up to 5 yet and won't be for many months.
Comment #12
pwolanin commentedComment #13
scott.mclewin commentedOn the off chance you ever see this note on a closed issue - this solution works out just fine and is cleaner than the original approach I took. Thanks. (now that the baby is eight months old I have time for Drupal and D5 again!)