Calling a module from a user defined tag?

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
styson

Calling a module from a user defined tag?

Post 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');
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Calling a module from a user defined tag?

Post 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?...
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Calling a module from a user defined tag?

Post by calguy1000 »

try:

Code: Select all

global $gCms;
$module =& $gCms->modules['News']['object'];
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.
styson

Re: Calling a module from a user defined tag?

Post 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. 
Post Reply

Return to “Developers Discussion”