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

Unmaintained Google Custom Search in Header

Put a small Google Custom Search Bar in your header

  1. Amin Sabet

    Amin Sabet Well-Known Member

    Amin Sabet submitted a new resource:

    Google Custom Search in Header - Put a small Google Custom Search Bar in your header

    Read more about this resource...
     
  2. AndreaMarucci

    AndreaMarucci Well-Known Member

    It's not possible to replace the XF search box with the google one?
     
  3. Amin Sabet

    Amin Sabet Well-Known Member

    It is possible, but that's not what I wanted to do.
     
  4. viper357

    viper357 Active Member

    Thanks for this, is there a way to hide the search box in responsive view?
     
  5. Amin Sabet

    Amin Sabet Well-Known Member

    I believe it can be done using a media query, but I don't know how.
     
    viper357 likes this.
  6. Rudy

    Rudy Well-Known Member

    I don't see that it would be too difficult to locate this inside of the XenForo drop-down search box. I may try this when I have some spare time.
     
    Amin Sabet and viper357 like this.
  7. Dan Hawkins

    Dan Hawkins Active Member

    The way to do this would be to place the code inside a div

    HTML:
    <div class="no_mob_display">
    dsgdfdhdh
    </div>

    Then in the style sheet (EXTRA.CSS) add

    HTML:
    @media screen and(max-width:600px){
      .no_mob_display {
        visibility: hidden;
        clear: both;
        float: left;
        margin:10pxauto5px20px;
        width:28%;
        display: none;
      }
    }
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    Rudy likes this.
  9. Dan Hawkins

    Dan Hawkins Active Member

    Last edited: Mar 21, 2016
  10. viper357

    viper357 Active Member

    I put this into the ad_header template, don't know if it's the right way to do it but it works for me. :p

    Code:
    <xen:hook name="ad_header" />
    <style type="text/css">
    .topbanner {
    float: right;
    margin-top: 20px;
    padding: 5px;
    width: 75%;
    max-width: 320px;
    }
    <xen:if is="@enableResponsive">
    @media (max-width:@maxResponsiveMediumWidth)
    {
    .topbanner {
      display: none;
      }
    
    }
    </xen:if>
    </style>
    <div class="topbanner">
    *** google stuff
    </div>
     

Share This Page