Posts tagged with 'graffiti'


Conditionally loading MathJax with GraffitiCMS

A couple of years ago I did a series of posts about TVM, the Time Value of Money ( 1 , 2 , 3 ). Because they were mathematical in nature, I had to write a few math expressions and equations. Way back when I’d have written them out in the Equation Editor in Word, and taken screenshots, but this time I decided to go for a browser-based solution: MathJax . In essence, I’d write the expressions in LaTeX format, such as x = \frac {-b \pm \sqrt{b^2 - 4ac}} {2a} , and have it rendered as: \[ x = \frac ...

READ MORE

Blog issues. Or GraffitiCMS issues. Or GoDaddy issues.

Apologies to all if you saw a whole bunch of posts appearing and disappearing in the past hour. I’m having – all of a sudden – extreme problems with publishing a blog post from Windows Live Writer to this blog, which is hosted on GoDaddy. This first happened on November 5, but I thought it was a transient issue and ignored it. And then over the weekend I wrote the “adding parentheses” post but it would not publish, no matter what. I finally published it just now with...

READ MORE

Adding sharing links to the blog–JavaScript edition

The story so far : in essence I’ve added AddThis and Google +1 support to this blog using their “simple” markup. Unfortunately, the simple way breaks XHTML validation using the W3C validator because of the non-standard attributes ( addthis:url , addthis:title ) and elements ( g:plusone ). As I said previously, time to break out the JavaScript. Let’s do this in reverse order, starting with the +1 button. The reason for doing it this way round is that Google’s documentation was easier to follow, and...

READ MORE

Adding sharing links to the blog

Up to now, I’ve used an old plug-in to GraffitiCMS to serve up a set of sharing buttons on this blog. Old as in the code used to have (until I took it out) a link for Furl – remember that? No, I don’t either. photo © 2006 MyEyeSees | more info Prompted by a blog post by Nick Hodges , I signed up to AddThis and have now added their sharing toolbar to my posts. It wasn’t quite as simple as it made out though. I have two main type of pages where I want the sharing toolbar to appear: the index page and...

READ MORE

Implementing MarkDown for comments

I haven’t been too happy about the facilities for commenting in GraffitiCMS ever since I started using it. Great for minor feedback, but awful for pasting code when crafting an implementation detail as an example. Since StackOverflow uses MarkDown for its comments and I’ve grown used to that, I decided to experiment adding it to my blog here as well. photo © 2006 David Boyle | more info (via: Wylio ) Problem number 1 : finding a JavaScript implementation of a MarkDown parser. As Jeff Atwood found...

READ MORE

Adding support for iPhone with GraffitiCMS

This blog uses GraffitiCMS as the blogging engine. This software has now been open-sourced by the original developers, Telligent, and is available on CodePlex . Although it’s pretty full-featured and does most of what I want and need from a blogging engine (and has lots of features I don’t use) there is no built-in support as yet for providing a special view for mobile devices. Consequently, when you view the site on an iPhone, say (since this is what I use as a mobile phone), it displays the wide...

READ MORE

Bug with comments and GraffitiCMS

One bug with Graffiti that's been driving me nuts ever since I started using the app over a year ago is that it assumes that a commenter will naturally add the http:// to the beginning of their website name. If they don't, the code that displays the comment later will force the URL to be absolute (essentially by prepending the Graffiti application's base URL to the name). Of course that link is then nonsense and leads to a 404 if someone clicks on it later. Since I use Scott Cate's 404 manager ,...

READ MORE

Open source GraffitiCMS and IIS6

Color me stupid, but then again I was under some emotional pressure at the time. The open source version of GraffitiCMS has some changes in it compared to the final official commercial release. Well, duh, I suppose; and of course I'd mentioned some of them in my previous blog post on the subject. There's another change, one that bit me good and proper. My old friend Scott Bussinger alerted me to it pretty much straight away, but I wasn't able to properly diagnose the issue without internet access...

READ MORE

Converting to the open source GraffitiCMS

Once GraffitiCMS had been posted as open source, I downloaded it with the intent of upgrading this site to it. There wasn't much news on the Graffiti CodePlex page about what had changed since the latest official release (1.2). In particular, no news whether any of the proposed plans from the beginning of the year had been implemented, partially or not. Since I wanted to fix certain problems with the product, I had to first make sure that my site worked with the released open source version. After...

READ MORE

GraffitiCMS has been released as Open Source

It's finally happened. After almost a year of no progress on GraffitiCMS, the blogging engine I use for this site, it's now available as open source on CodePlex , using a Microsoft Reciprocal License (Ms-RL). Go get it! Now playing: Yello - Distant Solution (from The Eye )...

READ MORE

Converting GraffitiCMS from VistaDB to SQL Server on GoDaddy

Is that SEO-specific enough, do you think? Heh. Anyway, here's the situation. I started this blog using GraffitiCMS about a year ago, previously having used static web pages created with CityDesk . All my sites are hosted on GoDaddy : I went with a Deluxe hosting option which means I can host pretty much as many sites as I want to in the same single folder tree. At the time — can't remember why — I decided to stick with the default VistaDB as the database instead of opting to...

READ MORE

GraffitiCMS to be released as open source

Scott Watermasysk of Telligent has just announced on Twitter that GraffitiCMS (the CMS engine behind this blog) is going to be released as open source on December 11: A few initial thoughts: First: thank goodness they've decided to do something with the product. I would have preferred, perhaps, that they added new features and functionality and brought out a new "closed" version, but this is a good second best. I wonder if they'll be using codeplex for publishing it. Second: I wonder if...

READ MORE

Fixing site problems

Bang in the middle of my trip to Los Angeles for PDC, on 15th November, this GraffitiCMS site you are reading ( http://blog.boyet.com/ ) went down. Hard. It seemed to happen just after my last post as well. I added a "site under repair" default.html file to the root directory while I investigated (it would be picked up first if no filename is entered in a browser address bar). I had absolutely no idea what was wrong. I couldn't log into the site (indeed, the main page didn't even...

READ MORE

Printer CSS - call to action

Ned Batchelder is a tech blogger I like to read, although he tends to deal with languages and situations I don't. Nevertheless he comes up with some great insights that have applicability to what I do and some great topics that extend what I know. In a recent post , he brought to his readers' attention that good websites should have a proper printer CSS stylesheet, so that their content not only gets rendered well on the screen, but also on paper. Paper being paper, there's no point in rendering...

READ MORE

Archive Calendar for GraffitiCMS now resets stats

After a while of using my archive calendar, the statistics for page views were starting to get really skewed in favor of the archive "post". It finally got to the point where the graph that's displayed under the Reporting tab in the Graffiti control panel had a line for archive that was 5 times longer than the nearest "real" post. Since the information about the number of people using the archive system is not that interesting to me, it was time to do something about it. A bit...

READ MORE

Archive Calendar for GraffitiCMS released

Well that didn't take too long. Just enough time to open up an account at CodePlex, start a new project, point TortoiseSVN at it, and upload. The biggest time sink was actually the readme file and deciding on the license (I went for the MIT license ). I've now published the Archive Calendar for GraffitiCMS on CodePlex . You can get it here . If you want the source code, you can download it from the project's repository. Now playing: Matt Bianco - Wap Bam Boogie (from Indigo )...

READ MORE

Making the Calendar into a Graffiti CMS Widget

Last time I kind of trailed off. The Archive Calendar was working fine as a Chalk extension and I had a business trip to make for a week and doing the work to change it into a widget wasn't at the top of my list. Earlier this week, though, back safely in Colorado Springs, I spent a couple of hours extracting it all out as a joint widget/Chalk extension assembly, all ready for posting on CodePlex. Since this is the first widget I'd written, and since the official help page is a little, er...

READ MORE

Writing an Archive Calendar, part 4b

Man, paging — the second bug I'd reported to myself in part 4 — was long-winded, mainly because I was trying to use the built-in paging system and spent far too much time tracing through Graffiti code in Reflector. In the end, I abandoned that line of attack, mainly because I think I'd been gaming GraffitiCMS by creating a "post" called archive, when it was really a list of posts, and the auto-generated default.aspx was all wrong for that purpose. Further investigation will wait for a rainy...

READ MORE

Writing an Archive Calendar, part 4a

OK the first bug I reported to myself in the previous post was trivial to fix. I changed the PostReader class to add a couple of new methods GetFilteredPostsForMonth() : public static PostCollection GetFilteredPostsForMonth( int year, int month) { return GetFilteredPostsForDate(year, month, 0 ); } and GetFilteredPostsForDate() : public static PostCollection GetFilteredPostsForDate( int year, int month, int day) { PostCollection posts = GetPostsForDate(year, month, day); PostCollection filteredPosts...

READ MORE

Writing an Archive Calendar, part 4

Not much more to discuss for phase 1 of the Archive Calendar since we've covered the code. This post is a kind of wrap up (although it does contain a couple of warnings at the end) and we'll talk about what you have to do in order for the calendar to actually work and display the archived posts. First up: to display the calendar on the home page just enter this into your layout.view file (or the home.layout.view ), essentially in one of the sidebars. $JmbChalk.ShowCalendar() and the calendar will...

READ MORE

Writing an Archive Calendar, part 3

We're now at the coding climax of this series, writing the code that will actually render the calendar you see on the right. I started off with a new class, the GraffitiCalendar (the previous calendar class, HtmlCalendar , merely rendered a read-only calendar as a standard HTML table). GraffitiCalendar is responsible for instantiating an HtmlCalendar , wiring up its two delegate properties — those responsible for generating the <a> links — and then letting it rip to produce the full "live"...

READ MORE

Writing an Archive Calendar, part 2

Next up in this series on writing the calendar of archived posts, is the PostsReader class. This class queries the database for the posts for a particular month or a particular day. It utilizes a couple of other helper classes that manage the caching of results, so we'll look at these first. The first helper class is the PostCollectionSet . This is a set of already-computed collections of posts and is the granularity with which post collections are stored in the application cache. The set is declared...

READ MORE

Writing an Archive Calendar, part 1

It's time to reveal all about that Archive Calendar I've been developing that now adorns my site. It's not quite done yet, but by the time I'll have it finished, this series of articles on how to write it will be too. The first thing I did, before I got all embroiled in how to create a query and execute it to get a list of posts, and so on, was to make sure I knew how to create the calendar display. It's a basic HTML table, with a particular id, and the actual look and feel is provided by CSS. We...

READ MORE

Archive Calendar now caches post collections

A minor fix, this. The Archive Calendar on the right over there now has support for caching monthly and daily post collections so that the potentially expensive query plus retrieval from the database doesn't happen every time. In essence, since everyone who visits the home page for this blog will generate the current month's calendar, the collection of posts for January will remain in the cache, ensuring rapid access for everyone. Nevertheless, just in case, the cache has an expiration of...

READ MORE

GraffitiClient API: calling GraffitiCMS from a program

I have a whole set of posts on my static website that I'd like to transfer over to my Graffiti CMS site, leaving behind a redirect link. Since I was using CityDesk from Fog Creek to blog before, there's no migration tool available. Hey, no problem, I'm a developer at heart so it's just a simple case of opening up a a couple of databases, writing a conversion routine, and Bob's your uncle. Even better, Graffiti exposes a web service that I can call. I only need to open ONE database, and the conversion...

READ MORE

New Archive Calendar

This afternoon, for want of anything better to do with the freezing cold outside and the housework inside, I wrote an archive calendar chalk extension for the website. It's over there on the far sidebar. At present, it's a chalk extension and not a widget, although a widget should probably make more sense, given that it's in one of the Graffiti sidebars. However, for this first iteration I wanted to make a monthly calendar with links for those days when I'd published posts. User stories...

READ MORE

Twitter notification broken with Graffiti 1.2?

Nope, but, boy, was it a coincidence! I use Scott Watermasysk's Graffiti Plug-in library to add Twitter notifications when I add new posts to this blog. Well, the weekend before last, I upgraded to Graffiti CMS 1.2 and blogged about it. The plug-in duly tweeted it. No problem. The next post I made, on 23-Dec about Dell XPS support , wasn't. I eventually noticed, and wrote a fake manual tweet, resolving to work out what the issue was. Ditto for the next few blogs — it seems my resolutions don...

READ MORE

Avatars configured for comments

A minor but quick change: I've included the ability for comments to show an avatar. Essentially sign up at gravatar.com , upload an image that "represents" you, and it'll then appear here if you comment. For the Graffiti freaks out there, here's the line of code in my comments.view file (this is a file loaded by my post.view file that displays all the comments, plus the add-a-comment form): $macros.gravatar($comment.Email, $comment.Username, $comment.IPAddress, "%{size ='60'}"...

READ MORE

Now running Graffiti CMS 1.2

In the gap in between two shows, after posting the last blog, I downloaded Graffiti CMS 1.2 and upgraded this site. Using the shared WiFi in the theatre it took a little while, but that was all upload and download times. The actual "upgrade" was practically instantaneous ("copy these new files over the existing ones"). So, now running the latest bits...

READ MORE

Quickie Chalk extension for the tags issue

I mentioned in my previous blog post that the workaround I had for displaying the tags for a post vertically, rather than as a horizontal, comma-separated list, was flawed. There are in fact two issues at play. First of all here's a magnified view of the tag list in Firefox 3.0: As you can see, the biggest problem is that the clever CSS hackery I used means that the commas are still displayed in a line after the title, like an ellipsis with tails. At normal size this isn't really visible, but it...

READ MORE

So I get bored easily...

No sooner do I finish my quick series on customizing a Wordpress theme for Graffiti ( I , II , III , IV ) than I throw it all away for a — gasp — hand-written one. Yes, I got bored with the browns and went with the grays. There were two reasons for this: first, I wanted to use the entire wide-screen browser window and avoid the dead space on either side, yet still have a non-cluttered look, and, second, I wanted to use the visual ideas present in Adobe Lightroom in doing so. Adobe Lightroom...

READ MORE

Customizing Graffiti CMS, part IV

(In which I continue taking apart a Wordpress theme to make it work with Graffiti . Part I . Part II . Part III .) We're finally ready for the last piece of the jigsaw. I've created the layout.view file that determines the common look-n-feel for the site based on the Chronicles theme, and the index.view file that determines what a list of posts looks like. It's now time for the post.view file, the view that determines how to display a single blog post. Apart from the comments, in effect this is much...

READ MORE

Losing Permissions with GoDaddy

I noticed this a couple of weeks ago, but couldn't pin it down to anything. All of a sudden, the Graffiti application used to run this blog suddenly stopped working, throwing up its generic error page. After a little bit of investigation why, I found out that the write permissions on the blog root folder had been cleared. So I set them back, and promptly forgot about it. Well, it happened again yesterday afternoon and the only thing that I had done with regard to my website configuration was to create...

READ MORE

Customizing Graffiti CMS, part III

(In which I continue taking apart a Wordpress theme to make it work with Graffiti . Part I . Part II . Part IV . ) Last time I'd set up the layout.view file and completed it by adding the @childcontent statement. Now I need to think about the other two main view files, index.view and post.view , the ones that will supply the child content. The index.view file is possibly the easiest at this stage, since we started out with analyzing the equivalent PHP file from the Chronicles theme. The index.view...

READ MORE

Customizing Graffiti CMS, part II

(In which I continue taking apart a Wordpress theme to make it work with Graffiti . Part I . Part III . Part IV .) Unpacking the downloaded zip file for Chronicles gave me this set of files: OK, so I recognize the css file, but the rest are PHP files, and nothing like "layout". Oh well, time to investigate. index.php looks like it could be the equivalent of index.view , so let's take a look: 1: <? php get_header (); ? > 2: 3: < div id ="main" > 4: <? php include ( TEMPLATEPATH . '...

READ MORE

Customizing Graffiti CMS, part I

There were several reasons for choosing Graffiti as the CMS for my blog, but I suppose two were at the forefront: first, it was written in ASP.NET, and second it was very customizable, even to the point of writing plug-ins in C#. Since, in theory, I know this platform, this made it an attractive choice. But, and what a big but, the documentation for all this is pretty bad. Ugly I'd say. All of the help is written with and displayed in Graffiti, and there doesn't seen to be any rhyme or reason...

READ MORE