Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

[Tutorial] How to Make Separate Search Page With Google Custom Search

aeryaery Gtricks Forum in 2.2 :) ✭✭✭

I have recently set up a separate search page in my forum because -

#. Vanilla search is unreliable and results have no relevance to search query.

#. Google search is well known; user will love it.

#. You can even earn by Google search.

I am sharing the steps for everyone's benefit -

Step 1: Download and enable Extra Page plugin. (Thanks Peregrine)

Step 2: Go to routes, make a copy the extra page route with whatever name you prefer. Mine is Route Expression - ^search-discussions(/.*)?$ and Target -plugin/ExtraPage$1 with Type - Internal .

Don't use search because it's a registered keyword and we want to be safe.

Step 3 Edit default.php in your ExtraPage plugin if you don't want link in your menu bar. Comment out/delete line 15 to 20 i.e the very first function Base_Render_Before. Do this only if you do not want extra link in your menu bar.

If you have edited default.php and disabled making new link, remember that you will have to add it manually. I would recommend adding a search link at right side of menu bar which is standard practice.

Step 4 Head to Google CSE and choose full width layout and get your code.

Step 5 Edit extrapage.php in plugin folder and paste the code.

You are done. 5 minutes of work and you users will thank you. Check mine here.

[Click Awesome if you liked this]

There was an error rendering this rich post.


  • Options
    phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP
    edited July 2013

    Ieek, i think i got bitten. How easy and sexy is this one and i've never thought about it. I remember to be Google SCE quiet unsexy, but this here seems way more usable.

    Here a link to the API for those who like to style their search:

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
Sign In or Register to comment.