Announcement

Collapse
No announcement yet.

Google translate?

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Google translate?

    Is it possible to remove search box and add the google translate link? see attached

    Click image for larger version

Name:	search.png
Views:	258
Size:	145.6 KB
ID:	26732

    The code is in the navbar template, ill post it.

    PHP Code:
    <div id="navbar" class="navbar">
        <
    ul id="navtabs" class="navtabs floatcontainer<vb:if condition="$show['member'] AND $notifications_total"> notify</vb:if>">
            {
    vb:raw template_hook.navtab_start}
            {
    vb:raw navigation}
            {
    vb:raw template_hook.navtab_end}
        </
    ul>


    <
    vb:if condition="$vboptions['enablesearches']">
            <
    div id="globalsearch" class="globalsearch">
                <
    form action="search.php?{vb:raw session.sessionurl}do=process" method="post" id="navbar_search" class="navbar_search">
                    <
    vb:comment><input type="hidden" name="s" value="{vb:raw session.sessionurl}" /></vb:comment>
                    <
    input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
                    <
    input type="hidden" name="do" value="process" />
                    <
    span class="textboxcontainer"><span><input type="text" value="" name="query" class="textbox" tabindex="99"/></span></span>
                    <
    span class="buttoncontainer"><span><input type="image" class="searchbutton" src="{vb:stylevar imgdir_button}/search<vb:if condition="$stylevar['textdirection'] == 'rtl'">_rtl</vb:if>.<vb:if condition="is_browser('ie') AND !is_browser('ie'7)">gif<vb:else />png</vb:if>" name="submit" onclick="document.getElementById('navbar_search').submit;" tabindex="100"/></span></span>
                </
    form>
                <
    ul class="navbar_advanced_search">
                    <
    li><a href="search.php{vb:raw session.sessionurl_q}" accesskey="4">{vb:rawphrase advanced_search}</a></li>
                    {
    vb:raw template_hook.navbar_advanced_search}
                </
    ul>










            </
    div>
        </
    vb:if>




    </
    div>
    </
    div><!-- closing div for above_body -->

    <
    div class="body_wrapper">
    <
    div id="breadcrumb" class="breadcrumb">
        <
    ul class="floatcontainer">
            <
    li class="navbithome"><a href="index.php{vb:raw session.sessionurl_q}" accesskey="1"><img src="{vb:stylevar imgdir_misc}/navbit-home.png" alt="{vb:rawphrase home}" /></a></li>
            {
    vb:raw navbits.breadcrumb}
            {
    vb:raw navbits.lastelement}
        </
    ul>
        <
    hr />
    </
    div>

    {
    vb:raw ad_location.ad_navbar_below}
    {
    vb:raw ad_location.global_below_navbar}




    <
    vb:if condition="$show['notices'] AND THIS_SCRIPT != 'register'">
        <
    form action="profile.php?do=dismissnotice" method="post" id="notices" class="notices">
            <
    input type="hidden" name="do" value="dismissnotice" />
            <
    input type="hidden" name="s" value="{vb:raw session.sessionurl}" />
            <
    input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
            <
    input type="hidden" id="dismiss_notice_hidden" name="dismiss_noticeid" value="" />
            <
    input type="hidden" name="url" value="{vb:raw return_link}" />
            <
    ol>
                {
    vb:raw notices}
            </
    ol>
        </
    form>
    </
    vb:if>
    ​ 

    #2
    Why remove the search box? It's a basic most-used feature of a site. I know you still have the Advanced Search link but removing the quick search feature that all users use in place of a Translate widget that not all users will use is not a good idea in my personal opinion.

    If you're still want to do it, here's one of the ways to do it:

    Add this code before the <form> tag

    Code:
    <style>
    #navbar_search { display: none; }
    </style>
    And then add the code for the Google Translate widget as you see in https://wcmshelp.ucsc.edu/advanced/g...translate.html

    You may need to tweak the style/alignment of the widget using CSS but that's what you can do for a start.
    Helpful? Donate. Thanks!
    Buy me a coffeePayPal QR Code
    Fast VPS Host for vBulletin:
    A2 Hosting & IONOS

    Comment


      #3
      I think your right dude !!
      how about removing the advance part?

      Comment


        #4
        Originally posted by oldfan View Post
        I think your right dude !!
        how about removing the advance part?
        found it dude.
        would prefer a widget tho
        thanks for your help

        Comment


          #5
          Glad you figured it out.
          Helpful? Donate. Thanks!
          Buy me a coffeePayPal QR Code
          Fast VPS Host for vBulletin:
          A2 Hosting & IONOS

          Comment


            #6
            Originally posted by glennrocksvb View Post
            Glad you figured it out.
            got widget working now, so im happy.
            now if i could figure something out for the skin selector, the location in the footer is horrible..

            Comment

            Users Viewing This Page

            Collapse

            There is 1 user viewing this forum topic.

            • Guest Guest

            Latest Posts

            Collapse

            Working...
            X
            Searching...Please wait.
            An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

            Please push the back button and reload the previous window.'
            An unexpected error was returned: 'Your submission could not be processed because the token has expired.

            Please push the back button and reload the previous window.'
            An internal error has occurred and the module cannot be displayed.
            There are no results that meet this criteria.
            Search Result for "|||"