Usability, MVC, ASP.NET

11. November 2008 21:27
by Henrik Stenbæk
3 Kommentare

Work in progress

11. November 2008 21:27 by Henrik Stenbæk | 3 Kommentare

I decided that I would post a little preview from my workbench, since I would not have a lot of time for free-theme creation for the next couple of weeks: I’m struggling with a tight deadline – somebody (mostly me) - need to deliver 400 hours of work before 15th January 2009. So instead of using the nights for theme adapting I have found myself writing Factories and Interfaces all around the clock.

First the good news

as mentioned elsewhere on this blog. I already have finished 90% of the work for BranfordMagazine – and it’s so cool! Please take a look at the screen shoot:

CropperCapture[56]

Currently I'm struggling with the category list on the right - the category list is one of my favorite I-don't-link-BlogEngine-elements - together with a lot of the other widgets elements. Before BE 1.4 a theme adapter (or designer) could decide "that this theme will not support this element" when it was to difficult to style; but after the widget-zone every "nice-add-on" need to render correct! Anyway: I have managed to get the BranfordMagazine theme to work without changing anything within BlogEngine.Core, its all rendered from the /Theme folder ;-)

Now the "bad" news

Last Sunday I ended out giving up on last weeks poll winning theme ZinePress. Right now I really can't remember what it was that make me give it up:

 CropperCapture[57]

Beside that the tag cloud isn't a cloud; it's more like a list ;-) And the footer is looking strange..

CropperCapture[58]

It is mostly the calendar - but also the first row: I could get any <blog: controls to render correct! I just came to think that some google ads maybe could look nice.. LOL

Anyway if somebody reading is dying for getting this theme - let me know and I will give it a second try.

27. Oktober 2008 23:04
by Henrik Stenbæk
12 Kommentare

Make a wish for a BlogEngine.NET theme

27. Oktober 2008 23:04 by Henrik Stenbæk | 12 Kommentare

Do you have a favorite blog theme that sadly only available to Wordpress or Blogger – now it's time to suggest it for adapting to BlogEngine.NET.

Lately I have been like a drug addict converting Wordpress themes for BlogEngine: I haven’t nearly finish one theme before rushing into the next. Now it has to come to an end! :-) But I won’t stop entirely: I just want to try to slow down and only do one theme a week. And to make sure that I actually converting themes that somebody wants to use I’ll ask you all to suggest your favorite theme by posting a comment to this post including at least a link to the theme preview and/or the theme homepage. At the end of the week I’ll decide what theme to adapt – if this decision is too hard I’ll put up a poll and ask you to vote for the one that I should adapt.

Please remember only to suggest themes released under GPL or CC ShareAlike type of licence, this means that I cannot adapt any commercial themes (mostly named something like “premium theme”).

Happy suggesting

19. Februar 2008 23:42
by Henrik Stenbæk
1 Kommentare

FlickrRSS user control (for BlogEngine.Net)

19. Februar 2008 23:42 by Henrik Stenbæk | 1 Kommentare

When I started out creating this control my idea was to create a Flickr photo plug-in for BlogEngine.Net but after a while I realised that I could just create a traditional ASP.NET user control for reading RSS streams from Flickr. So here it is:

FlickrRSS.ascx the user control that allows you to display Flickr photos on your weblog, homepage or wherever you have an ASP.NET based web application.

The user control supports user, public and group photostreams.

 

How to use the control

Download the control FlickrRSS.ascx.zip (1,96 kb) and unzip the files to your project (FlickrRSS.ascx and FlickrRSS.ascx.cs).

Register the control in the page where you want to show the pictures:

<%@ Register src="FlickrRSS.ascx" tagname="FlickrControl" tagprefix="onesoft" %>

Add the control to the page:
<onesoft:FlickrControl ID="FlickrControl1" runat="server" />

Properties

RssType The type of rss read from flickr the options are: User, Group, Allpublic
FlickrId Optional if RssType=Allpublic. Required if RssType is User or Group. This must be a valid Flickr userid or groupid, this is not the same as username or groupname the format is something like 12345678@00,
Tags Optional. a comma separated list of tags with no spaces eg.: Tags="adam,laura" – find photos tagged with Adam AND Laura
NumberOfImages The maximum number of images to appear in the control.
CacheDuration The time in minutes that the RSS result is cached on the server

Output

The control returns a list of thumbnails in the format:

<ul>
   <li>....</li>
   <li>....</li>
</ul>

And can easy be formatted with CSS ;-)

<onesoft:FlickrControl ID="FlickrControl1" runat="server" RssType="user"
        CacheDuration="10" FlickrId="34434281@N00" NumberOfImages="8"
        Tags="celina" />

returns this (after some formatting):

flickr

 

Download

FlickrRSS.ascx.zip (1,96 kb)

 

Improvements

This control could be better - but how? Any comments and suggestions are welcome.

  • The XML read must be asynchronous

20. Juli 2007 01:13
by Henrik Stenbæk
6 Kommentare

ASP.NET AJAX username availability with suggestions

20. Juli 2007 01:13 by Henrik Stenbæk | 6 Kommentare

Based on my resent post, I have rewritten the code and turned it in to a custom control:

  • It is no longer depending on the Futures CTP.
  • If the username isn&rsquo;t available it&rsquo;s possible to get suggestions with available names.
  • The web service UsernameResult is now returning a class which is automatically JSON serialized by ASP.NET AJAX and passed into JavaScript as a parameter.
  • Fully integrated with the asp.net 2.0 membership.

Try out the online demo.

 

How to use the control

Register the control on the page:

<%@ Register TagPrefix="one" Namespace="onesoft.common.controls" %>

Then add the control

Remember to set ControlToTest - just like on a validator control :-). All the other properties has defaults as shown above.

Add a ScriptManager to your page (before the usernameAvailability control) and define a ServiceReferance:

<one:usernameAvailability runat="server" ID="IsAvalible" 
ControlToTest="Username" 
ForeColor="DimGray" 
NotAvailableTextColor="Red" 
AvailableTextColor="CornflowerBlue" 
StartUpTextColor="DimGray" 
AvailableText="{0} is available" 
NotAvailableText="{0} is not available" 
StartUpText="Type a username" 
SuggestionLinkText="Suggest" 
UseSuggestion="true"></one:usernameAvailability> 

The webservice has 2 functions: 

IsAvailable - checking the availability of the current name
suggestAvailable &ndash; returning suggestions for available name.

Remember to include the file UsernameService.asmx to your root and add UsernameService.cs to App_Code.

That's it - now start checking for available usernames.

Try it out with the online demo - type your preferred name, if it's available create the new user and retry with the same name - now try the suggestion link.... ok I know it isn't clever, but it is available usernames ;-)


Download the full sourcecode including the demo.

AJAXUsernameControl.zip (257,01 kb)

I welcome any comments and suggestions.

Enjoy ;-

Henrik