Announcement

Collapse
No announcement yet.

Header Hook in Mobile View

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Header Hook in Mobile View

    I made a template and a hook and placed it in header_toolbar. It is working as expected.
    When I view the site on a mobile device, the template/hook is not there. Looking at the source code, I see that the hook has been removed from the mobile view of the site.
    How can I add a hook in the header_toolbar or similar location so that it also appears on mobile/small screen view?

    Thanks

  • #2
    They should appear if you're using a mobile browser such as Safari on iOS or Chrome on Android. Hooks do not work in the Mobile Suite of Apps. The Apps provide their own UI and do not use the vBulletin Template system. This is to keep data transmission rates low.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API - Full / Mobile
    Vote for your favorite feature requests and the bugs you want to see fixed.

    Comment


    • #3
      Thank you for your reply.
      I'm using chrome on an android phone. Also, when I test it on a big screen desktop computer, when I make the browser window small the hook disappears and doesn't show up.
      The header_head hook is there. But the header_toolbar hook disappears.

      Comment


      • #4
        The header toolbar will collapse into a menu on a phone (and smaller screens). When you expand the menu, you don't see your toolbar entry added by the hook?
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API - Full / Mobile
        Vote for your favorite feature requests and the bugs you want to see fixed.

        Comment


        • #5
          The search box and the channel-subtabbar move into the menu and I can see them when I click on the menu. But the hooks that I placed in toolbar disappear.

          Comment


          • #6
            I can actually recreate the issue. This should be considered a bug. I would suspect it should show above the "Search Box" just like in standard mode. You should create a bug report and detail each step to recreate it. The developers will review and assign it to a version to be resolved.
            Translations provided by Google.

            Wayne Luke
            The Rabid Badger - a vBulletin Cloud demonstration site.
            vBulletin 5 API - Full / Mobile
            Vote for your favorite feature requests and the bugs you want to see fixed.

            Comment


            • #7
              Thank you. Will do.
              Meanwhile, can you suggest a workaround to have a hook in mobile view?

              Comment


              • #8
                Add the code to a different hook. Maybe header_after_body_begin or header_before_notices.

                Or add a second instance to one of those hooks and hide it based on screen size using a CSS media query.

                https://developer.mozilla.org/en-US/..._media_queries
                Translations provided by Google.

                Wayne Luke
                The Rabid Badger - a vBulletin Cloud demonstration site.
                vBulletin 5 API - Full / Mobile
                Vote for your favorite feature requests and the bugs you want to see fixed.

                Comment

                Related Topics

                Collapse

                Working...
                X