Page 1 of 1

simple PHP question

Posted: Fri Jan 08, 2010 2:55 pm
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!

Re: simple PHP question

Posted: Fri Jan 08, 2010 3:36 pm
by Jeff
      global $gCms;
      $usertagops = $gCms->GetUserTagOperations();
      $params = arrary();
      $res = $usertagops->CallUserTag($udt_name,$params);
      if ($res[0] != true)
      {
            //do something
      }