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

XF 1.1 Help with google custom search in header

Discussion in 'Styling and Customization Questions' started by dbembibre, Jul 17, 2013.

  1. dbembibre

    dbembibre Active Member

    Hi to all, i have a problem with a google custom search box. I don't know whats the problem, but the google search only show in safari, in firefox i can't see.

    I add the search box in the following way.
    One new template with name: GoogleSearch and following content.

    Code:
    <!--BEGIN Danny CSE-->
    <fieldset id="GoogleSearch">
    <form action="pages/search" id="cse-search-box" class="formPopup">
        <input type="hidden" name="cx" value="partner-pub-xxxxxxxxxxxxxxx" />
        <input type="hidden" name="ie" value="ISO-8859-1" />
    <div class="primaryControls">
                <span class="textboxcontainer"><span><input type="search" name="q" id="googlesearchquery" class="textCtrl" /></span></span>
    </div>
                    </form>
    <script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&amp;lang=es"></script>
    </fieldset>
    <!--End Danny CSE-->
    I add the template to the end of search_bar, and move with CSS:
    #GoogleSearch{display: block;
    position: absolute;
    right: 20px;
    top: -110px;
    margin: 0;
    background-color: rgb(240,240,240);
    border-radius: 5px;
    padding-top: 5px;
    z-index: 7500;
    }

    A image working on safari
    Captura de pantalla 2013-07-17 a la(s) 19.28.57.png


    Any idea about the problem ??? thanks a lot.
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Please post the URL so I can test it.
     
  3. dbembibre

    dbembibre Active Member

    Thanks @Jake Bunce the url is www.bmwfaq.com

    Works with chrome and safari but not in firefox and opera, i think that is not a css problem, is maybe the way that the template is injected.
    Thanks a lot
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    It doesn't show in any browser for me (as a guest).
     
    dbembibre likes this.
  5. dbembibre

    dbembibre Active Member

    Hahahaha @Brogan you solve the problem, i forget that i have restricted the search to guests and im inject my own google search template in the end of search_bar, thats the problem :)
     
  6. dbembibre

    dbembibre Active Member

    I change the fieldset for a div and insert my template at the end of navigation template, now is working as guest and user.

    Thanks @Jake Bunce and @Brogan for your help :)
     

Share This Page