simple PHP question

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
mrTron
New Member
New Member
Posts: 8
Joined: Tue Mar 24, 2009 1:24 pm

simple PHP question

Post by mrTron »

Hello all!

Have a quick question.  I'm using UDTs to facilitate some pretty basic PHP functions to hit a separate database and return results.
(For some reason if I use {php}{/php} smarty tags, my page implodes and won't work or display)

At present I have two UDTs on my page, one goes into my main content div and the other goes into the sidebar.  I'd like the UDT in the sidebar to be able to call a function in the UDT located in the main content div.

Being a PHP noob, i assumed (incorrectly i guess) that this would be no problem.  Is there a way to make a PHP function globally accessible or at least to facilitate this type of communication between UDTs?

I've read through what documentation i could find relating to UDTs and have not found the answer.  Thanks!
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm

Re: simple PHP question

Post by Jeff »

      global $gCms;
      $usertagops = $gCms->GetUserTagOperations();
      $params = arrary();
      $res = $usertagops->CallUserTag($udt_name,$params);
      if ($res[0] != true)
      {
            //do something
      }
   
Post Reply

Return to “The Lounge”