Google custom search

Google custom search 1.2

No permission to buy ($35.00)
Compatible XF 2.x versions
2.1
Premium upgrade:

This XF2 add-on along with the entire collection can be purchased for $35.00 USD. Your Premium upgrade will allow you to download as many XF2 add-ons as you like for one year. Please see the entire collection located in the Resources area at this URL:

https://www.xf2addons.com/

Description:

Replaces XenForo search with Google custom search.

(Example of Google custom search)

pic001.jpg


(Example of Options page)

pic002.jpg


Installation:
  1. Download Andy-GoogleCustomSearch-1.2.zip and unzip it.
  2. Copy the src/addons/Andy/GoogleCustomSearch directory to your server.
  3. From the Admin Control Panel Install the add-on.
Setup step 1:

Go to the Google custom search start page:

https://developers.google.com/custom-search/
  1. Click the GET STARTED link.
  2. Click the "create an instance of a Custom Search Engine" link.
  3. Click the Control Panel link.
  4. Click Add.
  5. Add your forum URL and Create.
  6. Get your code.
Your Google custom search code will look like this:

Code:
<script async src="https://cse.google.com/cse.js?cx=016307988283818923214:flki76-2anm"></script>
<div class="gcse-search"></div>

Setup step 2:

Go to the options page and enter your code into the Search engine ID field.

Setup step 3:

Edit the extra.less template and add the following code:

Code:
.gsc-tabHeader.gsc-tabhInactive, .gsc-refinementHeader.gsc-refinementhInactive {
    background-color: #fff !important;
}

.gsc-selected-option-container {
    width: 150px !important;
}

.gsc-results .gsc-cursor-box .gsc-cursor-page {
    color: #999 !important;
    padding: 6px !important;
}

.gsc-snippet-metadata, .gsc-role, .gsc-tel, .gsc-org, .gsc-location, .gsc-reviewer, .gsc-author {
    display: none;
}

Notes:

After you get your code, you can customize the Google custom search at any time.

Select the "Full width" layout.

pic003.jpg


Disable the "Automatic thumbnails in search results" option.

pic004.jpg


Enable "Results Browsing History" and set the "Link Target" to _self.

pic005.jpg
Author
AndyB
Views
151
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from AndyB

  • Show deleted
    Show deleted
    Show a list of soft deleted posts and threads and provides option to view or delete them.
  • Donation reminder
    Donation reminder
    Sends an email to members reminding them that your forum runs on donations.
  • Birthday calendar
    Birthday calendar
    Shows members birthdays in a calendar.
  • BBCode parser all
    BBCode parser all
    Removes undesired BBCode tags from all messages.
  • Banner
    Banner
    A banner management system.

Latest updates

  1. See description

    Google custom search v1.2 changes: Added options page for easier configuration.
Top