Login | Register

July 2005

Going on Vacation

Jul/22/2005 10:41 PM

Next week I will be on vacation, so if you leave me any emails I won't be responding, and if you comment and this site and get the message that it was moderated, then it might take some time before it shows up. Right now, I am sitting here with 15 minutes left to go at work before I have the next nine days off. I am excited. This is the first time I have gone on a trip since I went to Cedar Point back in 2001. The last time I went camping was my honeymoon back in 2000. Our family is going up north to Higgins Lake to go camping. I bet Hailey is going to have a blast because she is addicted to being outside now, and she will be able to do that all day long now.
But, before I go on vacation, tomorrow I am spending the day with Patrick. I am pretty excited about that too. We haven't done anything together for more than a couple of hours here and there in a long time. But, tomorrow we are getting tuxes for his wedding, and then we are going to golf. Something I have never done in real life. I have been playing Hot Shots Golf on the PSP non-stop recently, but I imagine the real thing is a bit different.
Anyhow, my night is now done at work. Yay! Here comes my vacation!

Updated Livesearch for Movable Type

Jul/20/2005 10:18 AM

Last month when I finished my site redesign, one thing I also ended up doing was recreating the Livesearch feature I have on here. This was not something I had planned on doing, but I messed something up with the old one and I was unable to fix it.

Just for some background, my original Livesearch was based on some Javascript and a PHP search script for Movable Type. What had happened, is I messed something up rendering the PHP search to no longer work. I spent hours going over all the code and going through my database to try and find a reason, couldn't figure it out. So, instead, I decided to set the Livesearch to work with the built-in Movable Type search instead.

To do this, you will still want to follow the installation instructions to get the HTML setup on your page and the Javascript setup. There's going to be one change to the livesearch.js file I will mention later.

To setup a search template, you will need to upload a new file to the search_templates folder of your MT install. The file should be named livesearch.tmpl. Here is what the file should contain:

<MTSearchResults>

<MTBlogResultHeader>
<strong>SEARCH</strong> : Results for "<$MTSearchString$>"
<ul class="LSRes">
</MTBlogResultHeader>

<li class="LSRow">
<a href="<$MTEntryLink$>"><$MTEntryTitle$></a>
</li><!--LSRow-->
</MTSearchResults>

<MTNoSearchResults>
<ul class="LSRes">
<li class="LSRow">
No results for "<$MTSearchString$>"
</li><!--LSRow-->
</MTNoSearchResults>

</ul><!--LSRes-->

The next thing you will want to do is open your mt.cfg file and add the line "AltTemplate ls livesearch.tmpl" without the quotes. This will tell Movable Type to use this search template and gives it an ID of "ls". Now all you will need to do is edit the livescript.js file. You will need to look for liveSearchReq.open("GET", liveSearchRoot + "/livesearch.php?q=" + document.forms.searchform.q.value + liveSearchParams); and replace it with liveSearchReq.open("GET", liveSearchRoot + "/mt/mt-search.cgi?SearchElement=both&SearchCutoff=99999&MaxResults=10&Template=ls&search=" + escape(document.forms.searchform.q.value));

You may need to adjust that line so it points to your mt-search.cgi script. Also, the SearchElement=both can be changed to SearchElement=entries if you don't want comments included in your search and the MaxResults can be what you would like.

Once you've done this, you should be all set to go using Livesearch on your Movable Type-based site.

Fireworks

Jul/05/2005 09:31 AM

Last night, Nickcole and I took Hailey and Brett to go see the fireworks show in Eaton Rapids. It was a lot of fun, Hailey really loved it. I was also surprised that she really enjoyed playing with the sparklers and wasn't afraid of them. She is growing up really fast lately. She just had her 2nd birthday a little over a week ago, and she has already started potty training. This wasn't something Nickcole or I had tried to push on her. One day, she said she had to go pee, so we walked her to her potty and she just went. She has done that once again since that first time.