« Close Old Comments with BlogJanitor | Main | Learning Movable Type Has a New Look and Focus »

MT Community Search

Updated March 10, 2007

Introducing a new way to search for Movable Type information throughout the MT community, MT Community Search (http://www.mtcommunitysearch.com).

Using Google's custom search capability, I've put together a custom search engine of the most popular and content-rich Movable Type sites, including the MT forums. You'll find this search bar in the sidebar of LMT. You can try it out here:


If you would like to add this search bar to your site, you can use the following code:

<!-- Google CSE Search Box Begins -->
  <form id="searchbox_003084314295129404805:7bvp7badf0w" action="http://www.google.com/search">
    <input type="hidden" name="cx" value="003084314295129404805:7bvp7badf0w" />
    <input type="hidden" name="cof" value="FORID:1" />
    <input name="q" type="text" size="40" />
    <input type="submit" name="sa" value="Search" />
  </form>
  <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_003084314295129404805%3A7bvp7badf0w"></script>
<!-- Google CSE Search Box Ends -->
      

If you would like to have this search bar on your site, with the results opening up into your own website, use the following code snippets.

Here is the search bar code. Replace http://www.learningmovabletype.com/communitysearch.php which occurs on the first line of the following form with the URL of the page on which you would like the results to occur.

<!-- Google CSE Search Box Begins -->
  <form id="searchbox_003084314295129404805:7bvp7badf0w" action="http://www.learningmovabletype.com/communitysearch.php">
    <input type="hidden" name="cx" value="003084314295129404805:7bvp7badf0w" />
    <input type="hidden" name="cof" value="FORID:11" />
    <input name="q" type="text" size="40" />
    <input type="submit" name="sa" value="Search" />
  </form>
  <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_003084314295129404805%3A7bvp7badf0w"></script>
<!-- Google CSE Search Box Ends -->

Then, on the results page, place the following code where you would like the results to appear:

<!-- Google Search Result Snippet Begins -->
<div id="results_003084314295129404805:7bvp7badf0w"></div>
<script type="text/javascript">
  var googleSearchIframeName = "results_003084314295129404805:7bvp7badf0w";
  var googleSearchFormName = "searchbox_003084314295129404805:7bvp7badf0w";
  var googleSearchFrameWidth = 600;
  var googleSearchFrameborder = 0;
  var googleSearchDomain = "www.google.com";
  var googleSearchPath = "/cse";
</script>
<script type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js"></script>
<!-- Google Search Result Snippet Ends -->
If you would like to customize the colors that the results display for fonts and links, add the following line before the </form> tag in the Search Box Code (not the results code):
<input type="hidden" name="cof" value="GALT:#0066A1;GL:1;DIV:#FFFFFF;VLC:654006;AH:center;BGC:FFFFFF;LBGC:FFFFFF;ALC:654006;LC:654006;T:2B1205;GFNT:2B1205;GIMP:2B1205;FORID:11"></input>

You can play around and experiment with the color values.


If you think a site should be included in this search engine, search for it first. If it isn't there, and you would like it to be, drop me a note in the comments.

Enjoy!

Post a comment

(If you haven't left a comment here before, your comment may need to be approved before will appear on the entry. Thanks for waiting.)