I want to modify 3rd party extension and want to override its functionality with the new extension. But my main concern is what if 3rd party extension is not enabled or present in my Magento folder? I want to set dependancy using ifconfig in system.xml or config.xml but I am not sure at extension level that how to check if extension is present in folder. TIA.
EDIT : Thanks to @Sander Mangel for dependency answer. Now let me be more clear.
I can easily set dependency using app/etc/modules/MyNameSpace_MyModule.xml but when my 3rd party extension is removed from system, error report is generated and its showing "Module "MyNameSpace_MyModule" requires module "3rdPartyExtension" and stopped further execution cause it has generated exception but what if I want to execute further without generating exception? Simply MyExtension will not take effect if 3rdpartyextension is not present without stopping magento to execute. So that's why I am asking is there any kind of facility like we did on layout files to check. NOTE ifconfig here.
<reference name="sales.order.print"> <action method="setTemplate" ifconfig="3rdparty/config"> <template>mytemplate.phtml</template> </action> </reference>
Second Edit : Thanks to Zyava. I did what I want but say If I deleted my 3rd party extension for trial purpose to see what happens.. I created my system.xml as below
<config> <sections> <payment> <groups> <3rdparty extension translate="label" module="payment"> <label>3rd Party</label> <frontend_type>text</frontend_type> <sort_order>1</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> <fields> <disallowedcustomergroups translate="label comment"> <label>Disallowed Customer Groups</label> <frontend_type>multiselect</frontend_type> <sort_order>120</sort_order> <source_model>adminhtml/system_config_source_customer_group</source_model> <config_path>mymodule/disallowed_customer_groups</config_path> <comment><![CDATA[Press control and select multiple groups]]></comment> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> <depends><active>1</active></depends> </disallowedcustomergroups> </fields> </3rdpartyextension> </groups> </payment> </sections> </config>
So you can see that I have simply specified one tab based on activation of 3rd party extension. But I have deleted 3rd party extension fully from my system but still its showing other options of 3rd party extensions? Why its showing them though I have cleared my cache?