Please Charge Me Something

For Christmas the brother-in-laws on Tammy’s side pick names. There are only four of us but we like the simplicity of just getting one name to pick better. For a couple of years now we’ve used a website called DrawNames.com to handle the name drawing, sending emails and even handling exclusions so you don’t get the same person every year. They sent an email asking for feedback and I felt like sharing some thoughts with them and decided I should share them publicly too.

I like your service a lot and if I had more name drawing groups at Christmas I would use it for sure. I’ve suggested your service to others and I know that at least some of them have used it. Everything went very smooth and I think you have the right email confirmations in place to make sure you don’t get “busted” email picks in spam folders.

With that said, I have a concern that your service makes enough revenue to be around. My alternative to using your service is to write a small script that will pick names and send emails. It would be ugly. Probably break a lot. Would likely not get delievered right. I’d rather use your service! I see that I can keep a wishlist and I’m sure that generates affiliate revenue, but I’m not sure many people do that. I know we don’t.

I would rather just pay a small fee for each name drawing group that I have. Maybe a $1? $2? I’m not sure what the right amount is, but I have a hard time seeing how you would make $1 off of our group now, so at least for us that would be an increase.

In addition to making me feel like your service will continue to be around, it would also give me confidence that you are not dropping remarketing cookies in my browser (you aren’t right?) and that my friends and family are not having their email addresses sold to others (which your privacy policy assures me is not happening already).

While I have your ear let me also thank you for not littering the site with link ads. Thank you for not requiring the use of Facebook connect or login with Twitter stuff.

That’s it. The service is nice and works really well. Just charge me something. :-)

My hope is that they have thought about charging before but assume that nobody would pay. It’s the Internet right? Nobody pays. But they do. They pay in droves for the right thing. This website is worth as much to me as many iOS apps I’ve bought for $0.99. Maybe if they hear customers saying they would pay, they can see the path to something that pays the bills and is worth keeping around clarify a bit.

Adding Email Mention Notification to WordPress P2

I’m using the P2 theme on a couple of websites, one of them is for the team minne✱ to help coordination and collaboration. P2 supports the ability to use a @user notation to mention other users on the site, but it doesn’t do anything other than highlight the user. This snippet of PHP added to the bottom of the P2 functions.php will send email notifications on those mentions. This isn’t heavily tested but it works well for me.

/**
 * Custom code added to P2 to enable email notifications
 * when a user is @mentioned in the site.
 *
 * Original at http://trepmal.com/2011/06/24/using-wordpress-multisite-p2-and-more/
 * and modified from there.
 */
add_action('publish_post','send_email_notification_once',9);
function send_email_notification_once($postID) {
	$post = get_post($postID);
	$author = get_userdata($post->post_author);
	global $p2;
	$mentions = $p2->components['mentions']->find_mentions($post->post_content);
	$permalink = get_permalink($postID);
	$blog_title = get_bloginfo('name');
	foreach ( $mentions as $match ) {
		$email = get_user_by('slug',$match)->user_email;
		$message = "You have been mentioned in this post:\n $permalink \n\n {$post->post_content} ";
		wp_mail($email, "[$blog_title] You've been mentioned by {$author->display_name}", $message);
	}
}

add_action('comment_post','send_email_notification_once_comment',9);
function send_email_notification_once_comment($commentID){
	$comment = get_comment($commentID);
	global $p2;
	$mentions = $p2->components['mentions']->find_mentions($comment->comment_content);
	$permalink = get_permalink($comment->comment_post_ID);
	$blog_title = get_bloginfo('name');
	foreach ( $mentions as $match ) {
		$email = get_user_by('slug',$match)->user_email;
		$message = "You have been mentioned by {$comment->comment_author} in this comment:\n $permalink \n\n {$comment->comment_content} ";
		wp_mail($email, "[$blog_title] You've been mentioned in a comment by {$comment->comment_author}", $message);
	}
}

Dads and Donuts at Berry Patch

Today I got to take Tyler to Berry Patch for pre-school to attend Dads and Donuts day! Tyler was super excited for Dad to come to school with him. We played with Play-Doh while everyone arrived. We then went in and talked to Fireman Tom from the Edina Fire Department. Tyler was sitting up front and volunteered to come up front and try on a fire fighter suit! He was so excited!

He got to stand in fireman boots:

Put on a fireman jacket!

And a real fireman helmet!

After our talk with Fireman Tom we went out front and got to see a ladder truck up close! Tyler posed with Ms. Anita for a picture in front of the truck.

He even got to drive it!

We finished with a delicious donut with another fire truck on the table!

MediaWiki Template Filter Title

I was recently doing some cleaning on our Read/Write Book Club website and ran into an interesting challenge. All of the books in the wiki are in a couple of categories, but I wanted them sorted right ignoring A, An and The beginning of the title. MediaWiki supports this in the category tag allowing you to specify [Category:Book|Sort Title] and early on in the wiki I had a second field in the form for Sort Title asking the person editing the book to do this.

The result was nobody did it and all the books with “The” in the beginning of the title were all under T. Shouldn’t this be easy to just deal with in the wiki itself?

Well, it turned out to be much harder than you would think in large part because MediaWiki doesn’t honor spaces in template tags. My first attempt to do this was rather brute force, simply look for the three cases that I want to get rid of in the title and chop it off.

<includeonly>
{{#if:{{{1|}}} | {{#vardefine:title_filter_temp|{{{1}}} }}
{{#if: {{#pos:{{#var:title_filter_temp}}|The }} | {{#ifexpr: {{#pos:{{#var:title_filter_temp}}|The }} = 0 | {{#vardefine:title_filter_temp| {{#sub:{{#var:title_filter_temp}}|4}} }} }} }}
{{#if: {{#pos:{{#var:title_filter_temp}}|A }} | {{#ifexpr: {{#pos:{{#var:title_filter_temp}}|A }} = 0 | {{#vardefine:title_filter_temp| {{#sub:{{#var:title_filter_temp}}|2}} }} }} }}
{{#if: {{#pos:{{#var:title_filter_temp}}|An }} | {{#ifexpr: {{#pos:{{#var:title_filter_temp}}|An }} = 0 | {{#vardefine:title_filter_temp| {{#sub:{{#var:title_filter_temp}}|3}} }} }} }}
{{#var:title_filter_temp}}
| No parameter passed to [[Template:Filter title]]. }}</includeonly>

This worked in many cases, but not all. A book like Antifragile got in trouble with this approach since the “An” matched it got sorted in “T”. You would think this would be an easy fix right? Don’t look for “An” but instead for “An “, including the space in the match. Unfortunately it is nearly impossible to pass a space into a MediaWiki template. MediaWiki effectively trims all template inputs of spaces so a space by itself becomes, effectively, null. A different approach was needed.

After some consideration I came up with this approach that uses the Arrays extension. I like it a lot more than the first attempt! The basic idea is to break the title into an array of strings on the space (note that #arraydefine allowed me to use a regex pattern to avoid the problem of not being able to pass in a space). I then check if the first element in that array matches a set of targets (in the #switch statement). If it does, set the index to 1, otherwise 0, and build a new array from that index offset. Like this:

<includeonly>{{
#arraydefine:filter_title_temp|{{{1|No title was provided}}}|/\s/}}{{
#switch: {{#arrayindex:filter_title_temp|0}}
 | A | An | The = {{#vardefine:filter_title_i|1}}
 | #default = {{#vardefine:filter_title_i|0}}
}}{{
#arrayslice: filter_title_new | filter_title_temp | {{#var:filter_title_i}} }}{{
#arrayprint: filter_title_new | _ | @@@@ | @@@@ }}{{
#arrayreset:filter_title_temp|filter_title_new}}</includeonly>

This works great with one exception. I still get confounded with the space problem when assembling the new title in the #arrayprint method. I decided to print the new title with underscores where the spaces were. Since this is used for the sorting condition, this is fine. The end user never sees the title and the wiki will sort right if given Title_of_the_Book.

Now the sortable titles are all generated and the Book Category page looks awesome.

Guest network now openwireless.org

For years I’ve ran a guest WiFi network at home that has been called “Thingelstad Guest”. It makes it super easy for people that are visiting to hop online when they are visiting. I also don’t have to share the key for the “Thingelstad Home” network with people that are visiting which is a plus.

Last night my buddy Ry4an Brase posted on Google+ this EFF Open Wireless project. I’m a proponent of allowing unfettered access to the Internet so I decided to join up and rename our guest network.

Does your router support a guest network? How about doing the same on your network?

New Standards at The Dakota

We returned to The Dakota last night after seeing Robyn Hitchcock the night before for The New Standards.

We’ve seen The New Standards play at the Dakota at least six times before, and every time it’s a treat. Last night we got to enjoy the show with our friends Kent and Marilee celebrating Kent’s birthday! That only made it even better. It was also great to hear that the new album is on the way, and by the sound of it the recording was done and it should be coming relatively soon. They seemed to be really on, playing extra well together and having a lot of fun. It was a great show. You really shouldn’t pass up the opportunity to see them, especially at The Dakota.

Robyn Hitchcock at The Dakota

On Friday night we went to The Dakota to see Robyn Hitchcock. Tammy enjoyed his music a lot in high school and college. I knew of him, but didn’t know his music well. We ended up getting there at 6:40p and realizing the show started at 8:00p so we had plenty of time for dinner and drinks.

Richard Lloyd

Richard Lloyd opened up with a few songs on the guitar. I don’t know his work at all and it seemed like the kind of thing that you liked if you knew him and knew his music, but we didn’t and neither of us were very thrilled with it.

Robyn Hitchcock

Robyn Hitchcock was very good. He was funny in a completely nonsensical way. He went off on these stories that you had no idea where they were going. It was a fun show and he was a very good performer. Neither of us knew the songs very well, but that didn’t dampen the enjoyment at all.

AT&T LTE Spotting

AT&T has announced that they are working to bring LTE to the Twin Cities market by the end of the year. Yesterday while driving by the River Center I saw LTE on my phone for the first time. I loaded a few web pages and it was very fast, pretty much WiFi like experience.