TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,993
  • Total Topics: 21,324
  • Online today: 400
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 305
  • Total: 305

adding goggle searchbox module

Started by melow, October 22, 2006, 05:58:14 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

melow

Hi,

i have RC3 smf+ 0.96 TP, and i want to add google as a module on my site. i have this code that download from google and here is the code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>My Google AJAX Search API Application</title>
    <link href="http://www.google.com/uds/css/gsearch.css" type="text/css" rel="stylesheet"/>
    <script src="http://www.google.com/uds/api?file=uds.js&amp;v=1.0&amp;key=ABQIAAAAezDOtRvr4VGZZdQ-vjEhghSAtp1xRgqkOY0wMDVtcQ7cRhnqWRSwbFp3KzSs1FVaTACEgOq3xVy0Hg" type="text/javascript"></script>
    <script language="Javascript" type="text/javascript">
    //<![CDATA[

    function OnLoad() {
      // Create a search control
      var searchControl = new GSearchControl();

      // Add in a full set of searchers
      var localSearch = new GlocalSearch();
      searchControl.addSearcher(localSearch);
      searchControl.addSearcher(new GwebSearch());
      searchControl.addSearcher(new GvideoSearch());
      searchControl.addSearcher(new GblogSearch());

      // Set the Local Search center point
      localSearch.setCenterPoint("New York, NY");

      // Tell the searcher to draw itself and tell it where to attach
      searchControl.draw(document.getElementById("searchcontrol"));

      // Execute an inital search
      searchControl.execute("google");
    }

    //]]>
    </script>
  </head>
  <body onload="OnLoad()">
    <div id="searchcontrol"/>
  </body>
</html>


i really have no idea how to install this as a module. i tried to open index.template.php and i have no clue where to put the code.
as i have no knowledge in php :(.any help is appreciated.

Thanks

G6Cad

Why dont you use the google blocks that already exist ?

Look in the block code and snippets forum. The first sticky post there have a list for easy find :)

This website is proudly hosted on Crocweb Cloud Website Hosting.