PDA

View Full Version : google intergration


-=Sniper=-
08-18-2005, 04:29 PM
I've seen users request google intergartion for the forums, we I manged to do that, I found a free script, and changed the layout etc to the forum. All the credits remain in the script.

I do know someone else has used the same code but has removed all the credit. ok first you need to get the google api http://www.google.com/apis/

Also there a a 1000 a day limit which google has set, and I believe its only for personal use.

heres the template

create a new template called google_main

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle]</title>
$headinclude
<script language="javascript">
function checkform (form) {
if (form["query"].value == "") {
alert("Please insert keyword(s) to search for");
form["query"].focus();
return false ; }
return true; }
</script>
</head>
<body>
$header

$navbar

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td colspan="2" class="tcat">Google Search</td>
</tr>
<tr>
<td colspan="2" class="alt1">Search Google <form name="googleFrm" method="post" action="google.php" onsubmit="return checkform(this);">
<input type="text" name="query" class="input" value="$query"> &nbsp;
<input type="submit" name="submit" value="Google It" class="button">
<input name="www" type="hidden" value="true">
</form><img src="enhancedbygoogle.gif" width="117" height="19">
</td>
</tr>
$results
</table>

$footer
</body>
</html>

and upload the files google.php and the image file to the main folder

demo http://207.58.180.20/google.php

have fun with the script, tested on vb 3.0.7

-=Sniper=-
08-19-2005, 05:00 PM
I think maybe this should go into the release forum? my mistake!

Andreas
10-02-2005, 12:22 AM
Hmm, I got a Google API Extension for Search lying around since weeeks ... NE1 interested?

JTyson
10-15-2005, 02:37 PM
Hmm, I got a Google API Extension for Search lying around since weeeks ... NE1 interested?

If it's for 3.5 then yep :)

Robru
10-23-2005, 07:53 PM
require_once("nusoap.php");
Where I get this file?

Ok?, I found it:

the nusoap.php library from Dietrich Ayala (http://dietrich.ganx4.com/nusoap),