Latest Tweets

Find Posts by Tag
Twitter

Entries in site-update (12)

Friday
Dec282007

SlideShow now actually works

I set up the SlideShow in my gallery a few weeks ago, and then I went away for Christmas to visit family in the UK. I just got back and had a chance to get it to work on machines other than my own. Doh!

Click to read more ...

Friday
Dec142007

Silverlight-based Slide.Show powering the galleries now

UPDATE: After switching to Graffiti, I don't have this anymore. Will come up with something else soon.

Earlier today I saw Nikhil Kothari had implemented a cool slide show on his site. It was exactly what I was looking for. Unfortunately I spent the last 8 hours trying to figure out how to implement it. Some of that time was wasted on a stupid error...grrr....a few more hours on getting it to work on CS. Anyway, check out the galleries and let me know what you think. I will write up a post on how I implemented it in the next couple of days. I also have to solve the wierd 4001 error thats coming up...oh and post some photos...

Click to read more ...

Tuesday
Dec112007

A new theme in the works...posted now

So I am updating the theme on this site. Its not done, but there are already a lot of changes I am pretty excited about. Its still not perfect, but I have a bit of time on my hands right now.

Whats working and is pretty cool:

  • Current Twitter Status - ok that was there before
  • Upcoming Travel from 30Boxes - Its grabbing my future travel schedule from 30B. When a date goes past, it will no longer show up on the page...automatically
  • Recent Del.icio.us Tags - Its grabbing the last 5 or 6 days worth of links I have tagged.
  • Captaris Developer Program Posts - I also occasionally post to the Captaris Developer Program. This is a list of all of those posts. As with the above items, this is dynamic.
  • Blog Flare - Took a while to figure this out. Each post can be added to Digg, Facebook, Technorati....ok, they won't, but they could.
  • Full vs Excerpts - The most recent 3 posts are the full post. Then there are a bunch more that are just excerpts.
  • Cool icons from FamFamFam: Silk
  • Simile Timeline - This is one of the coolest new features. Rather than a traditional calendar of previous items, I am now showing an interactive timeline of all blog posts here.

Click to read more ...

Monday
Aug062007

Community Server 2007 Theme

A few months ago, Community Server 2007 was released. I updated for one main reason, a new theming engine called Chameleon. I was determined to come up with a new theme that WASN'T the paperclip or the CS tree that is on everyone else's site. So I started from scratch to design something amazing. Unfortunately I discovered that it was a helluva tough to do it all from scratch. So I ended up with a theme that was pretty lame. When the Telligent guys announced they were doing a theme contest, I wanted in and planned to do something great, but didn't quite get to it. The deadline came and went and I had nothing. But then they extended the deadline. Whew! But then it came again....I noticed on the day that the time was up. Thankfully I am in Amsterdam and the 9AM CST end time was several hours away. I took the new Basic theme as a starting point and within a couple of hours, I felt I had something pretty cool. So I submitted it. I figured I would be one of a few dozen, but there were only 6 submissions. But it was so easy?!?! Whats up with that??? Anyway, go check out the themes and vote. Mine is obviously TVBrown. I screwed up a bit with the way IE shows the theme so I am going to update that soon (looks better in Firefox).

Click to read more ...

Monday
Aug062007

Update to my TwitterBadge for Community Server 2007

A few weeks ago when I updated this site to Community Server 2007, I also updated the theme. That theme kinda sucked, but I learned a lot about how to design a CS theme using the new theming engine, Chameleon. One of the additions I made to the theme was a Twitter badge that shows what I am up to all the time (assuming I actually update my Twitter status. Unfortunately it sometimes didn't work. When I saw there was a problem, I didn't have any time to figure out why, so I just removed it. This weekend I updated the theme again. And I got a chance to see what was going on with the Twitter badge. Doh!!! Its was so easy to fix...one single line. Near the beginning I checked to see if a particular string was null. What I should have done was check if it was null or empty. I have fixed it in the original post.

Click to read more ...

Monday
Jun182007

Is the Feedburner Feed an Improvement?

This is a question for those of you subscribing to the rss feed. As you may have seen I recently switched over to using FeedBurner. Is this an improvement? Is there anything you have seen in other FeedBurner feeds that isn't in this one but should be? I look forward to hearing any of your comments.

Click to read more ...

Sunday
Jun172007

How To: Add a Caching Twitter Badge to CS2007

A few months ago I started playing around with Twitter. In case you are not familiar with it, Twitter is a blog of short messages. Think about all the times you want to say something, or tell people where you are, but you don't think the idea warrants an entire blog post. Those are the times you use Twitter. People can subscribe to your Twitter status and get those updates where ever they are. They can get them via IM, or SMS, or some 3rd party applications. Since I live in Europe, I subscribe to a few people's status via SMS (SMS in Europe is cheap, unlike the US where no one uses it since it is so expensive).

When I was thinking about what I wanted on this website, I thought some sort of Twitter status update would be cool. Not an entire history, just the latest item. If you go to Twitter's badge page, you can see a number of options for grabbing your current Twitter status. I tried the Javascript one first. It seemed to work, but I was annoyed at the fact that it polled Twitter on every refresh. Chances are I am not going to update my Twitter status that often, so I want to cache the information locally. But I don't want to cache the entire block of text, because the time since I made the update will change as time goes by. So I wanted to cache just the text and the time I made the update.

First I check the CSCache for my Twitter information:

string TwitterText = CSCache.Get("TwitterText") as string;
string TwitterTime = CSCache.Get("TwitterTime") as string;

If TwitterTime is null, then I grab the latest one status item from Twitter:

string TwitterPath = 
"http://www.twitter.com/statuses/usertimeline/2449901.xml?count=1";
WebClient webClient = new WebClient();
string TwitterXML = Encoding.ASCII.GetString(wClient.DownloadData(TwitterPath));

Once I have the TwitterXML string, I can parse it to get my text and time and I add that to the cache. From there I just converted the Javascript relative time code from Twitter's code to C#. Here is the full TwitterStatus.ascx:

<%@ Import namespace="System.Xml.XPath"%>
<%@ Import namespace="System.Net"%>
<%@ Import namespace="CommunityServer.Components"%>
<%@ Control Language="C#" ClassName="TwitterStatus" %>
<script runat=server language="C#">

protected int cacheTime;
public int CacheTime
{
get
{
return cacheTime;
}
set
{
cacheTime = value;
}
}
protected override void OnInit(EventArgs e)
{
string TwitterPath =
"http://www.twitter.com/statuses/user
timeline/2449901.xml?count=1";
string TwitterText = CSCache.Get(
"TwitterText") as string;
string TwitterTime = CSCache.Get(
"TwitterTime") as string;
string TwitterString =
"";

if (string.IsNullOrEmpty(TwitterTime))
{
string returnXML =
"";
WebClient wClient = new WebClient();
returnXML = Encoding.ASCII.GetString(wClient.DownloadData(TwitterPath));

XPathDocument doc = new XPathDocument(new System.IO.StringReader(returnXML));
XPathNavigator nav = doc.CreateNavigator();

//Get Twitter Time
XPathNodeIterator nodes = nav.Select(@
"/statuses/status/createdat");
nodes.MoveNext();
TwitterTime = nodes.Current.Value;
//Get Twitter Text
nodes = nav.Select(@
"/statuses/status/text");
nodes.MoveNext();
TwitterText = nodes.Current.Value;
string[] TimeValues = TwitterTime.Split(' ');
TwitterTime = TimeValues[1] +
" " + TimeValues[2]
+ " " + TimeValues[5] + " " + TimeValues[3] + " GMT";

CSCache.Insert(
"TwitterText",TwitterText, cacheTime);
CSCache.Insert(
"TwitterTime", TwitterTime, cacheTime);
}

DateTime twDate = Convert.ToDateTime(TwitterTime);

int secondsago = Convert.ToInt32(DateTime.Now.Subtract(twDate).TotalSeconds);
if (secondsago < 60)
TwitterString = "less than a minute ago";
else if (secondsago < 120)
TwitterString = "about a minute ago";
else if (secondsago < (45 * 60))
TwitterString = (secondsago / 60).ToString() + " minutes ago";
else if (secondsago < (90 * 60))
TwitterString = "about an hour ago";
else if (secondsago < (24 * 60 * 60))
TwitterString = "about " + (secondsago / 3600).ToString() + " hours ago";
else if (secondsago < (48 * 60 * 60))
TwitterString = "1 day ago";
else
TwitterString = (secondsago / 86400).ToString() +
" days ago";

TwitterTextLiteral.Text = TwitterText;
TwitterSinceLiteral.Text = TwitterString;

base.OnInit(e);
}

</script>

<div id=TwitterStatus>
According to <a href="http://twitter.com/Technovangelist" target=
blank>Twitter</a>
I am: <asp:Literal ID=TwitterTextLiteral runat=server></asp:Literal> as of
<asp:Literal ID=TwitterSinceLiteral runat=server></asp:Literal>
</div>

To use this I add the following at the top of my aspx page:

<%@ Register TagPrefix=MW TagName=TwitterStatus src="~/Themes/BW/Common/TwitterStatus.ascx" %>

And then add this where I want the TwitterStatus to go:

<MW:TwitterStatus runat=server CacheTime=300 />
This seems to be working for me for now. Let me know if you end up using it on your site. Or if you have any suggestions on improving this, I would love to hear that too.

Click to read more ...

Saturday
Jun162007

How To: Add Blog Posts to the CSCache with CS2007

After adding my new CS2007 theme, I wanted to take advantage of caching for my home page. There was some sample code in the default theme, but it wasn't exactly what I needed:

protected override void OnInit(EventArgs e)
{
List recentPosts = CSCache.Get("HomePageSearch-"
+ CurrentCSContext.User.RoleKey) as List;
if (recentPosts == null)
{
SearchQuery query = new SearchQuery();
query.StartDate = DateTime.Now.AddDays(-10);
query.EndDate = DateTime.Now.AddDays(1);
query.PageSize = 5;

recentPosts = CSSearch.Search(query).Posts;
CSCache.Insert("HomePageSearch-"
+ CurrentCSContext.User.RoleKey, recentPosts, CSCache.MinuteFactor * 5);
}
RecentPostList.DataSource = recentPosts;

base.OnInit(e);
}

This does a query for all additions to the site in the last 10 days, including images, comments, etc. But I wanted just blog entries. Looking around on the web, I found a discussion on this in the CS Forums. Using this as guide, I got exactly what I needed:

protected override void OnInit(EventArgs e)
{
int NumberOfBlogPosts = 3;
List recentPosts = CSCache.Get("HomePageBlog-"
+ CurrentCSContext.User.RoleKey) as List;

if (recentPosts == null)
{
List FilteredPosts = new List();
SearchQuery query = new SearchQuery();
query.PageSize = 20;
query.ApplicationTypes = new ApplicationType[] { ApplicationType.Weblog };
recentPosts = CSSearch.Search(query).Posts;

int PostNumber = 0;
foreach (IndexPost post in recentPosts)
if (PostNumber < NumberOfBlogPosts)
if (!post.Title.StartsWith("re:", true, null))
{
FilteredPosts.Add(post);
PostNumber++;
}


CSCache.Insert("HomePageBlog-"
+ CurrentCSContext.User.RoleKey, FilteredPosts, 300);
recentPosts = FilteredPosts;
}
RecentPostList.DataSource = recentPosts;
base.OnInit(e);
}

This finds 20 weblog posts, filters out everything that starts with "Re:", adds it to the cache, and uses it as a datasource for the blogpost list.

Click to read more ...

Saturday
Jun162007

Implementing a New CS2007 Theme

A few months ago, the amazing folks at Telligent updated their Community Server product to Community Server 2007. I updated this site to CS2007 a few weeks back and around that time I decided I should get rid of the standard paperclip theme and write my own. And of course, because I enjoy inflicting excess pain onto myself, I started from scratch. There is a lot that can be done with CS2007 and I know that even more now that I am going through this exercise. I have started using the new theme live on this site, but I am far from finished. Many of the features are working, but not looking great.

Well, the upside is that I have one more topic now to blog about. The documentation for creating themes (most of it seems to be written by Ben Tiedt)

Click to read more ...

Thursday
May032007

Transitioning the Blogs

As a reader of this blog, you know there are three things that I care about and write about: Travel, Gadgets, and Captaris. But most of you are interested in only one of those topics. Well, at the recent Captaris International Partner Conference I was invited to start blogging on the Captaris Developer Portal and saw this as a chance to move one of the audiences to a place that is more relevant to them. So starting now all posts about Captaris Workflow, Rightfax, and Alchemy will be posted on my new blog at the Captaris Developer Portal. On the site I am TrainerMatt and my blog is: http://www.captaris.com/DeveloperProgram/blogs/trainermatt_blog/default.aspx

Click to read more ...