Closed (duplicate)
Project:
Audio
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
23 Mar 2006 at 22:50 UTC
Updated:
16 May 2006 at 23:50 UTC
i've talked with q0rban about adding some hooks so other modules could see the tags before they're written and add/modify them, and then get a copy of the final tags that were saved.
i think it'd make sense to centralize it in a single hook, maybe hook_audioapi($op, $node)? the ops that come to mind would be something like a "before save" "after save". not sure if it make sense to distinguish between inserts and updates.
Comments
Comment #1
drewish commentedon place i think it'd be really useful is for people who want to write improved media browsers that do more searching/browsing based on the tags. thomaz had talked with me in email about writing an audio browser module he's written for 4.6 that would probably benefit from these hooks when it's ported to/rewritten for 4.7. i hope he doesn't mind if i paste in a bit from an email but i think it's very interesting:
Comment #2
moshe weitzman commentedJust a nit - please call this hook_audio() and not audioapi. the api suffix is a relic that we are nearly rid of. hook_comment, hook_taxonomy, hook_user are the new way
Comment #3
drewish commentedgood call moshe
Comment #4
zirafa commentedhow would this api then be called? module_invoke('audio', 'audio'......?
Comment #5
drewish commentedi was thinking more like:
module_invoke_all('audio', $op, $node);Comment #6
drewish commentedsee also: http://drupal.org/node/33708
Comment #7
drewish commentedi'm going to mark this as a duplicate of http://drupal.org/node/33708 because that's got the patch that'll probably get committed.