Fork me on GitHub

Smarty pnmodapifunc sometimes not passing values.  Bottom

  • First I want to make sure I understand how its supposed to work. Here is what I have in my plugin.

    Code

    <!--[ pnmodapifunc modname="helpdesk" type="user" func="typeselect" selectid=$DefaultTicketType assign="defaulttypesel_data" ]-->



    Here is what I want it to do.

    Code

    $defaulttypesel_data = pnModAPIFunc('helpdesk','user','typeselect',array('selectid'=>$defaulttickettype));


    Am I doing it correctly?
  • If you would explain what you want to achieve.... icon_rolleyes

    BTW, in first code you have "typeselect", in the second part you have "tickettypeselect".

    Frank

    --
    "He is not dangerous, he just wants to play...."
  • the typeselect and tickettypeselect I fat fingered when I typed it here on the boards they are right in the plugins. Basically I have a userapi called typeselect. It recieves $args where I pnVarCleanFromInput selectid ie $selectid = pnVarCleanFromInput ('selectid');

    The way I would call this from PHP is

    Code

    $defaulttypesel_data = pnModAPIFunc('helpdesk','user','typeselect',array('selectid'=>$defaulttickettype));


    I just wanted to figure out if I was calling it correctly with my smartyplugin.

    Here is what I noticed. When the $args contains more then 1 item it seems to always work. However when it has only one argument it seems to be flakey. It works fine when I call it directly via PHP pnModAPIFunc. The problem is when I use the pnmodapifunc Smarty plugin. I know I can write my own plugin to do it. I was just trying to use as much reusable code as possible..

    Thanks for the response.

This list is based on users active over the last 60 minutes.