Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Hook for the Poll?

This discussion is related to the Poll addon.
dudieboydudieboy New
edited March 2011 in Vanilla 2.0 - 2.8
Hi, Polls don't appear on the Mobile version of the forums. I would like to add it to the Mobile theme (at the top of the discussion), so what is the php hook that will show the poll?


  • lucluc ✭✭
    You have to set the plugin as MobileFriendly at least. (all plugins without MobileFriendly at True are disabled on mobile).
    Afterwards, maybe more things will be needed to change in the theme.
  • Since these forums are kinda wonked at the moment, would you mind telling me how to make a plugin MobileFriendly, what codes to insert and the like?
  • lucluc ✭✭
    edited March 2011
    In the plugin about, you add:
    'MobileFriendly' => TRUE,

    There's already a few (especially external signin stuff that have this).
  • Okay I found that (which is in default.php, for future viewers of this post). But it doesn't appear in the Mobile theme because the poll hooks itself to the side panel, and there is no side panel in Mobile. So is there a PHP hook for the Poll so that I can add it where I want into the Mobile theme?
  • lucluc ✭✭
    edited March 2011
    Not always in default.php, that's why I didn't say that.

    Indeed, there's no Panel asset in the Mobile theme (well, there is still one at the moment (not displayed), but it will be removed as say just before, it's not displayed, so no need to generate/transmit uneeded html)

    Change the poll hooks to the Footer for instance, you'll be able to see it.
    You can try "Content" too, but I'm not sure where it will be displayed.
  • So it appears the best option is to edit class.pollmodule.php line 68 to read:
    return 'Content;'
    instead of 'Panel.' The poll shows up in the mobile theme right away, albeit could use some style adjustments.

Sign In or Register to comment.