PDA

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


TheInsaneManiac
06-19-2008, 10:00 PM
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
06-20-2008, 01:21 AM
Looks like a great idea!

TheInsaneManiac
06-20-2008, 05:36 AM
Looks like a great idea!
Thank you, I appreciate it.

Vinyljunky
06-20-2008, 10:07 AM
How about supporting Adsense code so we can make cash from the results :)

Thanks

VinylJunky

karnevil
06-20-2008, 11:45 AM
I get

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

come up when Search is clicked.

TheInsaneManiac
06-20-2008, 11:55 PM
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
06-24-2008, 09:25 AM
nice

TheInsaneManiac
06-27-2008, 12:29 AM
nice
Thanks. If you have any questions don't hesitate to ask.

segwayon
10-17-2008, 11:35 PM
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
10-20-2008, 02:31 PM
Nice, thank you.

SPARKS MAN
10-22-2008, 04:30 PM
installed its fantastic code

TheInsaneManiac
06-28-2009, 10:10 PM
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
08-23-2009, 10:27 AM
thanks,,

TheInsaneManiac
12-23-2009, 05:40 PM
No Problem.

farazfaraz
02-01-2010, 09:02 PM
<font color="Red">احسنت
تبارک الله</font>