Monday, November 09, 2009
#
If you know of a better place to take-out of the Deep River at US1, I’d appreciate a note here. :) Yesterday, my buddy Blake and I went out on a kayak adventure on the Deep River. “Kayak”, because we took kayaks with us. “Adventure” because it was very loosely planned and we figured if we ran into any trouble we’d just figure it out and deal with it. Turned out we did run into some trouble and we did deal with it! It was a ton of fun!

We knew there was a take-out spot somewhere near the US1 bridge over the Deep River in Chatham County, and we knew there was a put-in spot somewhere near the 15-501 bridge (roughly 7 miles up river). Unfortunately we couldn’t find an obvious take-out spot…there was one place, but it was below a spillway, and neither of us thought it would be fun to kayak over the spillway. :) We ended up driving around searching, but never found a place. Finally we just decided we’d take-out before the spillway and drag the kayaks out the rest of the way (adventure #1). Problem was…we’d spend so much time searching that now it was late enough in the day to worry about darkness. We decided that we could make our way through the woods down the river in the dark with a mini-maglight that Blake had in his car (adventure #2). :)
With a plan in mind, we put in and headed down the river. This section of the Deep River is wide, shallow (hah), slow, and rocky. The river was beautiful, we saw ducks, cool birds, and a river otter that barely escaped our cameras. It was a slow and steady paddle, with a few minor fast parts that were unfortunately slowed by running into underwater rocks we couldn’t see.
Thankfully we got through one really slow-going rocky part just before dark. Because it would have taken us forever to get through there in the complete dark. Whew.
Now its complete dark. We got to the spillway and couldn’t find a place to get out, but we’d met a stranger along the way who mentioned that he thought there was a way to paddle around the spillway. We poked around and saw something, but by this point it was so dark we couldn’t really tell what anything was. The mini-maglight was no good from more than a few feet away. Then we saw someone elses flashlight beam ahead – it was the stranger. They’d found a place to take-out off to the side, but couldn’t paddle around the spillway, unfortunately.
The stranger dragged his kayak out through the woods to a nearby road where he was to be picked up. We decided to walk around the spillway area and get back in the water somehow. We may or may not have gotten into some sort of canal that ran alongside the river. I don’t think we were supposed to be in it, but our options were limited. We made it down to the US1 bridge, but now we needed to cross the river in order to get out! In the dark, we managed to somehow climb out of our kayaks onto the steep bank of the canal, walk through the grass and woods to the river, and drop back into the river. Visibility was about 6 or 7 feet I’d say, which made for a very interesting and spooky paddle adventure. I said I felt like a native American on a night-time war raid, and he said he felt like a marine. We decided we were native American marines, or something like that.
Related links: Deep River Trail – State Trail!
http://www.triangleland.org/news/articles/2007/Powell%20tract.shtml,
http://www.ncparks.gov/News/releases/release.php?id=20
This post is the ninth in a series of postings, containing examples of SharePoint WebParts that anybody can build all by themselves. To read all posts in this series, or to get started with the RSSBus WebPart, go here.
#9 – Microsoft Dynamics CRM
The credit for this particular web part template goes to one of my co-workers Shannon Prue. I asked him if he could put together a MS CRM template example for me, and a few minutes later I had in my inbox a 10 line example template! In the past, integrating MS CRM with SharePoint meant investing a lot of time, dollars, and ending up with a bunch of rigid complexity. Not now. :) This particular example uses Microsoft CRM Services, but that is not a requirement.
Step one is to make sure you have the RSSBus Web Part installed. See here for instructions.
Step two, make sure that you have the MscrmOps Connector installed. Get the service URL for your installation of Microsoft Dynamics CRM (e.g, https://crmserver:5555/mscrmservices/2006/crmservice.asmx) as well as a username and password needed for accessing the service (CRM uses integrated authentication by default, so this will normally be your domain account and password).
Step three, add the RSSBus WebPart to your page, paste the following template into its source editor, edit the serviceurl, username, and password settings to correspond to your own MS CRM instance, and click “Apply”. You’ll see the web part rendered with a list of contacts from MS CRM.
That’s it. If you’ve read the previous 8 DIY articles in this series, you know what' is coming next: Of course, you can customize this template for your own needs. This particular template just renders a grid using the YUI (Yahoo UI) Table. You can do your own html rendering by inserting your own html inside the scope of the <rsb:call>. You can list other CRM entities, like appointments, leads, contracts, etc. In fact, I can change the previous example to list CRM appointments by only changing one line of code. Just replace op=”mscrmContact” with op=”mscrmAppointment”! You can create pie charts of CRM invoices, bar charts of orders, etc, just by changing the operation call (the op= part) and the html formatting of the data that comes back!
See all posts in this series: 10 DIY SharePoint Web Parts.
Browse RSSBus Connectors.
Basic RSSBus Scripting Cheat Sheet.
Technorati Tags: SharePoint, RSSBus, WebPart, Microsoft Dynamics CRM, CRM.
Friday, October 30, 2009
#
This post is the eighth in a series of postings, containing examples of SharePoint WebParts that anybody can build all by themselves. To read all posts in this series, or to get started with the RSSBus WebPart, go here.
#8 – Twitter
Many times since I originally posted about it months ago, I’ve been asked for more details about including Twitter searches and streams inside their SharePoint pages. Thanks to the Twitter API and feeds, this is very simple to do, and to change from showing searches, mentions, direct messages, or other Twitter streams, all you have to do is use a different RSS or Atom feed to start from. Here’s what one of mine looks like:
Step one is to make sure you have the RSSBus Web Part installed. See here for instructions.
Step two, find the RSS or Atom feed URL for the Twitter stream you want to display. For this example, I’ll show Twitter search results for the keywords “SharePoint” , “PowerShell”, and “RSSBus”. You can skip the step if you just want to see it work. When you’re ready to try it with your own search or some other Twitter stream, you’ll need to use your own URL. If you’re unsure how to get this RSS feed, here are instructions:
Twitter Search: just visit search.twitter.com, perform your search, and look for the “Feed for this query” icon on the top right of the page.
Your Public Timeline: just visit your profile and look for the “RSS feed of <username>’s tweets” icon on the right side of the page.
Your Twitter Friends Timeline: just visit your profile and look for the “RSS feed” icon on the bottom right of the page.
Your Twitter Favorites: just visit your favorites page on Twitter and look for the “RSS feed for favorites” icon on the bottom right of the page.
Your Friends Timelines: just visit your friend’s page and look for the “RSS feed of <friendname>’s tweets” icon on the right side of the page.
Advanced Tip: you can make your own custom Twitter feeds out of @replies, direct messages, or combined feeds by using the TwitterOps Connector. With the TwitterOps Connector, you have complete control – you can even send direct messages, send replies, get following and follower lists, or combine two or more of the things into one feed. If you’re curious about this, give it a shot. The easiest way to tinker with TwitterOps before importing it into an actual web part is by using the RSSBus Server Admin Console.
Step three, add the RSSBus WebPart to your page, paste the following template into its source editor, and click “Apply”. You’ll see the web part rendered with the results of the Twitter search results for SharePoint, PowerShell, and RSSBus.
Step four is to customize this template for your own needs. If you’ve clicked “Apply” in the source editor of the web part, you should now see a new property appear in the properties editor of the web part in your browser. Under “Web Part Inputs”, you’ll see a new “SearchPhrase” input. You can put your own search criteria here. If you want to forget the search and just show a stream such as your friends timeline, just replace the following line:
<rsb:call op="http://search.twitter.com/search.rss?q=[[SearchPhrase]]" pagesize="10">
with this:
<rsb:call op=”ENTER_YOUR_URL_HERE” pagesize=”10”>
Note the pagesize=”10” – this tells the web part to only show 10 of the items in the feed. You can change this to whatever value you like, or completely remove it to show all the items.
As always, you can customize the html in the template if you want, or leave it as is.
See all posts in this series: 10 DIY SharePoint Web Parts.
Browse RSSBus Connectors.
Basic RSSBus Scripting Cheat Sheet.
Technorati Tags: SharePoint, RSSBus, WebPart, Twitter
Wednesday, October 21, 2009
#
This post is the seventh in a series of postings, containing examples of SharePoint WebParts that anybody can build all by themselves. To read all posts in this series, or to get started with the RSSBus WebPart, go here.
#7 – Search Email History
One of my good friends here recently asked me to give him an easy way to quickly bring up a list of email correspondence to and from a particular email address over the past 6 months. This way, if he is assisting someone on the telephone or email, he can quickly get up-to-date on what has gone on with this particular person in the recent past. In theory this is easy to do, but doing it in SharePoint would be difficult - well…it used to be. Now you can just copy and paste this template into an RSSBus Web Part and voila. :) Customize to your liking.
Step one is to make sure you have the RSSBus Web Part installed. See here for instructions.
Step two, make sure you have the Imap Connector installed. If you don’t already know the hostname/ip address of your IMAP mail server (e.g. MS Exchange) and a username/password to authenticate to that server, find that information next. This is the same information that you would enter into Outlook when configuring it to connect to your mail server.
Step three, add the RSSBus WebPart to your page, paste the following template into its source editor, and click “Apply”.
Step four is to specify your IMAP server and authentication credentials. If you’ve clicked “Apply” in the source editor of the web part, you should now see a new property appear in the properties editor of the web part in your browser. Under “Web Part Inputs”, you’ll see “server”, “email”, “password”, “mailbox” inputs. These inputs will need to be populated with the values corresponding to your IMAP server, mailbox name (e.g. “Inbox”), and account credentials. Optionally you can change the “months” and “sortcriteria” inputs to alter the output generated. By default, this web part will display messages to/from a specified email address in the past 6 months (the “months” input property) and then sort them by reverse-date (most recent first – the “sortcriteria” input).
After you have set these inputs appropriately, click “Apply” in the properties window and the page will reload. Enter an email address in the search box and click “Search”. The emails sent to or from that email address will be displayed inside the web part! Click on any one of those messages to load a plain text or html view of that email.
As always, you can customize the html in the template if you want, or leave it as is.
Advanced Tip – Note that the “sortcriteria” input expects a sort order formatted according to the IMAP Sort RFC (RFC 5256). Other common sort criteria: ARRIVAL, DATE, CC, FROM, SUBJECT, TO, SIZE. Any of those criteria can be preceeded with REVERSE as I’ve shown in my example. Similarly, the searchcriteria specified inside the template itself can also be modified in the format specified in the IMAPv4 RFC (Section 6.4.4 in RFC 3501).
See all posts in this series: 10 DIY SharePoint Web Parts.
Browse RSSBus Connectors.
Basic RSSBus Scripting Cheat Sheet.
Technorati Tags: SharePoint, RSSBus, WebPart, Exchange, IMAP, Email
Tuesday, October 20, 2009
#
I’ve talked about this before, but it came up again today so I thought I’d do a quick post about it. Here’s a function I use in my PowerShell profile that uses NetCmdlets to send quick “todo” emails:
During the day, when I need to send myself a reminder, I can just say:
PS>todo home “remember to buy apples”
or
PS>todo work "schedule meeting with Mark and his team"
This is always faster than bringing up my email client, composing a new message and clicking send. You’ll notice that my function uses the send-email function from NetCmdlets, but just substitute your own email code if necessary.
Tuesday, September 22, 2009
#
This post is the sixth in a series of postings, containing examples of SharePoint WebParts that anybody can build all by themselves. To read all posts in this series, or to get started with the RSSBus WebPart, go here.
#6 – Shipment Tracking Web Part!
I’ve been holding on to this one for a while. Until recently it was just a FedEx shipment tracker, but now the UPS and USPS Connectors have been published at RSSBus.com so this can be what I wanted it to be. This sample will allow the user to input a tracking number for UPS, USPS, or Fedex, and then display tracking events for that shipment in an easy to read table.
Step one is to make sure you have the RSSBus Web Part installed. See here for instructions.
Step two, make sure you have the UPS, USPS, and/or FedEx Connectors installed. You don’t need them all if you don’t want them all, you only need the ones you want to be able to track packages for. Make sure that you have service credentials for the shipping companies you want to use. UPS, USPS, and Fedex all require user/password/etc in order to reach their package tracking web services.
Step three, add the RSSBus WebPart to your page and paste the following template into its source editor, and click “Apply”.
Step four is to specify your account credentials. If you’ve clicked “Apply” in the source editor of the web part, you should now see a new property appear in the properties editor of the web part in your browser. Under “Web Part Inputs”, you’ll see “ups-accesskey”, “ups-accountnumber”, and several other credential inputs. These inputs will need to be populated with the values corresponding to your web service account credentials obtained from UPS, USPS, and/or FedEx. If you’re not using one or more of these shipping companies, just insert a dummy value or modify the template so that that input is not required.
After you have set these inputs appropriately, click “Apply” in the properties window and the page will reload. Enter a tracking number, select the shipping company, and click “Track”. The tracking events will be displayed inside the web part!
As always, you can customize the html in the template if you want, or leave it as is.
See all posts in this series: 10 DIY SharePoint Web Parts.
Browse RSSBus Connectors.
Basic RSSBus Scripting Cheat Sheet.
Thursday, September 17, 2009
#
- Go to the forum control panel, Templates.
- If want to modify the ForumView, click on it and insert your Adsense code after the very first [BREADCRUMB], ie:
<%@ Register TagPrefix="am" TagName="ForumJump" Src="~/DesktopModules/NTForums/controls/af_forumjump.ascx"%>
<%@ Register TagPrefix="am" TagName="Stats" Src="~/DesktopModules/NTForums/controls/af_stats.ascx"%>
<%@ Register TagPrefix="am" TagName="WhosOnline" Src="~/DesktopModules/NTForums/controls/af_whosonline.ascx"%>
[BREADCRUMB]
<p align="center">
<script type="text/javascript"><!--
google_ad_client = "pub-8897283981585073";
/* RTC-ImgTxtMiddleContent 728x90, created 6/29/09 */
google_ad_slot = "0335233866";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</p>
[GROUPSECTION]
- If you want to modify the TopicView, click on it and insert your Adsense code in a new table row just before the end of the [TOPIC] section, ie:
<tr><td colspan="2" style="border: 1px solid #ccc;text-align:center">
<script type="text/javascript"><!--
google_ad_client = "pub-8897283981585073";
/* RTC-ImgTxtMiddleContent 728x90, created 6/29/09 */
google_ad_slot = "0335233866";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td></tr>
[/TOPIC]
- If you want to modify the TopicsView, you’re on your own. Just follow the above examples.
Note: I did this with ActiveForums v3.7.0.12761.
Here is how to add a “Tweet” button to your ActiveForums threads, using John Resig’s (@jeresig) “Easy Retweet Button”. I added a “Tweet” button to the header of each post, right next to the existing quote/reply buttons.
First, modified the default styling of John’s retweet.js so that the tweet button matches ActiveForums. I modified retweet in the following ways:
- Set the link_text to just “ Tweet”.
- I killed the click count by setting count_type to “none”.
- Completely deleted the “styling:” section at the top of retweet.js.
- Near the bottom of the script, I removed the line of code that adds the title of the page to the content of the tweet (this line: elem.title = document.title). Not doing so results in an ugly tweet text.
- I added a tiny twitter logo to the “Tweet” link text by modifying the setting of elem.innerHTML:
elem.innerHTML = "<span><img align='absMiddle' src='http://www.rat-terrier.com/images/Twitter_16x16.png' border='0'>" + RetweetJS.link_text + "</span>";
Here is the modified retweet.js. Copy your own retweet.js file to your own server and include it in your DNN page by adding the following line to the top of your skins ascx file.:
<script src="http://www.textbox1.com/retweet.js"></script>
Update: Previously I'd suggested adding the above line to the root default.aspx. Stephen Webster of bikeclicks.com corrected me and suggested adding this line to the skin within your DNN portal instead. This keeps the functionality limited to a specific portal (even if it's portal 0) and when you upgrade DNN the next time your changes won't get over-written.
Next, modify the ActiveForums TopicView template to make use of the retweet code (easiest way is to modify TopicView.txt in DesktopModules/NTForums/templates/). Here is an example snippet:
[TOPIC]
<tr>
<td valign=top class="[POSTINFOCSS]" height=100>[POSTINFO]<br>[SPACER:1:125]</td>
<td valign=top class="[POSTREPLYCSS]" width=100%>
<table cellpadding="4" cellspacing="0" border="0" width="100%">
<tr>
<td class="afsubrow"><a name="[POSTID]"></a>[POSTDATE]</td>
<td class="afsubrow" align=right valign=top>[ACTIONS:DELETE]
[ACTIONS:EDIT]
[ACTIONS:QUOTE]
[ACTIONS:REPLY]
<a class='retweet self'>[SUBJECT]</a>
[ACTIONS:ALERT]
</td>
</tr>
Note: I did this with ActiveForums v3.7.0.12761.
- Download and install owc11.
- Run AxImp on OWC11.dll, which will have been installed in the microsoft shared\web components directory (ie C:\Program Files\Common Files\microsoft shared\Web Components\11\). AxImp.exe can be found in the Windows SDK (ie, C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\AxImp.exe).
- In Visual Studio project, drag OWC11.dll to a toolbox tab and drop the Excel component on form.
Voila. When it comes deployment time, you’ll need the AxInterop.OWC11.dll.
Some sample code:
Set a specific cell value:
Spreadsheet1.Cells.get_Item(row, col).set_Value(System.Reflection.Missing.Value, "BSXBW2183NN");
Get the string value of a specific cell:
Spreadsheet1.Cells.get_Item(row, col).get_Value(System.Reflection.Missing.Value).ToString()
or
Spreadsheet1.Cells.get_Item(i, 1).Text.ToString();
Set the background color of a row:
Object ob = "#66FF66";
Spreadsheet1.Rows.get_Item(row, System.Reflection.Missing.Value).Font.set_Color(ref ob);
Technorati Tags:
Excel,
.NET
I was asked to evaluate SlickEdit 2009, so I dropped Ultra-Edit for about three weeks and used only SlickEdit 2009. Here is a little “log” of my thoughts on the switch:
- SE setup asked to add to my system path – I don’t like having to add stuff to my path. What is the benefit of adding this?
[SE Staff:] Many of our customers are heavy keyboard and command line users. Adding SlickEdit to the path allows you to invoke it and its related utilities using the command line.
- The first thing I went to edit was an .htm file. I couldn’t find a way to quickly launch the browser to see the browser view of the document. Ultra-Edit has this and I use it a lot. Later on, I discovered that I can add an “HTML” toolbar, but I wish it would just automatically add that toolbar when I am editing an .htm/.aspx/etc document.
- The next thing I went to edit was a .cs file containing one small class. I loved the way SE showed me a list of all the class members, and when I click a class member it jumps to that spot in the code. I wished it could let me “collapse to definition” like Visual Studio does – and it turns out, it does!
[SE Staff:] Check out View > Function headers. You can also invoke a SlickEdit command to do this. Press ESC to bring up the command line and type in “collapse-to-definitions”. There’s a lot of different ways to collapse text. Look through the items on the View menu plus View > Selective Display. That’s what we call this feature.
- I seemed to recall a slow startup time the last time I tried SlickEdit. There was none of that this time. But, when SE sits unused for a while, and then later I want to drag some files into it…it takes upwards of 4-5 seconds for it to even start responding. I’m not sure what its doing, but the cpu % is at about 5-6 during that time.
- It took me 3 clicks to integrate SE with SVN! Love this feature. At this point I am blaming the slow responsiveness on Vista, and I am thinking I might just be hooked on SE now.
Conclusion:
There are so many features in this editor that it can be hard to find the ones you want (ie, view in browser and the many “selective displays”). Its not as lightweight as UltraEdit, but has many more features than Ultra-Edit. It is a much more functional and powerful editor, but one that requires some system resources.