Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter
Support for Vanilla Forums Cloud product

In this Discussion

Follow Us


Hook for the Poll?

edited March 2011 in Questions
This discussion is related to the Poll addon.
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?

Comments

  • 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
    @dudieboy
    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.

    Resolved.
Sign In or Register to comment.