vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=229)
-   -   BB Code Enhancements - Google Search Box BBCode (https://vborg.vbsupport.ru/showthread.php?t=183001)

TheInsaneManiac 06-19-2008 10:00 PM

Google Search Box BBCode
 
Instead of pointing new people to google, how about putting it right in front of them?

Title: Google

Tag: google

Replacement:
Code:

<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: [google]VBulletin[/google]

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:
Code:

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

With:
Code:

<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:
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

Quote:

Originally Posted by redraider (Post 1554129)
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

Quote:

Originally Posted by ali7118 (Post 1557621)
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]:

Quote:

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.


All times are GMT. The time now is 12:59 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00986 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete