weblogUpdates.extendedPing

Sep 12, 2008 at 7:07 PM
Hi folks,

I just had a look at BlogEngine.Core\Ping\PingService.cs and noticed that BlogEngine.NET is obviously using the XML-RPC method "weblogUpdates.ping". Now I've been wondering why it doesn't use "weblogUpdates.extendedPing", which in contrast to "weblogUpdates.ping" also supplies the blog's RSS feed to the ping service. This would be a trivial change and I'll probably modify my installation accordingly, as the current BlogEngine.NET behavior has produced me some strange results with http://www.blogpingr.de/ (i.e. my blog gets detected as an entirely new blog each time it pings that service, and BlogPingr doesn't take note of my blog's RSS feed, which would surely change - I suspect - were I using "weblogUpdates.extendedPing"). The question is: Does anybody know if any of the popular ping services don't support "weblogUpdates.extendedPing" but only "weblogUpdates.ping"? That might be a reason for me not to make the above mentioned change to my installation, and that would also fully explain why out of the box, BlogEngine.NET uses "weblogUpdates.ping".

Furthermore, when we send out our "weblogUpdates.ping", could it be that we send out along with it the absolute URL of the page that's just been changed / created, when actually, we should send out only our blog's base URL? What's the reasoning behind that? Unluckly, this behavior seems to cause BlogPingr to believe that they're being pinged by a different blog each time, which is not what I'd like to happen.

Any comments are welcome - don't worry, I'm not complaining, I'm just trying to find out what's the reasoning behind things being the way they are, so that I can better determine what I can expect to happen should I change 'em. ;-)

Greetings,
Nils
Sep 16, 2008 at 8:27 PM

Hi folks,

after having received no answer, I’ve decided to make the appropriate changes myself. My modifications are probably more of a quick hack than an elegant solution, but I’d still think I’d make them available to anyone who’s interested. Those who are can grab my modified version of BlogEngine.NET at

http://www.nightcastle.org/software/blogenginedotnet/BlogEngineDotNet-1.4.5.1_NCC.zip

Changes compared to the “plain vanilla” version of BlogEngine.NET 1.4.5:

-          We ping external ping services using the weblogUpdates.extendedPing method, passing our blog’s base URL along with the blog’s feed URL to the external service.

-          In the settings, there’s a new text field into which you have to enter your blog’s base URL. This is required for the above to work. It’s mandatory to enter a trailing slash (i.e. http://www.nightcastle.org/blog/) for stuff to work properly

Changes have been made to the following files:

-          BlogEngine.Core\BlogSettings.cs

-          BlogEngine.Core\Utils.cs

-          BlogEngine.Core\Ping\PingService.cs

-          BlogEngine.Web\admin\Pages\Settings.aspx

-          BlogEngine.Web\admin\Pages\Settings.aspx.cs

-          BlogEngine.Web\App_Code\Extensions\SendPings.cs

-          BlogEngine.Web\App_GlobalResources\labels.resx

Known issues:

-          When done properly, it would probably not be necessary to enter the blog’s base URL in the settings by hand. However, I didn’t have any better idea in the ten minutes I spent making these changes. Utils.BaseUrl doesn’t really help in my case, does it?


-
         
My original idea was to use weblogUpdates.extendedPing, and if that fails because the ping service doesn’t provide it, fall back to weblogUpdates.ping. In the current form, this probably doesn’t work as I’m not properly interpreting the ping server’s reply, but only falling back to weblogUpdates.ping when the whole first attempt of sending my ping fails. This certainly needs improvement.


-
         
Oh, since I only have Microsoft Visual Studio 2008, my BlogEngine.NET version is now a VS2008 project.

I don’t know if this is useful for anybody, but feel free to decide for yourself. I might find the time to do stuff more properly sometime in the future, if “plain vanilla” BlogEngine.NET doesn’t use weblogUpdates.extendedPing or weblogUpdates.ping until then anyway…

When I have some more time, I’m planning to get more familiar with the inner workings of BlogEngine.NET and develop a “fortune cookie” plugin that will put some random quote / joke / whatever on each page the engine serves. I’ll announce this stuff here as well once I’m done with it (hopefully still this year…).