Hi i summarized detail of my question hereI am using com_ajax in joomla 2.5 - http://stackoverflow.com/questions/24689232/cant-use-jmodulehelper-class-method-in-module-helper-file buthttps://github.com/Joomla-Ajax-Interface/component
As I have many instances(duplicate modules) of same module from where I call to com_ajax component by jQuery ajax. So is com_ajax calls to my module's helper.php file to get data for ajax call as we know. Problem is I want to access parameters of another module instance in helper.php file which is not gotten any reply yetpossible by the default call $module = JModuleHelper::getModule('mod_name_here');
so I was trying to achieve this way by passing module id
to helper. joomla experts please help mephp file from module's jQuery ajax call -
jimport('joomla.application.module.helper');
$input = JFactory::getApplication()->input;
$mod_id = $input->get('module_id'); //module_id passed by ajax call
$module = null;
$modules = JModuleHelper::_load();
$total = count($modules); $name="mod_name_here";
for ($i = 0; $i < $total; $i++)
{
// Match the name of the module
if (($modules[$i]->name == $name || $modules[$i]->module == $name)&&($modules[$i]->id==$mod_id))
{
$module = $modules[$i];
break; // Found it
}
}
$params1 = new JRegistry();
$params1->loadString($module->params);
so in $params1
I am getting the settings of my desired module instance.But debugger hangs on line $modules = JModuleHelper::_load();
don't know why but when I put these same codes in a module main php file for testing, things work. So why doesn't it goes further after that line? Any alternatives?