Closed (fixed)
Project:
Taxonomy Edge
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Apr 2012 at 22:16 UTC
Updated:
13 Jan 2013 at 15:30 UTC
the leftandright module has an amazing technique to replace core taxonomy that can be easily copy-pasted:
http://drupalcode.org/project/leftandright.git/blob/refs/heads/7.x-1.x:/...
http://drupal.org/project/leftandright
Comments
Comment #1
gielfeldt commentedI'm familiar with the module and the technique doesn't sit well with me. I investigated it previously, and self-modifying code like this feels a bit hackish to me.
Comment #2
geek-merlini really share this feeling.
patching core is a maintainance nightmare otoh.
think it should be an optional module.
Comment #3
gielfeldt commentedThe problem is, that I don't think it's possible to make it optional. Leftandright contains the file taxonomy.module. This means that it overrides the core taxonomy.module entirely, regardless of the leftandright module being enabled. Yes it reverts to the core taxonomy module functionality through the self-modifying code part and the eval(), but completely optional is not possible. I wish Drupal had better options of overriding core modules.
Comment #4
geek-merlinyou are right.
> I wish Drupal had better options of overriding core modules.
this is what it boils down to.
we might take our darkest glasses and hackishly alter system.table???
i'll investigate that.
Comment #5
gielfeldt commentedFYI :-)
http://drupal.org/sandbox/gielfeldt/1546970
/me having fun hacking Drupal ...
Comment #6
geek-merlinhook_core_override_info() - really cool!
you should definitely add a dependency to http://drupal.org/project/bad_judgement
;-)
Comment #7
gielfeldt commentedBTW, the first versions of Core Override did exactly this, but it wasn't very reliable in all cases. I had to use dark magic to inject code when I wanted to rebuild the system table.
Check out the use of class CoreOverrideCodeInjector in http://drupalcode.org/sandbox/gielfeldt/1546970.git/tree/0e8307c to see how to pratice the arts of dark magic :-)
Comment #8
gielfeldt commentedSince the options for overriding core-modules are a bit scarse, short of cloning the taxonomy module and doing search/replace in the code, I consider this task for either fixed (using core override module, as it uses that particular technique) or won't fix.