MetaBlog Post Extension

by Nino 1. January 2009 09:40

MetaBlog Post Extension is a Graffiti plug-in that will allow you to set several post properties when posting via the MetaBlog API by including some tokens in your post body.  I created this plug-in in response to a comment to my original Publishing to Graffiti CMS from Diarist post that asked about setting the Include on the Home Page property of a post when posting.

Installing MetaBlog Post Extension

Once you have the plug-in, you can either place it into your /bin directory yourself (via file copy or FTP), or use the File Browser in Graffiti.  To use the File Browser, go go the Graffiti control panel > Site Options > Utilities > File Browser.   Select the bin folder from the folder list and then click the Add Files link. Locate NinoB.Graffiti.PlugIns.dll and upload it.

Now, as all plug-ins are disabled by default, it must be enabled.  In the Graffiti control panel, navigate to Site Options > Plug-Ins.  Locate the ‘MetaBlog Post Extension’ entry and click the Enable link.  Once enabled, it will look like this:

MetablogPostExtension

 Configuring MetaBlog Post Extension

There is no configuration for this plug-in.

Using MetaBlog Post Extension

In your post, add one (or more) of the following tokens:

[homepage] Sets the ‘Include on the Home Page’ property.
[draft] Sets the Publish Status to ‘Draft’
[enablecomments:true] Enables comments for this post if comments are disabled by default on new posts.
[enablecomments:false] Disables comments for this post if comments are disabled by default on new posts.
[tags:<comma-delimited-tag-list>] Sets the tags for the post.

 Here is an example using Windows Live Writer:

testpost

Here is an example using Diarist:

DiaristTestPost 

Download the plug-in here!

Notes

I have only tested this from Windows Live Writer (WLW), Microsoft Word 2007, and Diarist, so your YMMV (your mileage may vary). Any HTML that your blogging tool may prefix or suffix the token text with is not removed, so if your tool actually submits <p>[draft]</p>, the <p></p> will be left behind after the post is processed.

I would appreciate any feedback – please leave a comment to this post, or contact me directly.  Enjoy!

Tags: , ,

Samples and Presentations

Publishing to Graffiti CMS from Diarist, Redux

by Nino 26. December 2008 17:52

At the end of November, I posted on how to publish (post) to Graffiti CMS from Kevin Daly’s Diarist application on Windows Mobile Professional Edition via the MetaWeblog API.  Kevin replied with a great tip on an even easier way to configure Diarist!

Kevin’s reply:
Actually, there's something you can do to avoid typing the endpoint: since Graffiti CMS supports RSD (I just had a look) Diarist will do endpoint discovery - just enter your blog url in the erm, Blog URL field and select Menu->Find API (which should be enabled if there is no value in the API field), and Diarist should retrieve the appropriate value and populate the API field with the endpoint itself. This works for any blog that supports Really Simple Discovery (RSD)

I greatly appreciate Kevin taking the time to drop a comment and verifying that Graffiti supports RSD (which neither its existence nor its support by Graffiti was I aware of). Here is an illustration of Kevin’s method:

After launching Diarist, click the Menu soft key, then Weblog –> Add –> Generic MetaWeblog

 

Enter in the Username, Password, and Blog URL fields, then click the Menu soft key, then Find API.  (note: I have also found that this works without providing credentials.)

Diarist_FindAPI

 

Diarist will then, via RSD, discover your MetaWeblog endpoint and populate the API field after just a moment or two.  From there, click Confirm and you are on your way.

Tags: ,

General

Graffiti CMS 1.2 Released

by Nino 21. December 2008 11:14

The folks at Telligent have released version 1.2 of Graffiti CMS.  If you are already running v1.1, the upgrade is dead simple – it is just a file overlay.  As fast as you can copy/ftp the files, you are upgraded. 

Granted, it took me a few more minutes because I put my entire website under source control (and usually don’t version binaries, but made an exception here), so I had to perform a check-out and check-in as well as the FTP up to my site host.  ..and the upgrade worked without issue (as one would expect).

Here’s the fix list (which is also on the page linked to above):

· Corrected Gravatar markup

· Dictionary references (%{}) in macros now work correctly

· PostsByTagAndCategory no longer returns an exception if no posts are found or an invalid tag or category is passed

· Now trapping invalidly formatted email addresses on the Contact form

· Time settings in error log now reflect the time zone offset

· Deleting navigation links containing special characters now works correctly

· Control Panel post category filtering is now maintained when "older posts" and then "newer posts" are clicked

· Updated VistaDB database engine to current version

· EveryoneRole no longer counts as a content publisher when it doesn't have edit/publish rights.

· Search results now respect permissions

· Categories tree sidebar item in Control Panel now reflects posts correctly with same-named sub categories.

· Revision dropdown in Control Panel now shows the correct time/date stamp for each revision

· Corrected Comments paging in the Control Panel

· Corrected the XSS issue

Note that we also had these bugs logged, but our testing showed that the fixes were already present in Graffiti 1.1:

· Directory Path not found for FileBrowser in Mono

· Dashboard - GetFeeds throwing object ref not set

· Case sensitivity issue in TagCloud

· Bug posting with special characters in title with Live Writer

Tags: ,

General

Graffiti Post Comments On January 23

by Admin 4. December 2008 16:50

On a recent post, an astute reader (and commenter) noticed that his comment (and all comments on that post) were appearing as ‘January 23, 2008’.  I looked. Yikes! He was correct.  Hmmm.

I hit the Graffiti forums and found a few threads that mentioned it, but no fixes. Time to take a peek on my own.  Once in the control panel, navigate to Presentation > Themes > Personalize (for the current theme). Next, click post.view to bring up the markup template behind an individual post.

At this point I thought the first step would be to just perform a search for the string ‘January 23’.  Makes sense, correct?  You bet.  So, I did; I found the string. And then I was sad. Here is what I found:
<a href="#comment-$comment.Id" title="Permanent link to this comment" rel="bookmark">January 23, 2008</a>

Hard-coded. That certainly explains it. Goofy theme author.

Next, I pulled up the post.view for the default Graffiti 1.1 theme. Oh, it is hard-coded here, too. More sadness.  Not the theme author’s fault. Well, not entirely.

Enough being sad, let’s get happy.  The fix for this faux pas is simple:

1) locate ‘January 23, 2008’ in your post.view template.  delete.

2) replace with: $macros.FormattedDate($comment.Published)    
     My comment link now looks like this:
     <a href="#comment-$comment.Id" title="Permanent link to this comment"  rel="bookmark">$macros.FormattedDate($comment.Published)</a>

3) Click the Save Changes button.

This will now list the date for a comment using a format that appears like this: ‘Tuesday, December 02 2008’. Spiffy!  Fixed.

Next steps?  Ask your favorite Graffiti 1.1 theme author to verify that, if they copied some parts of the default theme, they fixed this item in their theme.  Also, you will need to check this (and perhaps fix it) for any other theme that you use as well.

Oh, and what is so swell about January 23? Not certain, but a few things have happened on January 23.

Tags: ,

General

Publishing to Graffiti CMS from Diarist

by Nino 30. November 2008 15:41

Some folks out there (like me, on occasion) prefer to use a client application for blogging from their Windows Mobile device, as opposed to using a web interface.  The client I like to use (which I have also used with Community Server) is Diarist  Diarist (download here) (note: requires .NET Compact Framework 2.0) from Kevin Daly.

I recently had cause to hard reset my Windows Mobile 6.1 Professional Edition device, so I needed to reinstall all of my apps.  Diarist, of course, being one of them.  It is also telling that I have not blogged from my device since before I switched from Community Server to Graffiti CMS, but that’s another story.

After launching Diarist for the first time, click the Menu soft key, then Weblog > Add > Generic MetaWeblog as in Figure 1.

GenericMetaWeblog

Figure 1

Once on the screen for entering blog information, enter in the API URL, username, password, and blog URL (see Figure 2).  For Graffiti CMS, the MetaWeblog endpoint is at /api/MetaBlog.ashx.  If your site is at http://yoursite.com, the URL for the MetaWeblog endpoint (i.e. API URL) would be http://yoursite.com/api/MetaBlog.ashx. After entering this information, click the Confirm soft key and you are ready to post to your blog!

APIInfo

 

Update: Check out my additional post on this topic for an even easier way to configure Diarist

Tags: ,

General

And now, with Graffiti CMS power

by Nino 11. November 2008 18:10

Telligent Community Server is a good product, but a bit overkill for a single blog instance like this.  I have been looking for a turnkey solution to replace it, and I have found that in Telligent’s Graffiti CMS (1.1).

For my readers who subscribe to my feed (powered by FeedBurner), you will be blissfully ignorant of any changes; visitor’s to my site will notice some changes in layout.  They will also notice that my file downloads are currently unavailable – I will have this addressed shortly. 

After some trial and error (and re-reading the documentation <gasp!>), I achieved a flawless import of all my existing posts in CS to Graffiti (well done, Telligent).  I have set up redirects (so everyone using the old CS-based URLs won’t get lost, but the old-old URLs I was redirecting in CS are now toast) using James Avery’s Graffiti.Redirect (0.2).   Also, I have installed Graffiti Extras; however, I’m having some trouble getting the Windows Mobile theme selector to work correctly, but that seems to be an issue with this extension – stay tuned for some updates there.

Having gone through several CS version upgrades, I will say that the migration to Graffiti was painless by comparison (and frankly, painless overall).  Nice to see the product quality improvement, Telligent. Seriously, I wanted to love CS (2.x, 2007.x) with all my heart, but, damn it, there was some cruft in there that was just painful to deal with.

This time, it’s all milk and honey.  <AustinPowersVoice>Yeah, baby.</AustinPowersVoice>     Well done, Telligent, and I look forward to the 2.0 release.

 

Note: I was not bribed, threatened, blackmailed, blackballed, coerced, spammed, given the evil eye, or otherwise influenced by Telligent or their employees (even the ones here in Ohio) to write this ‘review’. I’m just seriously happy with this product.

Tags: ,

General

Blog changes - Part II (the joys of medium trust)

by Nino 9. November 2008 04:42

Earlier this month, I signed up with FeedBurner in order to have a better syndication experience for my readers.   That was Part I of the changes. Part II took a bit longer than the additional time I had allowed for it. 

"The plan" for Part II was to move off of Community Server (hereafter, CS) 2007 and onto Subtext.  Things didn't go quite as planned - imagine that. 

Why move off of CS?  CS has a lot of functionality, more than I need or use. And, it is slow sometimes (in fairness, I think that a bit of this is due to the fact that I run it on a shared server).   So, once this decision was made, off to find a new blog engine.  I quickly arrived at two options: Subtext and dasBlog.   Both of these are excellent options in my opinion.   To keep it brief, I opted for Subtext because I wanted to keep the SQL Server back end.   Ok, fair enough. 

As noted, I host nino.net at Server Intellect on a shared server (i.e. shared web and database servers). As many (most?) web hosting companies do these days with ASP.NET 2.0 in a shared environment, they mandate a state of Medium Trust.   Many things break under medium trust, if you've not designed for it. Keyvan discusses this here.

Since support exists in both CS and Subtext for BlogML, I decided to use this to do the data transfer.  For the export from CS, I used Keyvan Nayyeri's BlogML converter.  For the import, well, Phil and the Subtext team have baked that in. And the import worked flawlessly save for one post (The Mobile Minute 50), which I removed from the XML and need to figure out what is wrong with it (XML Spy says that the full BlogML export is compliant with the BlogML schema, so that's not it).

I then created "blog" directory on my root and then went to my control panel and set this directory up as both a virtual directory and virtual application. Afterwards, I installed all the spiffy Subtext bits into there.  I also followed Phil's guide for configuring Log4Net (used by Subtext) under medium trust.   Mind you, gentle reader, I ran through this exact scenario on my development server and it worked flawlessly, so I expected the same here.  (Granted, I had not yet realized that I had not actually tested under Medium Trust). 

Once I realized the issue (I first revisited Phil's post on Log4Net under ASP.NET 2.0 Medium Trust to verify I had things set up correctly), I also realized that I then, recalling from prior research, had two quick options to resolve this: move my blog to the root, or create a blog sub-domain.  I was not fond of either option.  Not to mention the fact that well, my blog was down. Feh.   I rolled back to CS (just had to whack the /blog dir and its settings) and settled in for further research.

My options at this point:
1. Put Subtext on the root (i.e. http://nino.net) or sub-domain it (i.e. http://blog.nino.net).
2. Contact my host and ask them for an exception to the medium trust, please. (btw, my problem was with FileIOPermission).
3. Keep with CS and dedicate some future time to resolve the issue.

Given a time crunch, I optioned for option 3.  Now, that said, I still wanted to change my URL to http://nino.net/blog from http://nino.net/blogs/nino since this is the only blog here - and let's face it, I was delusional when I thought I might have other blogs at this site. ;-)

So, how to do that?  CS config goodness and some URL rewriting to keep things all search engine friendly.

I queried the CS forums (specificially Blogs and Setup and Installation) and did a little searching elsewhere. I particularly recommend Jayson Knight's post on CS Config File Overrides and this thread, started by Scott Watermasysk, on converting CS to single blog. A note of thanks to Ken Robertson for his assistance in getting me to see the obvious in the siteurls_override.config.  Speaking of overrides, one could simply edit the communityserver.config and siteurls.config files directly instead of leveraging override files, which I just may do now that I understand what needs set.

To see how I converted my CS installation to a single-blog setup and implemented URL rewriting, see my post about it.

For Part III of my blog changes, which I won't blog about other than this mention, the changes are all superficial - skinning and theming - which most of you, if my stats are correct, won't see as you get here via RSS.  Those of you who do visit the site via your browser will see some changes shortly.

In sum, blog URL is now: http://nino.net/blog  and syndication is: http://feeds.feedburner.com/NinoBenvenuti

Tags:

General

Scott Watermasysk's CS modules

by Nino 9. November 2008 04:42

I recently found some very sweet modules that Scott Watermasysk has put together for Community Server 2.0.  Here’s the thread on them: http://communityserver.org/forums/518790/ShowThread.aspx  The download link is in the first post. I’m particularly stoked about the MetaBlog Extender which allows  should allow* me to declaratively set things like the name of my post and the categories in the body of the post.  Very handy for naming my posts from within BlogJet.

..and yes, I recompiled them under 2.0.

-Nino

*Unfortunately, this doesn’t work on my production (hosted) server in a medium trust environment. It doesn't work because metablog.ashx doesn't work in a medium trust environment.

Tags: ,

General

Windows Live Writer 2008 RTW

by Nino 9. November 2008 04:42

Windows Live Writer has now exited beta and been given a "2008" version number. Thanks to my colleague Andrew Whitten for the info.

Tags: ,

General

The one thing that Nino would change in Community Server 2.0

by Nino 9. November 2008 04:42

Scott Watermasysk has responded to Chris Lotter's post on what he would change in Community Server 2.0.

Swell (and some good stuff, too).  But....

Here's the one thing that Nino would change:

1. Ensure that everything functions in ASP.NET 2.0 under medium trust.   (and I don't mind doing a bunch of edits to my config or using alternate assemblies (some of which we have to / are able to do now))

...or tell me that installing CS2.0 on a hosted site (which is what mandates medium trust) is not supported and I'll shut up and internalize the pain that it causes.

Tags:

General

RecentPosts