Hey,
i want to alter the Calendar module so that I'll have the access to customcontent_loginname variables from inside of Calendar function. When I'm doing the $module dump, I see the data i want, but it's inside bunch of other arrays and stuff.
i coulndn't get to that var using $gCms['modules'] -> print_r of this gives me fatal error with malloc.
So: i'm inside a Calendar function that displays stuff for front-end, and I want to have access to {$customcontent_loginname} value (but not on the page, in the php code). Any programmers hints?
access to FEUsers variables from another module
-
calguy1000
- Support Guru

- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: access to FEUsers variables from another module
Selfreg does stuff like this.
it essentially does a "$feusers = $this->GetModuleInstance('FrontEndUsers');
then calls methods from the frontend users api.
it essentially does a "$feusers = $this->GetModuleInstance('FrontEndUsers');
then calls methods from the frontend users api.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
-
numer9
Re: access to FEUsers variables from another module
that's exactly want i wanted to do - connect to another module like in selfReg. But it doesn't work - maybe it because of new module architecture?
i got the access by entering:
But your solution doesn't work. I got the function, similar to Calendar function "displaylist" (function.displaylist.php), that's starting with:
am I missing something?
i got the access by entering:
Code: Select all
echo $module->cms->smarty->_tpl_vars[userid];Code: Select all
function AddEventWorker(&$module, $id, &$parameters, $returnid)
{
global $gCms;
// print_r ($module->cms->smarty->_tpl_vars);
echo $module->cms->smarty->_tpl_vars[userid]; // it works, but doesn't look nice
$feusers = $module->cms->GetModuleInstance('FrontEndUsers'); // doesn't work, causes fatal error
$feusers = $gCms->GetModuleInstance('FrontEndUsers'); // doesn't work, causes fatal error
}
