August 2006 - Posts
If you have a blog you might know about the MetaWeblog API. I implemented it for Tech Head Brothers portal to be able to post news from a client. Today I am using Live Writer to post on my blog and I also wanted to have the possibility to post news on the new version of Tech Head Brothers portal but with pictures and without the usage of a ftp server.
Checking the API I found a new method that I had not implemented: newMediaObject.
metaWeblog.newMediaObject (blogid, username, password, struct) returns struct
The blogid, username and password params are as in the Blogger API.
The struct must contain at least three elements, name, type and bits.
name is a string, it may be used to determine the name of the file that stores the object, or to display it in a list of objects. It determines how the weblog refers to the object. If the name is the same as an existing object stored in the weblog, it may replace the existing object.
type is a string, it indicates the type of the object, it's a standard MIME type, like audio/mpeg or image/jpeg or video/quicktime.
bits is a base64-encoded binary value containing the content of the object.
The struct may contain other elements, which may or may not be stored by the content management system.
If newMediaObject fails, it throws an error. If it succeeds, it returns a struct, which must contain at least one element, url, which is the url through which the object can be accessed. It must be either an FTP or HTTP url.
I defined in the interface two struct as following:
public struct MediaObjectUrl
public string url;
public struct MediaObject
public string name;
public string type;
public byte bits;
Added the method in the IMetaWeblog interface:
Description="Add a media object to a post using the "
+ "metaWeblog API. Returns media url as a string.")]
And finally the following implementation:
/// Post a media object.
/// <param name="blogid">The blogid.</param>
/// <param name="username">The username.</param>
/// <param name="password">The password.</param>
/// <param name="mediaObject">The media object.</param>
/// <returns>MediaObjectUrl defining the url of the media</returns>
public MediaObjectUrl newMediaObject(string blogid,
if (!ValidUser(username, password))
throw new XmlRpcFaultException(0, "You have no right to do that.");
string filename = Path.Combine(HttpContext.Current.Request.PhysicalApplicationPath,
"images/" + mediaObject.name);
MediaObjectUrl mediaObjectUrl = new MediaObjectUrl();
mediaObjectUrl.url = ConfigurationManager.AppSettings["BlogUrl"] +
The good point now is that I am able to let the authors of the site post news with embeded pictures without managing a ftp server.
I downloaded for the first time the new version of Internet Explorer and I find quite cool.
You might download it on this page.
And then you need the must have plugin, Mouse Gestures for Internet Explorer
soon and on a well known place now...
OK I fixed my main issue. I wasn't able to have my plugin loaded by Jetbrains Omea, and it seems that it is linked with the .NET Framework 2.0 that I use in my plugin, even if Omea Reader is running using .NET Framework 2.0 somehow it can't verify the plugin.
I had to install MSBee so I don't need to install VS 03 again. And now back to the old days of command line I have to compile using such a command:
msbuild BlogThisUsingWriterPlugin.csproj /t:Rebuild /p:TargetFX1_1=true
After modifying my csproj MSBuild file to use MSBee
So this is how it look likes in Omea Reader
And the result in Windows Live Writer:
That will be my second plugin for Live Writer and it will be also on Codeplex in Windows Live Writer Plugins project.
Thanks to Christopher Frazier for the kind help compiling my project on VS 03.
Ok it is 2:01 AM, time to go to bed.
I just finished the first release of the plugin. Now you are free to download the source from Codeplex on this page.
That's my first plugin for Windows Live Writer and it will be published on Codeplex in the project Windows Live Writer Plugins.
Here it is how it looks like in Live Writer:
And you might see the result of it here:
[ Currently Playing : Water From A Vine Leaf - William Orbit - The Best Of Strange Cargos (07:02) ]
I started to code a plugin that will implement the famous IBlogExtension for Omea Reader and Pro to target Windows Live Writer.
It will let you select one feed in Omea, right click on it and choose BlogThis, and it will fire up Windows Live Writer with the content of the original post.
I installed it and searched where it was installed without any success till it was indexed by desktop search. So for those who might search like me it is in My Documents\Windows Live Writer SDK (Beta).
When I was awarded the first time as MVP, one of the first MVP I met was Richard Clark, a cool guy. And I am happy to see some confusion in one of his last post ;)
"J'ai participé à pas mal d'events de Microsoft, et à part les PDC et TechHead, je pense qu'Imagine Cup est bien l'un des évènements les plus gros de MS."
"I participated to quite some Microsoft events, and apart from PDC and TechHead, I think Imagine Cup is one of the biggest event of MS"
He is one judge of the Imagine Cup and created the Project Hoshimi, as far as I know. The idea was in his head at the first MVP Summit we had together in 2002 or 2003, I can't remember.
Tech Ed is the Microsoft event all of us knows and Tech Head, that became later on Tech Head Brothers is my french portal about .NET technologies.
Thanks a lot the advertisement Richard ;)
Update: The whole story about the idea of Project Hoshimi is in the last post of Richard (in french) and again he is using TechHead ;)
At last I get an update to my ADSL connection, I had 512/128 since the beginning (2001). I was one of the first to get ADSL in Mulhouse. I really had to push and push to get a modem. The frustrating point was that I saw all others getting faster and faster and me staying at 512/128. I tried several time to change but I was always said your are too far you can't get more.
Yesterday I saw that they changed the page on which you can update your abo, then I tried for the 2000th time to update and this time it was ok for 1024/256 :-) And for the same price, cool.
After one day my abo was updated and now I really have 1024/256 even with this kind of line:
Longueur de ligne :
4/10 sur 3332m, 6/10 sur 843m
I know it is ridiculous compared to some friends but it is a good day for me :-).
Didier, the link to update is here ;-)
Philippe, please stop laughing.
More Posts Next page »