A Blog by Scott Isaacs

Tag: Blogosphere Page 3 of 4

Google Search Results In Community Server 2007

I was having issues with the built-in search in CS2007.  Basically it was loading a blank page (no HTML at all) instead of the search results page.  I’m sure I could find some info about the issue in the forums, but decided I would take a few minutes to try to implement Google’s Custom Search instead.  I spent more time futzing with the CS files than necessary to figure it out, but in the end the changes were pretty simple.

Step 1: First, sign up on Google to have a custom search engine.  I’m not going to walk through this since it’s not that hard, and I’m sure you’re smart.  After your site is setup, go to the Code link in the control panel.  Expand the “Search box and search results code for your website” panel.  I recommend using the watermark text box because it will most likely match your site better than the other options.

Step 2: Backup these two files: /Themes/Blogs/YOURTHEME/theme.master and /Themes/Blogs/YOURTHEME/search.aspx.

Step 3: Open /Themes/Blogs/YOURTHEME/theme.master and remove the section for <CSBlog:SearchForm … />.  Replace that with code similar to the following, with variables changed based on what you get from Google:

<div id=”Search” align=”right”>  <table cellpadding=”0″ cellspacing=”0″ border=”0″>    <tr><td>      <input name=”q” id=”q” type=”text” class=”searchBox” 
Button=”SearchButton” onkeydown=”javascript:if((event.which
&& event.which == 13) || (event.keyCode
&& event.keyCode
== 13)) {GoogleSearch();return false;}else return true;”
/> </td><td> <span class=”SearchButtonOuter”> <a id=”ctl00_ctl06_ctl00_SearchButton” class=”SearchButton”
href=”javascript:GoogleSearch2();”>Search</a> </span> </td></tr> </table> </div><script language=”JavaScript”>function GoogleSearch2(){window.location =
“http://www.tapmymind.com/blog/tap_my_mind/search.aspx” +“?q=” + document.getElementById(“q”).value +“&cx=014327199496625865409:3nxxz5mvxtw” +“&cof=FORID:10” +“&sa=search”;}function GoogleSearch() { window.setTimeout(“GoogleSearch2()”, 200);}</script><script type=”text/javascript”
src=”http://google.com/coop/cse/brand?form=aspnetForm”></script>

You may have to change some HTML for layout purposes.  I am using the Paperclip theme and this worked for me.  I basically copied the resulting HTML from a source view of the unmodified page, inserting stuff where I thought was appropriate.

Also, the setTimeout was to cause a delay before submitting the form with the Enter key (the whole bit about event.keyCode, etc.) due to some issues I found with IE’s autocomplete not, ummm, completing before the form was submitted.  Also note that I am using the current search URL.

Step 4: Open /Themes/Blogs/YOURTHEME/theme.master and remove then contents of the <asp:Content … /> item — just the contents, leave the asp:Content element itself.  In it’s place add code like this (again, based on what Google gives you):

<h2 class=”pageTitle”>Google Custom Search Results</h2>These results are coming directly from Google’s search engine.  
Consequently, some items do not show up in the results right
away. If you are search for a post you expected to find, but
it is not listed, please try the same search on <a href=”http://blogsearch.google.com/blogsearch?as_q=<%
Response.Write(Server.UrlEncode(Request.QueryString[“q”]));
%>&bl_url=tapmymind.com”>
Google’s Blog Search tool</a>.<br /><br /><!– Google Search Result Snippet Begins –><div id=”results_014327199496625865409:3nxxz5mvxtw”></div><script type=”text/javascript”> var googleSearchIframeName =
“results_014327199496625865409:3nxxz5mvxtw”; var googleSearchFormName = “aspnetForm”; var googleSearchFrameWidth = 500; var googleSearchFrameborder = 0; var googleSearchDomain = “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 –>

Note that I specified the search form name as “aspnetForm” (here as well as in the previous step).  This is the name/id the resulting HTML form has and correctly specifying this allows Google to properly add the watermark, as well as pre-populate the text box with the current search term automatically.

I also added a link to do the same search on Google’s Blog Search (GBS) tool.  I noticed that a post I recently added was not showing in the results because it hadn’t been indexed yet (I assume), but it does show in GBS because of pings that CS2007 sends for me.  So I coded the link to automatically search my site (you’ll want to change the value for bl_url) and the current search term.

Step 5: This step may or may not be important to you, but I also had to modify styles.css for the current theme so that the text box was wide enough to show the Google watermark.  I don’t have that file handy at the moment, but I think I changed the width to 140 or 150px.

As far as I can remember, that’s all I did, and so far it works for me.  I imagine many other people have already tried this and figured it out, but I didn’t bother searching for examples.  I didn’t really test this heavily, so please let me know if you find bugs or have suggestions.  I just have to remember this if I change themes or upgrade CS (hence this post).

Be sure to be aware of wrapping issues with the code I have posted here.  Also, I strongly recommend you backup everything you are going to edit first.  I’m not responsible for any damage you cause to your site.  [:)]

If anyone has an easier way, let me know.

Things On My Desk

I’ve been in a little bit of a blogging slump.  Other than a link to a cartoon, I haven’t posted anything in a month and half.  As I mentioned previously, I’ve been spending a lot of brain power on work lately (hopefully that will be calming down in a month or two), and consequently haven’t really sat down to write anything.  I’ve opened WLW a dozen times to write something and started at a blank screen forever (or at least 15 seconds) before giving up and closing it.

Well, at the advice of another blogger, today I’ve decided to post a list.  I actually wasn’t going to post anything at all, but as I was looking around my desk I noticed that I had a few things on my desk that many other developers might not have.  I thought about it for about 3 seconds and realized, “Dude!” — remember, I’m originally from California — “This would make a totally awesome list post!”  Four more seconds later I decided that while the post might not be “totally awesome”, it would be fun for me at the least.

So anyway, here goes.

The Standards

francisco#1 — Francisco.  Francisco is my trusty Dell XPS M140 laptop that I got about 19 months ago — that makes him middle-aged in computer years.  A similarly equipped machine is now available from the same manufacturer for approximately 30% the cost I paid for Francisco, but our relationship is deeper than that.  It’s not all about money, you know.  And although he’s been feeling a little under the weather lately, and generally acting like someone suffering from some sort of bipolar disorder, we’ve been through a lot together, and have a strong bond.  Really.

So anyway, you may be wondering, “Is Scott using his personal computer for work?”  Yes, I am.  Let me know if you’re wondering anything else.

20inch#2 — The 20″ Dell display.  So I wanted to continue on for a moment with that thought you were having about me using my personal computer at work.  I work at a startup company, and as you may be aware, it’s not 1999 anymore and I’m not in the Bay Area.  As a result of the way the time-space continuum works, we are not funded with millions of dollars to spend on things like launch parties, massages, swanky lunches and high-end computers.  Well, at least not at the beginning.

I do have now (as of a month or two ago) a new Dell desktop somewhere in this office building.  It’s just waiting for me.  Every now and then I go out to the warehouse to make sure it’s still there, but I haven’t been able to take the time to set it up with all of the software I need to be productive.  So, in the meantime, I decided I might as well not let that 20″ monitor go to waste, so I plugged it in to Francisco.  So there you go.

pics#3 — Photos of my kid.  What proud father’s desk would be complete without photos of his most prized possession.  This is my daughter, Charlize.  We call her Charlie (named after my grandpa) and she’s the cutest baby ever.  The way that you can tell is that everyone that does not have little kids says, “She is the cutest baby ever”, and the people that do have kids say, “She is the cutest baby ever except for my kids.” 

The people in the second group are just liars.  But I forgive them because I’m sure they wouldn’t want it to get back to their kids that they thought my kid was cuter than theirs.

notepad#4 — A top secret drawing.  I can’t tell you what this is, or I’d have to… you know.  Actually I almost forgot what it was myself.  It’s a good thing I didn’t forget because it’s very, very important.

As you might have guessed, I’m not a good note taker.  The only things I write down are things I would probably remember anyway.  That and a lot of doodles.  I personally a fan of the spiral scribble and the sine wave.  Yes, the sine wave.  It’s the only thing I remember from my 11 years (actually about 5 years with a lot of breaks in between) and untold thousands spent on my degree in Applied Mathematics.  I used to wonder why they called it a B.S. degree.

postit#5 — My new patented “Memory Replacement”.  This might not be a “Standard” yet, but trust me: it will catch on like wildfire and will be popping up on desks across the globe.  To the uneducated and uninformed it looks like a simple pad of sticky notes and a pen.  Not so!  Recent research efforts have proven this handy little invention of mine to be an effective memory replacement for those of us who suffer from ultra-short-term memory loss (USTML).  USTML can be caused by a variety of factors, including fatigue.  Scientists don’t yet have a cure for USTML, but the Memory Replacement can help alleviate the side effects.  Be sure to consult your physician if side effects continue or if your Memory Replacement causes aches and cramping in your wrist.

Nonstandard

fork1#6 — A plastic fork.  Not typically a “nonstandard” item, but I haven’t eaten anything with a fork at my desk at all in recent memory.  I think I can remember how it found its home on my desk, but it’s just weird.  I mean, think about it, who has a fork on their desk?  Just sitting there?

I’m not sure how long I’m going to keep it.  It’s not like I have any emotional attachment to it or anything.  I haven’t given it a name or showed it to any of my friends (aside from this blog post, that is).

fork2#7 — A cool projectile toy.  No, it’s not a fork, people; it’s a cool projectile toy.  I can’t read Chinese, but the package says it’s called phourque

As you can see from the concave shape of this toy, a simple tap of the fingers on the elevated portion will cause this toy to fly into the air.  With practice you can learn to launch this toy straight up and back down into place, or you can hit targets up to 3 meters away (I guess they use the metric system in Taiwan — that’s, like, 3 feet in American).  The manufacturer recommends against trying to hit human targets, but, seriously, where’s the fun in that?

livecam#8 — An empty Live Cam box.  What do you think I’m using to take these pictures with?  Telepathy?  A 5+ megapixel camera?  My cell phone?  Yeah right!  Those are for losers!  I use this fine piece of hardware that is currently set to take high quality photos at 240×180.  It is a very versatile camera and it can be used to take pictures of computers, forks, toys, other pictures and even people.  Try doing that with telepathy!

You may have noticed there is also a high-end power strip in the frame with the Live Cam.  My work gave me that as a gift.  I use that power strip to not only supply power to Francisco and the 20″ Dell monitor (see items 1 and 2 above), but also as a spacer between my desk and the wall. 

I’m thinking of a ridiculously sigh-and-eye-roll-inducing play on words about table layout and spacer gifts (GIFs), but I’ll keep it to myself.

quickcam#9 — A QuickCam.  What’s this?  Another camera?  Yes, but this one is still in it’s box.  I’m sure there are many differences between this camera and the Live Cam.  First, this one is called QuickCam instead of Live Cam.  2 – this one is still in the box. C) the QuickCam cost us about twice as much as the Live Cam and it is a round ball shape instead of a vertical-half-an-egg shape.

In reality, this one is there to make sure that the application I’m working on works just as well with this camera as it does with any other camera.  So far so good as long as I remember to install the camera drivers.

phone-water#10 — A cup of water and a cell phone in a cell phone recliner.  I actually like to drink water a lot, and fortunately for me at work we have a reverse osmosis system hooked up to the fridge, so it’s like unlimited, free, good water.  Woo hoo!

Next, as you can see, my cell phone has a nice comfy little recliner to relax in while I work my fingers to the bone.  Yeah, I want my phone to be comfortable and all, but I have to admit that sometimes I see its smug little look while it’s sitting there in its fancy schmancy little phone recliner and I just can’t take it anymore.  Stupid arrogant phone. 

I used to have the same problem with my iPod.  Everyone knows that Apple products are cocky and arrogant to begin with, but give them a cushy soft papasan, and they take it to a whole new level.  Let’s just say I can’t find that iPod papasan anymore.

tape-lights-photoeye#11 — Some tape, lights, sensors and wire.  Here is some work stuff:

  • Some lights taped to my desk so I can see when they turn on and off more easily
  • A couple of different sensors (one actually fell on the floor and didn’t make it into this photo)
  • A roll of ultra-high quality, blue, single-sided adhesive paper.
  • Some mounting brackets for certain types of sensors.
  • A DVD a co-worker lent me to watch in my spare time.

reader-wires#12 — An RFID reader.  More work stuff.  This thing is an RFID reader.  That means it reads RFID.  But not just any RFID, it reads passive, UHF, Class 1 Gen 2, EPCGlobal compliant RFID tags.  Yeah, but the impressive part is that yellow cord hanging out of the side of it.  That thing is awesome.  It makes it so much easier to switch between different types of sensors.  Previously, testing new sensors meant unwiring the current one and rewiring the new one, trying to remember which wire goes where.  Fortunately most sensors use the same color scheme for wire colors, however, it was still a pain.  Now we only use sensors that support this quick connect cable and life is easier.  It kind of makes me wonder why we didn’t try this sooner.

Bonus

whiteboard#13 — My whiteboard.  OK, yeah, this isn’t really on my desk.  In fact, it’s behind me as I face my desk so it’s on a completely different side of the room.  I just decided to include it so that I could have a bonus section.  I always wanted to have a reason to have a bonus section in a list.

Anyone care to take a guess at what is represented by the drawing on the board?  Of course, I will be neither able to confirm nor to deny your guess as this is also top secret like the notepad above.  You’ll just have to think about it and wait until I’m a multi-gazillionaire before I can let the secret out.

Conclusion

So, there you have it.  I blogged.  It’s a list.

Maybe we can make this into one of those crazy blog meme things.  You know, kind of like chain-letters-for-blogs where people talk about things they’re going to do in the next 6 months to become a better developer, or post the results of some survey that tells them some revelationary fact about themselves in terms of cartoon characters, and then other people do the same thing, and so on.  What do you say?  What things do you have on your desk?

Or you could just read this and forget about it.  Your choice.

Disclaimer: I make words up.  I constantly add new words to my spell checker because it doesn’t like them.  Words like revelationary.  Sorry.

I Really Like Windows Live Writer

I downloaded the latest beta of Windows Live Writer* a couple days ago and have finally gotten around to making a post with it.  I didn’t have any real issues with the previous version, although there were a couple things I would have liked changed.  Applying tags (categories) to a post is not any easier now than it was with the previous version, but it is harder to forget now.  There is a setting that causes WLW to remind me to add categories before posting.  A nice friendly dialog pops up and says something along the lines of, “You haven’t categorized this post yet.  Do you want to post it anyway?”

All in all, WLW makes it much more enjoyable to post.  Since I started using it I’ve posted more.  I still may go a while between posts, but when I post one, it is so easy that I usually end up posting a couple more within a short amount of time.  For example, this is my third post in about 20 minutes.

Anyway, I recommend you download and try it.  It works with lots of popular blogging engines.

* = When I first type “Windows Live Writer”, I misspelled it and typed “Windows Lice Writer”  For some reason I thought that was funny enough to mention here.  Maybe it’s my level of sleepiness?

New RSS Feed Address

If you subscribe to my feed in RSS, you may be interested to know that the address has change to http://feeds.feedburner.com/tapmymind.  From what I can tell, if your RSS reader supports redirects (which I imagine most do these days), you shouldn’t have to change anything.  If not, however, you will need to switch to the new address.

I decided to try FeedBurner because they offer various statistics that might not otherwise be available.  Plus, all the cool kids are doing it.  [:)]

Community Server 2007 and Windows Live Writer

So I just upgraded to Community Server 2007 today, and I’ve been using Windows Live Writer for my last couple posts.  This is my first test of the two in combination. 

One thing to note, in WLW I tried to update the style of my blog, but it failed for some reason.  I may look into it later, but in all reality it’s not that important for me to see my posts in the same exact layout as they will appear after publishing.  Also, I still want to update the skin from the default one being used, but I’m not sure when I’ll get around to that.

One gripe I having about using WLW is that adding categories (tags), while easy enough to do, is obscure enough to make it easy to forget.  It’s not really obscure, just not front and center.  Oh, well.  I imagine it will just take a little time to get used to it.

Update: For some reason, after I restarted WLW a few times, the “Update Weblog Style” function began working.  Also, be sure to remember (like I didn’t) that by default CS removes the www from your URL, and that was causing problems with WLW finding the MetaBlog API (since I had changed that on my previous CS install and hadn’t changed it again on the new version).

Telerik — The Quest?

So, what is it?

I added my piece, but it’s in a lousy location.  You can’t even really tell it’s there.  Five points* to the first person to find it!

* Points have no cash value and cannot be redeemed for anything with any cash value.  Basically, I might as well have offered five billion points — you’re not really going to get anything for it.  However, you do have the privilege of saying that you got the points, and that’s worth something in and of itself.

(via Sahil Malik)

Update: Comment Spam

I mentioned before that I was getting a lot of comment spam, so I turned on comment moderation.  Well, yesterday and today I received around 100 comment spam.  Since they are moderated, they don’t show up, but it’s still a pain.

So I finally looked into some other options, namely ReverseDOS.  If this works well, the I’ll remove the moderation entirely.  Does anyone have any experience with this tool?  Maybe some customized filters that work really well?

Win MSDN Premium with Visual Studio 2005 Team Suite!!

I just posted about the new WI .NET Users Group Evangelist program.

What I didn’t mention is the blogging contest that is taking place for the next couple weeks leading up to Deeper in .NET 2006.  One lucky member of the Evangelist program will win a copy of MSDN Premium Subscription with Visual Studio 2005 Team Suite, worth over $10,000!  Who wouldn’t want that?!  Well here’s your chance to win one!  Simply sign up for the Evangelist program, start blogging, and you’re eligible.  (There are actually some rules, but they’re simple.  So be sure to check those.)

In addition to the MSDN/VSTS grand prize, the runner up will receive a copy of Visual Studio 2005 Profession Edition and SQL Server 2005 Standard Edition!

So start spreading the word about the WI .NET Users Group and Deeper in .NET 2006.  What have you got to lose?

WI .NET Users Group Evangelist Program

If you’ve visited my site recently (opposed to RSS) you may have noticed a new button I have placed on the sidebar.

WI .NET Users Group EvangelistThe WI .NET Users Group has just launched an Evangelist program.  Being the president of that group, I figured I was also an Evangelist.  🙂  From the UG site:

Are you excited about .NET? Do you attend every WI .NET Users Group meeting, and feel guilty if you miss one? Do you stay up all hours experimenting and learning new things? Do you blog about .NET or tell people about the latest “cool thing” you just learned? Then it sounds like you might just be a WI .NET Users Group Evangelist.

If you think this applies to you, then by all means, sign up.  It’s free and easy.  You’re already doing the “hard part”.  🙂 

Go here for more info: http://www.wi-ineta.org/evangelist/

Deeper in .NET 2006!

As president of the WI .NET Users Group, I’m really excited about our upcoming conference on April 22, 2006.  Deeper in .NET 2006 will be at the Hyatt Regency Milwaukee (map).

We have five great speakers lined up for the day-long FREE conference:

  • Michele Leroux Bustamante — WCF Top to Bottom
  • Scott Hanselman — Anatomy of a Successful ASP.NET Application: Inside DasBlog
  • Julia Lerman — ADO.NET 2.0 Integration with SQL Server 2005
  • Bill Hatfield — AJAX and Atlas
  • Jason Beres — Using WPF to Create Compelling User Interfaces

We’ve also got a number of great sponsors lined up, and a ton of prizes to giveaway to attendees — at the moment we’re somewhere around $15,000 – $20,000 in prizes!  (And we hope to have even more by the time April 22 rolls around.)

Like I said, this event is free to attend — how can you beat that?  You do need to register in advance to “save your spot”, because last year, we had only standing room.  So if you’re anywhere within driving distance of Milwaukee, you should come.  For those coming from out of town, I’m trying to work out a special rate at the hotel, and will post more on the UG site when that is worked out.  I know we have people coming from all Wisconsin, Chiacgo, and Indianapolis.

Also, the UG is still looking for a few more annual sponsors for 2006, so if you work at a company that might be interested in sponsorship opportunities reaching nearly 2,000 .NET developers (*), architects and decision makers, by all means, please get in touch with us.  You can find out more info about our sponsorship programs here.

Most of the information about Deeper in .NET 2006 is available on our site, but if you have any questions, just ask.  🙂  I hope to see you there!!!

* Update: For clarification, our total membership and mailing list is nearly 2,000, and each member will receive a number of e-mails.  Actual meeting attendance is limited to venue capacity and will be somewhere between 500 and 600.  Sorry for any confusion.

Page 3 of 4

Powered by WordPress & Theme by Anders Norén