I am trying to write a module that enables the display of enabled blocks to be dependent on the users browser using the browsecap module - the purpose here is to get around the problems associated with some of the DHTML menu modules like nice_menu or Shortcuts having trouble with Internet Explorer, but conceivably other blocks might benefit from returning seperate versions depending upon the browser rather than lots of messy CSS or Javascript hacks. (in effect NiceMenus is a seperate version of Menu).
My problem is that as far as I can see the logical place to do thsi would be by altering the blocl_list function in Drupal Head, and my understanding is that modules should not be rewriting core functions, can anyone familiar with the API suggest an alternative to altering the block.module?
Comments
Solution
this involves a hack of a core module, and is quick and dirty, and just takes care of my very immediate need to suppress my DHTML menus for IE.
If I get time I will refine it so that the browsecap table has a compatibility feild - ranging from 1 to 10 and the browsecap checks to see if the value is above a certain number, and then blocks and nodes conceivabley could slectively or alternately display depnding upon the compatibility level.
this code gets added/altered in modules/block.module