Mindfly Website Design Studio

Mindfly Web Designer Favorite

Blog

Our Posts on Web Design

Adding Controls from Boogaloo to BlogEngine.NET

by Janae Wiedmaier January 26, 2010 1:01 PM

Cross-compatibility is probably my major complaint in about every aspect of my life.  If css isn't cross-compatible with browsers and my new shoes aren't cross-compatible with all my different sweaters, then there's a definite hitch in Fate's threads.  I shake my fist at you, Fate, and demand that you allow neon orange and pink to go together.  Okay, not really.

The big kicker, in this case, is cross-compatibility between different frameworks.  I know that you're guessing that I'm talking about glasses and photographs, but what I'm really discussing are the different CMS/E-Commerce/Blog/etc. programs that I get to "code" (I say this with quotation marks, because any developer out there would tell you that I do not actually code) in every day.  In specific, the primary ones are Boogaloo, AbleCommerce, and BlogEngine.  RSS feeds port over pretty nicely between them, but getting AbleCommerce controls to work in Boogaloo or Boogaloo controls to work in BlogEngine turns me into a pestering little chinchilla that hounds Rusty until his ears bleed (I think I saw it happen once.  Maybe.  You could ask him).

Today, Rusty and I specifically scheduled an hour of time to take some controls from Boogaloo and add them into a blog (BlogEngine) for a client.  It makes it easy(er?) in this case because we're going from one .NET application to another.  Surprisingly, I think I understood enough of it (except the one menu control that had to be ported from VB into C#) that I can tell you how to take your Boogaloo controls and slap them nicely into BlogEngine so you only need to make your changes in one place.  And what a miracle it would be, if life were always so compatible and simple.  Perhaps Fate thinks that brown is the new pink?

I make a few basic assumptions (and statements) in this post.  First off, I assume that you have both Boogaloo and BlogEngine already installed.  Second, I state that you can have either type of Boogaloo or BlogEngine installed, by which I mean that you can have installed Boogaloo on either SQL Express or SQL Server, and you can have BlogEngine installed with either XML or SQL Server or SQL Express as well.  Since the sites don't specifically interact with each other, the database types don't matter.  Thirdly, I assume that your install of BlogEngine is not in a sub-directory of Boogaloo, but is rather being hosted separately with its own sub-domain, etc.  I'm not going to be talking about having a blog installed "inside" Boogaloo, as that's another host of issues that I know next to nothing about.  So, if all of these base assumptions are correct, we're ready to move over into actually adding Boogaloo to BlogEngine.

The Actual "How-To":

  1. I find the best way to do this (if possible) is to open two windows and have your Boogaloo file structure in one window and your BlogEngine file structure in the other.  Windows 7 nicely lets you split the screens, or if you have two monitors like me, you can put one in your left and one in your right monitor.  Whatever works best for you.
  2. Bin files: The first thing that you'll need to do is take these three files from Boogaloo and copy them into the bin folder in BlogEngine.  Since they have the same basic .NET file structure, it should be easy to locate both places.  Here are the files:
    1. Boogaloo.Base.dll
    2. Boogaloo.Core.dll
    3. Boogaloo.Syndication.dll (this one isn't specifically necessary, but good to have nonetheless)
  3. Config files: Due to the way Boogaloo is set up, you shouldn't have to worry about having strange conflicting config files.  Simply copy from the App_Data folder in Boogaloo the following files to the App_Data folder in BlogEngine:
    1. Boogaloo.config
    2. Database.config
  4. Web.config file editing: After you have copied over the first initial steps, the next thing to do is connect BlogEngine to Boogaloo.  This is done in the Web.config (which you do not need to copy over, we'll be merely editing the one that is already in BlogEngine) and Database.config files.
    1. Open the Web.config file in the root BlogEngine directory.
    2. Underneath "configurations" and inside the first "configSection" tag, add the following (This can be found inside Boogaloo's Web.config file):
      <sectionGroup name="Mindfly">
          <section name="Boogaloo" type="Boogaloo.Base.Configuration.BoogalooSection, Boogaloo.Base"/>
      </sectionGroup>
    3. Cut everthing inside the "connectionStrings" section from the Web.config file and paste it inside the "connectionStrings" in the /App_Data/Database.config file
    4. Back in the Web.config file in the root, take the now empty "connectionStrings" section and remove the opening and closing tags.
    5. Where the "connectionStrings" were, paste the following (This can be found in Boogaloo's Web.config file):
      <!-- Database Connection Strings -->
      <Mindfly>
           <connectionStrings configSource="App_Data\Database.config"/>
      </Mindfly> 
    6. Save the Web.config and Database.config files!
  5. Controls: Now its time to actually move over the controls that you're wanting to use on your blog.
    1. Make a new folder in the root BlogEngine directory and name it "Controls".  You will want to mimic the path structure that Boogaloo uses, since we will be referencing them in the same way that we would in the masters or embedded controls in Boogaloo itself. (Note: You will not need to copy over any Editor controls.  Since those are being used in Boogaloo, only the front-end controls (ones that do not have "Editor" in the filename) will be needed in BlogEngine)
    2. Once you have added your Controls folder, add the folders inside it that have the location of the controls that you wish to copy over.
    3. Copy over the controls from Boogaloo's location to the new folders that you have created in BlogEngine.
  6. Add your controls to your theme's site.master: Once you've finished copying the controls over, it's time to add them to the master page.  The most common use for controls from Boogaloo to BlogEngine is for embedded controls that are going to be edited in Boogaloo and you want to update in BlogEngine.  I'm going to specifically focus on getting the information from those for this tutorial.
    1. Open your web browser and your website, and log into Boogaloo.  Once again, I am making the assumption that if you're going through the trouble to do all this, you already know how to use Boogaloo enough to log into it.
    2. Drop down the "Settings" link and click on "Embedded Controls".
    3. Click on the name of the Control that you are wanting to add to BlogEngine.  (I'm using an example from the Mindfly site and clicking on my "Janae's Blog" Control)
    4. At the bottom of the control, you will see "Information for your web designer".  That would be you!  Copy everything from the first carrot to the last one.  In my case:
      <%@ register tagprefix="mfb" tagname="rssfeedlist" src="~/Controls/MIND/RSSFeed/RssFeedList.ascx" %>
      <mfb:rssfeedlist runat="server" node_control_id="77" />
    5. Paste the code into your master in the location you want the control to be located.
    6. Optionally, then cut out the register (<%@ register tagprefix="mfb" tagname="rssfeedlist" src="~/Controls/MIND/RSSFeed/RssFeedList.ascx" %>) and paste it at the top of the master with the other registered controls.  I like to do this so that everything stays neat and tidy.

And that just about covers everything.  You've copied over your core Boogaloo components (.dll), added your important Boogaloo config files, and then added your controls and synced them all into a nice tidy package through your Web.config and site.master pages.  The last step to do is test it out.  You should find that every control that you make (or use that comes standard with Boogaloo), barring extra back-end compiled configuration should work just as easily in BlogEngine as it does in Boogaloo.

Permalink | Comments (0) | Post RSSRSS comment feed

Text Rotation: Another Spiffy Gadget

by Janae Wiedmaier December 11, 2009 12:38 PM

One of my favorite things to write about is new gadgets.  I’ve made posts in the past about having gadgetitis, and I have to admit that as soon as my eyes get glued on all the fun things at ThinkGeek.com, it’s really hard to peel them away and get back to the more important things in life (like work!).

When it comes to the web, the best acquisition of “new gadgets” is whenever I discover that a browser has implemented something from CSS3 that I can put into use now.  Lucky for me, webkit browsers (Safari and Chrome) and Firefox move up to speed.  Internet Explorer is often behind a bit, but I’ll survive that because of an awesome thing called filters.

Recently, on a site I was working on, I decided to take a piece of the design that requires text to fall at a slanted level, and use text-rotation on it.  It was miserable to implement, but when it was completed, I felt very successful.  And so, that’s why I want to talk about it as my most recent gadget!  Let’s look at a few things:

How to Implement Text Rotation in MOSe

The fun thing about text rotation is that it doesn’t function the same in every browser (hello, duh!  What CSS does?), so in this case – designing means that you will have be more flexible.  Safari, Chrome, and Mozilla support rotating text at any degrees, however, IE only supports rotating in 90 degree intervals, and Opera doesn’t support it at all (My professional opinion in regards to this is a rude comment towards Opera).

To add text rotation, you’ll of course have to set up your HTML with the appropriate ids/classes for targeting.  Make a note that if you rotate a parent (<ul>) and rotate the child (<li>) then both rotations will affect the child element.

Once the HTML has been created, here is where you add your CSS.  At Mindfly, we have a separate sheet for all these fun CSS3 trinkets so that our other CSS will validate.  I would do something like this:

#menu li
{
    -webkit-transform   : rotate(-70deg);
    -moz-transform      : rotate(-70deg);
}

Easy enough, right?  The problem here, of course, is that IE only accepts things in a 90 degree radius.  Also, if you want your items to stand next to each other, you have to do some funky absolute positioning to get it to work.  I’ve set up an example to see here (in which I used a lot of fun absolute positioning to get things to sit next to each other correctly, yay!).

And Getting the Stupid Thing to Run in IE

Once you’ve got your rotation set up, it’s time to fix it in IE… ah, doesn’t that sound like the way things usually go?  Of course, there are multiple browsers of IE to consider.  Luckily for us, most filters work all the way back to 5.5.  In this case, we’ll be using the deceptively named BasicImage filter.

Now, this has to be implemented differently for IE8 as it does for IE7 due to the fact that when our wonderful Microsoft developers made IE8, they made it right.  To be CSS 2.1 compliant, there has to be browser-specific prefix syntax (as we see above with -moz- and -webkit-).  The same is required for -ms- filters in IE8 – but not for IE7 or below.

When you’re setting up your IE specific stylesheet, you will want to use something like the following:

#menu li
{
    -ms-filter   :"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";
    filter       : progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
}

Note that the -ms- version has to come before the other, or IE8 will not render it correctly.  Also, if you used fun funky absolute positioning like I did, then you’re going to need to fix your list items so that they line up correctly.

You can view the same example page in IE all the way down to 6 and it should render at least close in each one.

What About Opera?

As a designer, we often get tired of inconsistencies among browsers.  Usually I’m saying things like “Forget IE”, but in this case I say “Forget Opera”.  Or, at least – style for Opera first and then override it with your funky stuff.  At least IE has conditional comments that will allow you to adjust for its inconsistencies.

Tags: , , ,

Categories: Web Design

Permalink | Comments (0) | Post RSSRSS comment feed