Welcome to CrankyGoblin.Com Sign in | Join | Help

Public Class GeoffAppleby

Inherits Microsoft.VisualBasic.MVP : Implements IBrainFart
Doing Things the Long Way

I wanted to do a little change to some code I'd written for CS yesterday. For both the Gaptcha control and my in-line file uploader I'm uploading a file and saving somewhere within the current user's blog. I've been constructing the save locations (and hence the URL to the saved file) in a sorta roundabout way, relying on using the Weblog.Url property to get the url to the root of the blog, and constructing the rest myself.

I knew there was a better way, but hadn't found the time to research I - but now I had it and needed to do some learnin'.

Sometime in the last couple of weeks I remembered reading a blog post from someone about dealing with urls in Community Server. I forgot to bookmark but I knew I'd want to read it sometime, and that time was yesterday. I looked and looked and couldn't find the damn post anywhere!

So what do you do when you need to know something about Community Server in a hurry? Contact the friendly telligent helper-monkey Dave Burke! I found him on messenger and asked if he could remember seeing it - I was pretty sure I'd seen a reference to it in the Community Server Daily News, but I couldn't see it there either.

After a little bit of banter convincing him that this was life-or-death important, and that I really didn't care that it was after 1AM in the states at this stage (afternoon here in Oz) he was willing to help.  And he set to with vim and vigour all manner of useful information that I didn't see immediately because I was rudely interrupted by someone who wanted to talk to me (IN PERSON!) it ends up that not only did he remember it, but it was him that wrote it :) So I got my help and he was allowed to go to bed (ok, so he went to bed while I was busy doing this talking thing, but he emailed it all to me just in case messenger died).

Thanks Dave. I knew you were useful for something. And in this case, you were useful big time :)

So having read that post, things were easy. Add a method to the BlogUrls object, register a new pattern in the siteurls.config file, and now I just call BlogUrls.Gaptcha(CurrentWeblog, desiredFileName) and it returns to me the url to the file in the Gaptcha images directory. Sweet! I think now to get the url to the file, and then save the uploaded file to that location what was around 40-50 lines of code has become ten, and is much less error-prone.

The moral of the story? Be nice to your monkey, or it'll spank you :)

You rock, Mr Helper-Monkey! Will you be my valentine?

Posted: Friday, 27 October 2006 2:13 PM by Geoff Appleby

Comments

Community Server Daily News said:

news of the day a grab bag for what's happening in Community Server Sean Winstead seamlessly adds forums

# October 27, 2006 1:35 PM

Daily News Faq List said:

That's MISTER Telligent Helper Monkey to you, pal! Geoff Appleby exploits a security vulnerability in

# November 22, 2006 8:03 AM

Community Server Bits said:

That's MISTER Telligent Helper Monkey to you, pal! Geoff Appleby exploits a security vulnerability in

# March 12, 2007 5:32 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

To submit your comment, click on these pictures:
  • Shocked Geoff
  • Geoff's hand
  • Geoff with sunglasses
Gaptcha Image - No Peeking! Gaptcha Image - No Peeking! Gaptcha Image - No Peeking!
Gaptcha Image - No Peeking! Gaptcha Image - No Peeking! Gaptcha Image - No Peeking!
Gaptcha Image - No Peeking! Gaptcha Image - No Peeking! Gaptcha Image - No Peeking!
Can't recognise the people in these pictures? Look here for a quick introduction.
There's a time limit for you to get your comment submitted before this set of pictures expires. If you think it's been longer than 10 minutes, get some new pictures first (you won't lose what you've typed so far).
Get some new pictures 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS