BBCode Enhancements

28. January 2008 09:01 by rtur.net in BlogEngine  //  Tags: ,   //   Comments (7)

BBCode extension is a part of standard BlogEngine distribution and since 1.3 it has admin interface that you can use to add or delete codes. That is cool, what is not cool is that updated codes will not show in the comment form; the values used there are hard coded. Makes no sense, so I decided to fix this little inconvenience. This is not hard, only ~/user controls/CommentView.ascx and corresponding code behind file need to be changed. First, open for edit code behind (~/user control/CommentView.cs) and add using directive and simple function that will pull data from settings object and format them for display: More...

BlogEngine.net on GoDaddy with SQL provider

20. January 2008 22:40 by rtur.net in BlogEngine  //  Tags: ,   //   Comments (9)

This weekend I worked on incorporating one of the patches uploaded by Phil Garcia (thanks Phil!) that added SQL Server support to Extension Manager. Now you can pick your provider as usual and, if MS SQL Server is your provider, Extension Manager will persist settings to the database rather than XML file as it does by default. Personally, I don't use SQL provider for my blog; I'm totally satisfied with XML here. But I realize there are lot of people who feel differently about it and for whom database is a must. So I used this occasion as an opportunity to add test site to my hosting account and set it up to use SQL instead of XML to be able to try it in hosting environment. More...

Documentation on Extension Manager

6. January 2008 17:54 by rtur.net in BlogEngine, Extension Manager  //  Tags: ,   //   Comments (0)

I planned to update documentation on WIKI site to include section on Extension Manager, but for some reason site was down this weekend. So I decided to publish it here for everybody who are interested to be able to take a look before I move it under WIKI when WIKI will return back in business. There four major classes that together represent Extension Manager API and extension writers can leverage these classes in many ways in their code. More...

Quick update on 1.3 release

23. December 2007 19:52 by rtur.net in BlogEngine, General  //  Tags:   //   Comments (0)

BlogEngine 1.3 has been released this weekend, so now I can take a deep breath and relax a little. Last couple of weeks I've been torn between two deadlines, one on Extension Manager rushing into 1.3 and another on my day job. One down, one to go... Last night I upgraded my blog to 1.3, so now it runs on latest and greatest code base. Not sure if I followed best practises, but it did work so for those curious these are the steps I followed: More...

Extension Manager 101

19. December 2007 09:22 by rtur.net in BlogEngine, Extension Manager  //  Tags: ,   //   Comments (8)

As APIs for Extension Manager finalized, I decided to put together a few simple examples explaining how you can take advantage of them. Consider situation when you have an extension that uses couple user specific variables. For instance, Akismet extension by Justin Etheredge needs to know API key and URL that specific for each blogger who uses extension. Currently, blogger has to enter this information by hand in the source code or extension author has to craft his own admin UI. Chunk of code below shows how Extension Manager can make life easier. All you need is to specify parameters you want blogger to be able to maintain and let Manager know about it. More...

The people have spoken

17. December 2007 12:00 by rtur.net in BlogEngine, Extension Manager  //  Tags: ,   //   Comments (4)

And I’ve listened. There are two big changes in the latest Extension Manager version – you can bring in your own admin UI and default settings page provided by manager became dynamic. Now it is not just two predefined boxes, you can add as many parameters as you like. More...

How extensions can use Extension Manager (beta)

12. December 2007 10:40 by rtur.net in BlogEngine, Extension Manager  //  Tags: ,   //   Comments (13)

It is subject to change based on input I’ll get, but here is how you can use Extension Manager that is in the BlogEngine build 8474 when you write extension. To utilize manager functionality you first of all need an extension that requires some kind of customization, probably you want users be able to change values set by you as defaults. If so, you can use manager to create default property page for your extension, save default values and let user change them later on. Here is how you save list of default parameters to Extension Manager using BBCode as example: More...

State of Extension Manager

10. December 2007 14:56 by rtur.net in Extension Manager  //  Tags: ,   //   Comments (0)

First of all, Mads asked me to join BlogEngine team and contribute by implementing Extension Manager as a part of BE core functionality, and I’ve agreed. If you downloaded latest bits you’ve probably noticed that it already has Extension Manager in it, although you might run into issues using it. It is very early in development and there been lots of small changes and playing around at this stage. One issue Mads pointed at was the fact that, when edit source code, IIS also reloads worker process, not only the application. More...

Let Extension Manager manage settings

3. December 2007 23:48 by rtur.net in BlogEngine, Extension Manager  //  Tags: ,   //   Comments (6)

By now we have simple and functional admin interface for extension management. Let’s go beyond basics, how about default settings page that extension writers can take advantage of? Let me explain what I mean. Suppose, you wrote BBCode extension (hope Mads won’t be mad at me:). It let people use XHTML in their comments without compromising security. The way it works: you define a square bracket syntax that people can use and extension converts it into real markup on comment serve. This is what code looks like: More...

Editing extension source code

30. November 2007 16:28 by rtur.net in BlogEngine, Extension Manager  //  Tags: ,   //   Comments (0)

You might say – editing source code is easy. Just open Visual Studio and start typing. Not so fast – what if I want to do it online, the way WordPress plug-in manager does it? Let’s say I uploaded extension and it seems to have a bug or I want to make a quick change and I don’t have access to do it over FTP. Is this even possible remotely change code for compiled assembly, save your changes and make application use new code? Let’ try it.

I added new “Edit” link to each extension in the list (if you don’t know what I’m talking about see previous post on Extension Manager). Then I created user control inside “User controls/xmanager” folder named “SourceEditor.ascx”. This is a simple control that have a multi-line text box and a save button. When “Edit” link clicked, page will load this control and fill it up from the source file. It will look inside “~/App_code/extensions” for the file with the same name as extension name. It is not required to put your extensions there, but it is a common convention. If source for extension in some other place – we won’t bother, just show relevant message and disable save button.

When source file found, it will show up in the text box and you can edit it and click save button. One catch here is that you need to disable validation on the page; otherwise ASP will not let you submit control to prevent code injection. Once validation knows that we are good guys and not sending evil things to the server, it all works as a charm. Here is entire code for control that let you easily edit source code for extension from admin panel. It is pretty short and self-explanatory. And you don’t even have to reload application this time; because we changed file in the app_code folder, IIS automatically will kick in jitter to re-compile assembly and start using modified extension. More...

Recent Tweets

Twitter May 15, 19:37
Trying to figure out if Linux Mint need an upgrade. And I thought Windows versions complicated. Is that LMDE thing what I need for my Nadia?

Twitter May 2, 20:36
So Channel9 metro app is limited compared to website and will launch IE if I try to download video... why would I use it instead of web?

Twitter May 1, 17:46
Back to the business after a week completely off the grid. It always sunny in Mexico :)

@rtur