Neculai Fântânaru

Everything Depends On The Leader

How Can You Integrate Google Search Box/Bar To Your Website By Implementing Custom Code?

On May 06, 2021
, in
Python Scripts Examples by Neculai Fantanaru

--- STEP 1 --- This is the search box form. Copy this code in all your html/php pages. People will search here the information. ( You can see the code below here as well: https://pastebin.com/1X6xwbBK )

<form action="https://neculaifantanaru.com/search.html" method="get" id="site-search">
    <fieldset>
        <!-- <label for="search">Search in website</label> -->
        <input type="text" name="q" id="q" value="" />
        <button type="submit" class="btn btn-inverse">search</button>
    </fieldset>
</form> 

--- STEP 2 --- Create a new html page named search.html. And add this code in the <head> section, more likely before </head>:

<script>
  (function() {
    var cx = 'YOUR-NUMBER-CODE';
    var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true;
    gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
        '//www.google.com/cse/cse.js?cx=' + cx;
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s);
  })();
</script>

YOUR-NUMBER-CODE you can get it by clicking this link https://cse.google.com/cse/all (Here you must add your new search engine. Choose OFF on the option "Search the entire web" in order to find results only on your website, not the entire web.)

Then add this code in the <body> section, on the same page search.html

<div class="main-content">
<h1>Search the site</h1>

<gcse:searchbox-only></gcse:searchbox-only>
<gcse:searchresults-only></gcse:searchresults-only>
</div>

That's all folks.

If you like my code, then make me a favor: translate your website into Romanian, "ro".

Also, see this VERSION 2 or VERSION 3 or VERSION 4 or VERSION 5 or VERSION 6 or VERSION 7

Alatura-te Comunitatii Neculai Fantanaru
The 63 Greatest Qualities of a Leader
Cele 63 de calităţi ale liderului

Why read this book? Because it is critical to optimizing your performance. Because it reveals the main coordinates after that are build the character and skills of the leaders, highlighting what it is important for them to increase their influence.

Leadership - Magic of Mastery
Atingerea maestrului

The essential characteristic of this book in comparison with others on the market in the same domain is that it describes through examples the ideal competences of a leader. I never claimed that it's easy to become a good leader, but if people will...

The Master Touch
Leadership - Magia măiestriei

For some leaders, "leading" resembles more to a chess game, a game of cleverness and perspicacity; for others it means a game of chance, a game they think they can win every time risking and betting everything on a single card.

Leadership Puzzle
Leadership Puzzle

I wrote this book that conjoins in a simple way personal development with leadership, just like a puzzle, where you have to match all the given pieces in order to recompose the general image.

Performance in Leading
Leadership - Pe înţelesul tuturor

The aim of this book is to offer you information through concrete examples and to show you how to obtain the capacity to make others see things from the same angle as you.

Leadership for Dummies
Leadership - Pe înţelesul tuturor

Without considering it a concord, the book is representing the try of an ordinary man - the author - who through simple words, facts and usual examples instills to the ordinary man courage and optimism in his own quest to be his own master and who knows... maybe even a leader.