Chris Hammond

DotNetNuke Upgrade and Consulting specialist

News

Thanks for visiting my blog, you can find more about me at ChrisHammond.com. I specialize in all things DotNetNuke

Cool Sites

My domains

Projects

Archives

May 2012 - Posts

Adding a website link to the Member Directory in DotNetNuke 6.2

In case you missed it, DotNetNuke 6.2 was released today, check out Will Morgenweck’s blog post for more details on the release.

With some of the new features DotNetNuke 6.2 makes it easier to start to customize the listing of members on your site, and also the Profile display for users on the website. I started implementing DotNetNuke 6.2 on one of my racing websites last night (yeah, so I upgraded before the release happened, a benefit of working for the corp Winking smile).

In doing so I configured the profile pages on the website to use some of the new 6.2 functionality, before I show you the code, here’s a link to my profile over there, so you can see what all I implemented. This is far from complete, plenty of more work to be done, but it provides far more information than the profiles did two days ago.

http://www.sccaforums.com/user-profile/userid/37959

Now for the code itself. This code gets included in the ViewProfile module as the profile template, this was what I put in last night.

<div class="pBio">
    <h3 data-bind="text: AboutMeText"></h3>
    <p data-bind="html: Biography"></p>
</div>
<div class="pAddress">
    <h3 data-bind="text: LocationText"></h3>
    <p>    <span data-bind="text: Location()"></span><span 
data-bind="visible: Location().length > 0"><br/></span> <span data-bind="text: Country()"></span><span data-bind="visible: Country().length > 0"><br/></span> </p> </div> <div class="pContact"> <h3 data-bind="text: GetInTouchText"></h3> <ul> <li data-bind="visible: Website().length > 0"><strong><span
data-bind="text: WebsiteText">:</strong> <span data-bind="text: Website()"></li> </ul> </div> <div class="dnnClear"></div>

That will show some basic information for a user’s profile. One thing I wanted to do was to make the Website option an actual hyperlink, as you can see in that display it isn’t right now. To do so is fairly straight forward, in place of that line, we would use the following code

<li data-bind="visible: Website().length > 0"><strong><span 
data-bind="text: WebsiteText">:</strong> <a href="" title="" class="profWebsite"
data-bind="attr: { title: Website(), href: Website() }" rel="nofollow" target="_blank">
<span data-bind="text: Website()"></span></a></li>

Basically we’re using Knockout.js to bind the Website information from the User’s Profile, to
the hyperlink, for both the href and title value, then spitting out the Website attribute as the text of the hyperlink as well. For SEO purposes I put a rel=”nofollow” in there to prevent search engines from giving the profile links any weight, you could always change that if you wish.

In addition to that information, I always wanted to enable a “send me an email” link, that pointed to the new Messaging Center in DNN 6.2. That wasn’t quite as easy as adding the Hyperlink to the Profile page, but it was pretty straightforward (to be honest I just ripped off the code from the Default “template” in DotNetNuke 6.2, but that is the beauty of open source. To add the Message link, as well as a “Friend” and “Follow” link I used the following code

<div data-bind="visible: !IsUser() && IsAuthenticated">
    <ul>
        <li><a href="" title="" class="ComposeMessage"><span data-bind="text: SendMessageText">
        </span></a></li>
        <li><span><a href="" data-bind="click: addFriend, visible: FriendStatus() == 0"><span
            data-bind="text: AddFriendText"></span></a><span
data-bind="click: addFriend, visible: IsPending()"> <span data-bind="text: FriendPendingText"></span></span><a href=""
data-bind="click: acceptFriend, visible: HasPendingRequest()"> <span data-bind="text: AcceptFriendText"></span></a><a href=""
data-bind="click: removeFriend, visible: IsFriend()"> <span data-bind="text: RemoveFriendText"></span></a></span></li> <li><span><a href="" data-bind="click: follow, visible: !IsFollowing()"><span
data-bind="text: FollowText"> </span></a><a href="" data-bind="click: unFollow, visible: IsFollowing()"><span
data-bind="text: UnFollowText"> </span></a></span></li> </ul> </div>

But I didn’t add it to the ViewProfile module. Instead you need to place the Member Directory module on a page, set the above code as the Item and Alternate Item template.

You can see the Member Directory module in action in this “Using the Member Directory in DotNetNuke 6.2” video.

Building a Netduino Tank
Originally posted on ChrisHammond.com The @Netduino tank is finally ready for @makerfaire

It was About 8 or 9 months ago that I posted my first video using my Netduino powering a Tamiya Tracked Vehicle Chassis Kit. After that I actually did a little more work on the project, but I never posted any video or updates for the project itself.

Last week I was asked if I still had the project, and would be able to bring it to the Maker Faire. I thought, sure thing! So I got to work making it actually do something a bit more than going in a very long slowly arcing circle.

V1.5 (if you consider the video linked above v1) actually had a piece of plexiglass as a base, sitting on some standoffs up off the wooden base of the Tamiya kit. But it was my first time working with PG and I ran into a couple of issues, I drilled holes and they weren’t right, so I drilled some more, and they still weren’t right, the "rectangle” was off center on the vehicle itself, and I never even got around to taking the protective coating off the plexiglass. I did mount a GoPro camera on it, using zip ties, and drove it around the office scaring the pets, but never published that video, or even took pictures of the setup.

Thursday evening I decided I would try to take the motorshield I was using and make it work with the Netduino Go. Unfortunately due to a bug with PWM in .NET MF 4.2 qfe1 (or whatever is currently release) I was unable to get the Go working, so I wasted a full evening of time.

Friday evening I got to work getting the original Netduino going again, along with the motorshield, and a new piece of plexiglass. The end result was the photo seen above, a cell phone picture taken at something like 2 in the morning Saturday before Maker Faire, so I apologize for that :D

I ended up doing a little bit of coding, on the project (all sample code is hosted on Codeplex, at the time of this blog it is using Changeset 67198 (motor test project). I didn’t add a bunch of logic to the code, it basically has 4 programs, one that spins, goes, and repeats. Another that just spins. Another that goes forward then backward, and finally one that doesn’t do anything (stop). You can trigger through the programs using a button that was wired into the breadboard. Not the ideal setup, as the button was hard to get to while it was moving, but it was 2am and I just wanted to finish.

I made the programs fairly short because I figured that the area where it would be displayed wouldn’t be very big, unfortunately even with the short programs there wasn’t any way to safely have it running during the Maker Faire, so it for the most part remained unplugged the entire weekend. But it looked cool!

Speaking of looks, I took another piece of black plexiglass and cut it, shaped it on the belt sander, and then took the drill press to it to create holes for the standoff mounts, and somewhere to mount the Netduino/Shield to.

I also stuck an old (think original AAA battery powered, pre HD/960) GoPro camera to the front, this was all for show at this point, there was no chance I was going to get it wired up, and I really just needed the weight up there to keep the nose down. The back end was rather heavy due to the two battery packs, one for the Netduino one for the Motorshield, and it wanted to ride a wheelie without the camera up front.

Update (before I even posted the original blog) I stuck the GoPro 3D Case and two cameras up front to shoot some video and photos, you can see them below. This setup weighed the front end down heavily, and also, on a rough surface (bricks outside) started to cause problems for the tracks, I haven’t tried to figure out why yet, but they were coming off pretty regularly.

Here’s some video of the Netduino Tank in action, though I promise you it isn’t all that fancy yet Open-mouthed smile

and then of course 3D Video of what it sees (you’ll want to wear red/blue glasses for this one, or turn off 3D on youtube)

Photo Gallery

Parts List (quantity)

  1. Tamiya Tracked Vehicle Chassis Kit $20 (1)
  2. 9V Battery Case (1)
  3. AA Battery Case 4-AA (1)
  4. Plexiglass platform
  5. Long screws (4)
  6. Nuts, for above. (4)
  7. Aluminum spacers, mounted between base and platform (4)
  8. Small breadboard (1)
  9. Heat shrink
  10. Solid core wire
  11. Plexiglass Sheet

What’s Next?

1) I would like to add some sensors to it so that it can move around on its own a bit, and know when it should turn around.

2) I’d like to get the Wi-Fi-bac for the GoPro Hero 2 setup, whenever it comes out (this summer) and mount a Hero2 up front so I can stream video using the camera. This wouldn’t actually wire into the Netduino in any way, but I can imagine putting the GoPro on a servo system so that the Netduino could at least “point” the camera, at what, I don’t know yet.

3) It needs either a remote control (DotNetNuke module) and Wifi access or some other wireless access to the tank and send commands.

Netduino at the Bay Area Maker Faire

If you are in the San Francisco Bay Area, or even feel like making a quick weekend tripI highly recommend checking out the Maker Faire this weekend in San Mateo, CA (www.makerfaire.com). I’ve posted a write up of some of my suggestions on what to bring to the Maker Faire over on my personal site, check that out if you are going to go.

Netduino on site

Chris Walker from Secret Labs, creators of the Netduino open source hardware project, will be at the Faire presenting two sessions on the Make: Projects Stage, one on Saturday from 1:00pm-1:30pm, and then again the same time/location on Sunday. He can also be found in the MakerShed through the day on both days doing demos of some Netduino projects, and helping to answer any Netduino related questions.

Personally I will be wandering around Maker Faire both days, hopefully doing another time lapse of the event (like last year) and spreading the word about Netduino. I don’t work for Secret Labs, I just love playing around with the project and supporting open source. I’ve got a couple of Netduino GO! T-shirts that I’ll have with me, if you’re interested in one just find me and bring $10 to cover the production costs. The front has the GObus logo on it, with a simple “netduino” on the back.

From May 16, 2012

Check out the full schedule of events on the Schedule over on MakerFaire.com.

Come speak at DNN World 2012 in Orlando, FL

We’re in full swing for planning and preparations for DNN World 2012 this October in Orlando Florida. Our call for speakers is open for a couple of more days (5/5 I believe).

The conference is 10/11-12 with pre-conference training on 10/10. More details about the conference will be made available soon, along with opening registration.

If you want to present some sessions at the conference, you will likely (not completely official yet) get a free pass to the conference, as well as a couple of nights of your hotel covered. We are still working out the final details on what speakers get.

Not sure what to present on? Anything DNN related. That pretty much opens you up to just about anything, so get to it.

Here’s Joe’s blog post going into more detail about the call for speakers.

If you are ready to submit sessions head over the Call For Speakers page.

See you in Orlando!

More Posts