View Full Version : Google Module
cLord
05-24-2004, 03:29 PM
This script will add a collapsible Google module to your vBadvanced CMPS!
Live Demo:
You can see the module in action here (http://www.whoox.com).
Download the attachment for instructions,
cLord ;)
Zachery
05-24-2004, 03:56 PM
Nice :)
Frankenberrie
05-24-2004, 04:11 PM
Looks good!! This might be something I can use.
Socket
05-25-2004, 09:09 AM
Very handy cLord :D
Thanks
Anubis
05-25-2004, 04:56 PM
cool addon
thanks
TheSauceMaster
05-30-2004, 05:10 AM
could someone be kind enough to make a google image for a dark background ? please :)
Richard
05-30-2004, 05:25 AM
could someone be kind enough to make a google image for a dark background ? please :)
in the code listed above, change the following:
<img src="http://www.google.com/logos/Logo_40wht.gif"
to this:
<img src="http://www.google.com/logos/Logo_40blk.gif"
Here is a list of all of Google's official logos:
http://www.google.com/stickers.html
thanx
nice addon
installed and working within seconds
TheSauceMaster
05-30-2004, 05:46 AM
in the code listed above, change the following:
<img src="http://www.google.com/logos/Logo_40wht.gif"
to this:
<img src="http://www.google.com/logos/Logo_40blk.gif"
Here is a list of all of Google's official logos:
http://www.google.com/stickers.html
Thanks , appreciate that :) Great and Easy addon
thanx, that took all of three seconds to add in.
Intex
06-10-2004, 06:31 PM
Nice - thx.
This will add a Google search module to your CMPS...
In your Admincp - Styles & Templates - Style Manager - Add a new template called "adv_portal_google".
Insert this code into the template:
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b>$vba_options[portal_blockbullet] Google Search</b></span></td>
</tr>
<tr>
<td class="alt1" align="center">
<!-- Search Google -->
<form method="GET" action="http://www.google.com/search">
<a href="http://www.google.com/" target="_blank">
<img src="http://www.google.com/logos/Logo_40wht.gif"
border="0" alt="Google"></a><br />
<input type="text" name="q" size="20" maxlength="255" value=""><br /><br />
<input type="submit" name="btnG" VALUE="Search">
</form>
<!-- Search Google -->
<br /><br />
</td>
</tr>
</table>
<br/>Save the template!
Still in your Admincp - vBa CMPS - Add Module
- Module Title - Google Search
- Module Identifier - Leave blank
- OR Template to Include - google
- Activate and select the column you want it in.
- Save and you are done.
Have Fun,
cLord ;)
58sniper
06-13-2004, 07:22 PM
BTW - If you change the adv_portal_google template to the code below, it will more closely resemble the adv_portal_search module. See the demo (http://www.efhs84.com/).
<form method="GET" action="http://www.google.com/search">
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b>$vboptions[blockbullet] Google Search</b></span></td>
</tr>
<tr>
<td class="alt2">
<input name="s" type="hidden" value="" />
<input name="do" type="hidden" value="process" />
<input name="sortby" type="hidden" value="lastpost" />
<input name="forumchoice" type="hidden" value="0" />
<center><a href="http://www.google.com/" target="_blank"><img src="http://www.google.com/logos/Logo_40wht.gif" width="128" height="53" border="0" alt="Google" /></a></center>
<input class="bginput" name="q" size="13" type="text" />
<input class="button" type="submit" name="btnG" value="Go" /><br />
<span class="smallfont" style="float: left;">» <a href="$vboptions[bburl]/search.php?">$vbphrase[advanced_search]</a></span>
</td>
</tr>
</table>
</form>
<br />
Allen Mead
08-20-2004, 09:09 PM
Pukka hack :cool: :cool: :cool:
NeroTheWarlord
08-20-2004, 10:17 PM
Nice one, thanks.
djnth
09-01-2004, 03:02 PM
would it be hard to modify the SEARCH FORUMS module so that it could be used to search google instead by selecting a checkbox?
emtee
09-10-2004, 04:42 AM
Somehow the "open in new page - target="_blank" doesn't work. It searches for the terms in current page, which you probably don't want because you don't want your visitor leave the site. I tried to fix it but still doesn't work. Will post when I have it done.
58sniper
09-10-2004, 03:30 PM
Somehow the "open in new page - target="_blank" doesn't work. It searches for the terms in current page, which you probably don't want because you don't want your visitor leave the site. I tried to fix it but still doesn't work. Will post when I have it done.
Okay - I must have been on crack when I posted that. The Advanced Search link is also wrong. My original code above doesn't specify that it should open in a new page (only if you clicked on the Google logo did it spawn a child page).
You can change the <form> tag by including target="_blank", but I think that breaks validation (I don't think target is a valid parameter for <form>). I'll have to look into that. Here is some more streamlined code:
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat smallfont" style="font-weight: bold;">$vboptions[blockbullet] Google Search</td>
</tr>
<tr>
<td class="alt2">
<form method="get" action="http://www.google.com/search" target="_blank">
<input name="s" type="hidden" value="" />
<input name="do" type="hidden" value="process" />
<input name="sortby" type="hidden" value="lastpost" />
<input name="forumchoice" type="hidden" value="0" />
<center><a href="http://www.google.com/" target="_blank"><img src="http://www.google.com/logos/Logo_40wht.gif" width="128" height="53" border="0" alt="Google" /></a></center>
<input class="bginput" name="q" size="13" type="text" />
<input class="button" type="submit" name="btnG" value="Go" /><br />
<span class="smallfont" style="float: left;">» <a href="http://www.google.com/advanced_search?hl=en">$vbphrase[advanced_search]</a></span>
</form>
</td>
</tr>
</table>
<br />
emtee
09-11-2004, 03:41 AM
Oh I put it in the <form> tag and it works. Thanks m8! :cool:
graham_w
04-24-2005, 08:14 AM
thanks nice work - i had the coding just needed to figure out how to put it in the modules :)
daddy20
04-24-2005, 02:09 PM
This is what I have, the go is gone and google is the go button it's placed right under the forum search so it looks like one.
Now what I need help on is getting google to open in a new window.
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="$getbgrow" width="100%">
<left>
<FORM method=GET action="http://www.google.com/search">
<input type=hidden name=ie value=UTF-8>
<input type=hidden name=oe value=UTF-8>
<bgcolor="#white">
<INPUT TYPE=text name=q size=15 maxlength=255 value="">
<INPUT type=hidden name=safe value=strict><br>
<input TYPE="image" SRC="http://www.google.com/logos/Logo_40wht.gif"<br>
<span class="smallfont" style="float: left;">» <a href="http://www.google.com/advanced_search?hl=en">$vbphrase[advanced_search]</a></span>
</FORM>
</td></tr>
</left>
</td>
</tr>
</table>
<br />
abbood
05-03-2005, 04:11 AM
Hi ,
Thank you for the nice module... I noticed that it only searches in english , is there a way to make it search in other languages ?
daddy20
05-03-2005, 05:49 PM
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="$getbgrow" width="100%">
<!-- Google SafeSearch -->
<left>
<FORM method=GET action="http://www.google.com/search">
<input type=hidden name=ie value=UTF-8>
<input type=hidden name=oe value=UTF-8>
<bgcolor="#white">
<INPUT TYPE=text name=q size=15 maxlength=255 value="">
<INPUT type=hidden name=safe value=strict><br>
<input TYPE="image" SRC="http://www.google.com/logos/Logo_40wht.gif"<br>
<span class="smallfont" style="float: left;">» <a href="http://www.google.com/advanced_search?hl=en">$vbphrase[advanced_search]</a></span>
</FORM>
</td></tr>
</left>
</td>
</tr>
</table>
<br />
http://www.google.com/search
This has to be picked up at googles free search page.
The eng site is: http://www.google.com/searchcode.html
You will have to change the language first then find the url in the search code for your language
http://www.google.com/language_tools?hl=en
The logo is the same, I think?
http://www.google.com/logos/Logo_40wht.gif
On this url all you have to do is change the last 2 letters to your lang.
http://www.google.com/advanced_search?hl=en
To sum up go to GOOGLE (in your language) find the link to Googles free search and find the url that redirects in your language.
I lost myself
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.