OUI_Extension2()
See also: Hook Point Interface (old)
Return to Introduction  Previous page  Next page

*** This is an old interface that is currently retained for backward compatibility and will eventually be phased out in a future release of the OpenUI. It is in your best interest to convert any existing code over to the new OpenObjects interface.

This function gets called by the OpenUI when a hook point that the module has registered is reached. The function format is:

<MvFUNCTION NAME = "OUI_Extension2" PARAMETERS = "smod_id, ext_id, trash" STANDARDOUTPUTLEVEL = "text, html, compresswhitespace">  

This function is called with the following parameters:

·l.smod_id   set to the Sub-Module ID # of the registered hook point that is reached  
·l.ext_id      set to the Extension (or Hook-Point) ID # of the registered hook point that is reached  
·l.trash      specifies whether another module has specified that this hook point's output be skipped or not. (1=skip output, 0=don't skip output)  

An example module that removes the weight display on the product page would be:

<MvFUNCTION NAME = "OUI_Extension2" PARAMETERS = "smod_id, ext_id, trash" STANDARDOUTPUTLEVEL = "text, html, compresswhitespace">  
   <MvASSIGN NAME = "l.modcode"   VALUE = "{ Module_Code() }">  
 
   <MvIF EXPR = "{ l.trash }">  
      <MvFUNCRETURN VALUE = 0>  
   </MvIF>  
 
   <MvCOMMENT>**** ProductDisplay ****</MvCOMMENT>  
   <MvIF EXPR = "{ l.smod_id EQ 17 }">  
      <MvIF EXPR = "{ l.ext_id EQ 13 }">  
         <MvFUNCRETURN VALUE = 71>  
      </MvIF>  
   </MvIF>  
 
   <MvFUNCRETURN VALUE = 0>  
</MvFUNCTION>  

And the OUI_Install/OUI_Uninstall functions would be:

<MvFUNCTION NAME = "OUI_Install" STANDARDOUTPUTLEVEL = "" ERROROUTPUTLEVEL = "syntax, expression">  
   <MvASSIGN NAME = "l.modcode"   VALUE = "{ Module_Code() }">  
   <MvASSIGN NAME = "l.save_mod"   VALUE = "{ Modules.d.id }">  
   <MvDO FILE = "{ g.Module_Library_DB }" NAME = "l.ok" VALUE = "{ Module_Find_ID(Stores.d.ui_id) }">  
   <MvIF EXPR = "{ l.ok }">  
      <MvIF EXPR = "{ substring(Modules.d.code, 1, 6) EQ 'OPENUI' }">  
         <MvDO FILE = "{ g.Module_Root $ Modules.d.module }" NAME = "l.trash" VALUE = "{ OUI_Register_Extension(l.modcode, 17, '------------*') }">  
      </MvIF>  
   </MvIF>  
   <MvDO FILE = "{ g.Module_Library_DB }" NAME = "l.ok" VALUE = "{ Module_Find_ID(l.save_mod) }">  
 
   <MvFUNCRETURN VALUE = "{ l.ok }">  
</MvFUNCTION>  
 
<MvFUNCTION NAME = "OUI_Uninstall" STANDARDOUTPUTLEVEL = "" ERROROUTPUTLEVEL = "syntax, expression">  
   <MvASSIGN NAME = "l.modcode"   VALUE = "{ Module_Code() }">  
   <MvASSIGN NAME = "l.save_mod"   VALUE = "{ Modules.d.id }">  
   <MvDO FILE = "{ g.Module_Library_DB }" NAME = "l.ok" VALUE = "{ Module_Find_ID(Stores.d.ui_id) }">  
   <MvIF EXPR = "{ l.ok }">  
      <MvIF EXPR = "{ substring(Modules.d.code, 1, 6) EQ 'OPENUI' }">  
         <MvDO FILE = "{ g.Module_Root $ Modules.d.module }" NAME = "l.trash" VALUE = "{ OUI_Register_Extension(l.modcode, 17, '') }">  
      </MvIF>  
   </MvIF>  
   <MvDO FILE = "{ g.Module_Library_DB }" NAME = "l.ok" VALUE = "{ Module_Find_ID(l.save_mod) }">  
 
   <MvFUNCRETURN VALUE = "{ l.ok }">  
</MvFUNCTION>  


 


Send feedback on this documentation.
© 2004 - 2000 Darren Ehlers & OpenUI Developer Consortium