Page 1 of 1

Calling a module from a user defined tag?

Posted: Wed Jul 18, 2007 11:33 pm
by styson
Is it possible to call a module from a user defined tag and if so .. any clues as to how?  I'm rather new to CMSms and php so it could be my own ignorance. 

I've tried this but it dies.  GetModuleInstance isn't found.

Code: Select all

global $gCms;
$module =& $gCms->GetModuleInstance('FrontEndUsers');

Re: Calling a module from a user defined tag?

Posted: Wed Jul 18, 2007 11:52 pm
by Dr.CSS
That seems like more trouble than just using the module tag, why are you trying to do this, what are you trying to get to happen?...

Re: Calling a module from a user defined tag?

Posted: Thu Jul 19, 2007 2:38 am
by calguy1000
try:

Code: Select all

global $gCms;
$module =& $gCms->modules['News']['object'];

Re: Calling a module from a user defined tag?

Posted: Thu Jul 19, 2007 11:05 pm
by styson
I'm designing a modification of sorts to the frontendusers/custom content modules.  I need to secure content for a set of users, which is the afore mentioned modules' task.  However, user accounts/authentication are in another system.  When a "member" wants access to secured content, they will be will be re-directed to the other system (A membership database) to log on using a user defined tag I have created.  Once the user logs on the remote system, they are re-directed back to the CMSms site where they will be processed by a special page that will check if they have a FEU account, create one if they don't, automatically log on, and sent to the page they were on when they tried to gain access to secured content.  The FEU accounts are just place holders so I can use the FEU and CC modules without breaking them.  The members wont know they exist. 

I'm just exploring possibilities right now.  I'm pretty sure I'll be creating my own module that calls the FEU module but I want to kn ow all my options.