View Single Post
  #59  
Old 08-18-2002, 07:47 AM
memobug memobug is offline
 
Join Date: Jun 2002
Posts: 418
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great idea! This looks really useful. I am thinking of a little bit different use.

Shouldn't the default really be to search the forum itself? Anyway, I am thinking of using this also to search my own photopost database of pictures, and my links database, but I will probably make the default a simple search of the forum.

Some notes:

1) I found each template (both search_the_internet and search_the_internet_window) have what appears to be a few instances of the same minor html bug: Each has a few, I believe three instances of valign="center". and the actual options for the valign tag are "bottom" "middle" or "top", so it probably should be "middle?"

2) If you do decide as I did to make the default search option a search of your forum, you may find this useful:

add this case option to websearch.php with the others:
Quote:
case "myforum" :
doSearch("http://www.yourforum.com/search.php?action=simplesearch&sortby=lastpost&sor torder=descending&forumchoice=-1&searchdate=-1&query=");
break;
Then, open the search_the_internet template and replace the
Quote:
<option value="google" selected>Search--> Google
bit with the following:

Quote:
<option value="myforum" selected>Search -> Your Forum Name Here
<option value="google" selected>Search -> Google
That will make a simple keyword search of your forum the default search

3) Then, if you'd like to change the layout a bit to what I found to be a little more straightforward presentation, you can get rid of all that Search -> This engine stuff in the pulldown and insert the word Search as a text label for the box. You can see it in the footer at http://forum.bonsaitalk.com but it looks like

Search for: [ input box ] Search in: [ pulldown box ] [(go button)]

I think that's cleaner anyway, plus moving the submit button (which I relabled Go! to a position right next to the pulldowns.

4) Somewhere I have some Javascript for a pulldown that doesn't require a GO! button. That might be even better since this is a Jscript menu anyway. I'll look around.

5) Here's another one you'll definitely want to add, especially if you are Amazon Affiliate:
add to the case statement in websearch.php, replacing the "tag=" part with your own affiliate ID, or use mine, heck I don't care!

Quote:
case "amazon" :
doSearch("http://www.amazon.com/exec/obidos/external-search?mode=blended&tag=wwwbonsailinn-20&keyword=");
break;
default :
and modify your search_the_internet template accordingly:
Quote:
<option value="amazon" >Search--> Amazon

Fun Hack!

Regards,

Matt
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01189 seconds
  • Memory Usage 1,777KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete