PDA

View Full Version : BB Code Enhancements - Google Search Box BBCode


TheInsaneManiac
20 Jun 2008, 00:23
Instead of pointing new people to google, how about putting it right in front of them?

Title: Google

Tag: google

Replacement: <form method="get" action="http://www.google.com/search">
<div style="border:1px solid black;padding:4px;width:20em;">
<table border="0" cellpadding="0">
<tr><td>
<input type="text" name="q" size="25"
maxlength="255" value="{param}" />
<input type="submit" value="Google Search" /></td></tr>
<tr><td align="center" style="font-size:75%">
<input type="checkbox" name="sitesearch"
value="http://yourwebsite.com" /> Only search Website Title<br />
</td></tr></table>
</div>
</form>

Example: VBulletin

Description: Point members in the correct direction

Use option: No

Button image (Optional): images/google.gif

Remove Tag If Empty: Yes

Disable BB Code Within This BB Code: Yes

Disable Smilies Within This BB Code: Yes

Disable Word Wrapping Within This BB Code: No


Additional: If you wish for "Only search" to be checked first then:

Replace:<input type="checkbox" name="sitesearch"
value="http://yourwebsite.com" /> Only search Website Title<br />

With:<input type="checkbox" name="sitesearch"
value="http://yourwebsite.com" checked /> Only search Website Title<br />



Final Step
Now just find this in the replacement code:
<input type="checkbox" name="sitesearch"
value="http://yourwebsite.com" /> Only search Website Title<br />

Put your website link in the "Value" field and the website title in the "Only search" area.


NOTE: If you are going to use an image, download the Google BBCode Image and extract the google.gif. Upload it to your forum's images folder and you are set.

redraider
20 Jun 2008, 03:21
Looks like a great idea!

TheInsaneManiac
20 Jun 2008, 07:36
Looks like a great idea!
Thank you, I appreciate it.

Vinyljunky
20 Jun 2008, 12:07
How about supporting Adsense code so we can make cash from the results :)

Thanks

VinylJunky

karnevil
20 Jun 2008, 13:45
I get

You did not select any posts to which the action you picked can be applied.

come up when Search is clicked.

TheInsaneManiac
21 Jun 2008, 01:55
You are probably using another search script that is interfering with the name variable.

Try this:
<input type="checkbox" name="googlesearch"
value="http://yourwebsite.com" /> Only search Website Title<br />

ali7118
24 Jun 2008, 11:25
nice

TheInsaneManiac
27 Jun 2008, 02:29
nice
Thanks. If you have any questions don't hesitate to ask.

segwayon
18 Oct 2008, 01:35
Question: How do I use this BB code on our templates? I'm only aware of BB code use within posts. Thanks!

[Update: Ah, got it. Cool mod! Thanks!]

[Update: I get this error message after I went back into the BB code to remove the "checked" word]:

Your submission could not be processed because a security token was missing.

If this occurred unexpectedly, please inform the administrator and describe the action you performed before you received this error.

[Update: Deleted the BB Code and re-installed it, and it is working again. Any way to have the search spawn another browser instance rather than using the parent browser?]

forumsonsuz
20 Oct 2008, 16:31
Nice, thank you.

SPARKS MAN
22 Oct 2008, 18:30
installed its fantastic code

TheInsaneManiac
29 Jun 2009, 00:10
Update: Deleted the BB Code and re-installed it, and it is working again. Any way to have the search spawn another browser instance rather than using the parent browser?

You mean a new window? Yea it's possible. Change this code:
<input type="submit" value="Google Search" />

To:
<input type="submit" value="Google Search" target="_blank" />

lm3a.net
23 Aug 2009, 12:27
thanks,,

TheInsaneManiac
23 Dec 2009, 19:40
No Problem.

farazfaraz
01 Feb 2010, 23:02
احسنت
تبارک الله