1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Enable / Disable action toggle for custom admin page?

Discussion in 'XenForo Development Discussions' started by Siropu, Jan 15, 2015.

  1. Siropu

    Siropu Well-Known Member

    Hello everyone,

    I'm working on a custom ads manager add-on for my community and so far so good. The only problem I'm having now, is that I can't figure out how XenForo actionToggle works. I've looked at the other internal XenForo Controllers that use enable /disable action toggle and used a similar code but it doesn't work.

    I get the "Your changes have been saved." message but nothing happens.

    What do I have to do to make actionToggle work? I really don't want to create my own method to get around this, so I hope someone can explain to me how can I make it work the "XenForo Way".

    Thanks in advance.
     
  2. Siropu

    Siropu Well-Known Member

    Never mind, I figure it out... I found the method _getToggleResponse and made things clear. You just have to pass an itemID => ItemData array for the first argument. I was using the default result Array form fetchAll, that's why it didn't worked.

    Anyway, I'm looking forward to finish this Add-on. :)
     

Share This Page