Why, Microsoft, why? That’s all I ask. Why must you continue to introduce proprietary technology in Internet Explorer?

Internet Explorer 8 Beta is now available for download and one of the new features is WebSlices. By adding a few specific class names to content blocks, IE will essentially syndicate the content.

<code><div class=”hslice” id=”1”>
  <p class=”entry-title”>item – $66.00</p>
  <div class=”entry-content”>high bidder:buyer1
    …
  </div>
</div>

Using the above classes will generate content the user (or IE8 user) can subscribe too. Why not RSS? Is it because that’s compatible with other software, browsers, and readers. Microsoft wanted something that would just work for Internet Explorer.

Do they honestly thing any developer will support or use this? Hmm… let’s see… I can create a RSS feed for my content that anyone can use (even IE7 and IE8 users) or I can create the WebSlice just for IE8 users. The only use this will get will be from FrontPage/Expression users who do not know any better.

Even Microsoft says it’s just like RSS on their site:

WebSlices behave just like feeds where clients can subscribe to get updates and notify the user of changes.

Please Microsoft, just make a good, fast browser for people to use. I was willing to admit IE7 was a step in the right direction. It’s fast and renders content relatively well and has good CSS support. It was only a matter of time before they had to go and ruin it.

I’ve finally deployed the DotNetNuke site I’ve been working on. After deployment is when the most obvious things pop up.

For instance, in DotNetNuke when you search for something in the site it will return a list of links to what it finds. What it won’t do is display something friendly like “No Search Results Found” if it doesn’t find anything. Dumb and not very user friendly.

I did find what I thought would be the solution at ecktwo, but it didn’t work in Firefox due to the

document.getElementById("search").innerHTML

which doesn’t work in Firefox within a table, which is what the Search Results are generated using the ASP.NET grid view. So, I thought I’d take a stab at building something that worked for both IE and Firefox.

Make a copy of your admin\Search\SearchResults.ascx file and then open the file in notepad. Apply the following code that I’ve highlighted in red:

<%@ Control Language=”vb” AutoEventWireup=”false” Explicit=”True” Inherits=”DotNetNuke.Modules.SearchResults.SearchResults” CodeFile=”SearchResults.ascx.vb” %>

<asp:Datagrid id=”dgResults” runat=”server” AutoGenerateColumns=”False” AllowPaging=”True” BorderStyle=”None”
PagerStyle-CssClass=”NormalBold” ShowHeader=”False” CellPadding=”4″ GridLines=”None”>
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<asp:Label id=lblNo runat=”server” Text='<%# DataBinder.Eval(Container, “ItemIndex”) + 1 %>’ CssClass=”SubHead”>
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn>
<ItemTemplate>
<asp:HyperLink id=”lnkTitle” runat=”server” Name=”result” CssClass=”SubHead” NavigateUrl='<%# FormatURL(DataBinder.Eval(Container.DataItem,”TabId”),
DataBinder.Eval(Container.DataItem,”Guid”)) %>’ Text='<%# DataBinder.Eval(Container.DataItem, “Title”) %>’>
</asp:HyperLink>&nbsp;-
<asp:Label id=”lblRelevance” runat=”server” CssClass=”Normal” Text='<%# FormatRelevance(DataBinder.Eval(Container.DataItem, “Relevance”)) %>’ >
</asp:Label><BR>
<asp:Label id=”lblSummary” runat=”server” CssClass=”Normal” Text='<%# DataBinder.Eval(Container.DataItem, “Description”) + “<br>” %>’ Visible=”<%# ShowDescription() %>”>
</asp:Label>
<asp:HyperLink id=”lnkLink” runat=”server” CssClass=”CommandButton” NavigateUrl='<%# FormatURL(DataBinder.Eval(Container.DataItem,”TabId”),
DataBinder.Eval(Container.DataItem,”Guid”)) %>’ Text='<%# FormatURL(DataBinder.Eval(Container.DataItem,”TabId”),
DataBinder.Eval(Container.DataItem,”Guid”)) %>’>
</asp:HyperLink>&nbsp;-
<asp:Label id=”lblPubDate” runat=”server” CssClass=”Normal” Text='<%# FormatDate(DataBinder.Eval(Container.DataItem, “PubDate”)) %>’>
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
<PagerStyle CssClass=”NormalBold” Mode=”NumericPages”></PagerStyle>
</asp:Datagrid>

<div id=”NoResults”>
<h3 class=”red” style=”text-align:center”>No Search Results Found</h3>
</div>
<script language =”Javascript”>
var search;
search = document.getElementsByName(“result”);

if (search.length == 0) {
document.getElementById(“NoResults”).style.display=’block’;
}
else {
document.getElementById(“NoResults”).style.display=’none’;
}
</script>

Be sure to add the Name=”result” snippet to the asp:Hyperlink in the code above. It’s easy to miss.

Save that and you should now have a spiffy new message displayed when no results are found. Use whatever CSS you want to style the message.

Some of these are pretty hilarious. You might be a redneck Jedi if…

  • You ever heard the phrase, “May the force be with y’all.”
  • Your Jedi robe is camouflage.
  • You have ever used your light saber to open a bottle of Bud Light.
  • At least one wing of your X-Wings is primer colored.
  • You can easily describe the taste of an Ewok.
  • You have ever had a land-speeder up on blocks in your yard.
  • The worst part of spending time on Dagobah is the dadgum skeeters.
  • Wookiees are offended by your B.O.
  • You have ever used the force to get yourself another beer so you didn’t have to wait for a commercial.
  • You have ever used the force in conjunction with fishing or bowling.
  • Your father has ever said to you, “Shoot, son come on over to the dark side…it’ll be a hoot.”
  • You have ever had your R-2 unit use its self-defense electro-shock thingy to get the barbecue grill to light up.
  • You have a confederate flag painted on the hood of your land-speeder.
  • You ever fantasized about Princess Leah wearing Daisy Duke shorts.
  • You have the doors of your X-wing welded shut and you have to get in through the window.
  • Although you had to kill him, you kinda thought that Jabba the Hutt had a pretty good handle on how to treat his women.
  • You have a cousin who bears a strong resemblance to Chewbacca.
  • You suggested that they outfit the Millennium Falcon with redwood deck.
  • You were the only person drinking Jack Daniels during the cantina scene.
  • If you hear . . . “Luke, I am your father… and your uncle…”

After I don’t know how many attempts to get wp-cache, wp-supercache and diggDefender to work in an IIS/Windows environment. Somehow, I never stumbled upon the article at Fanrastic or I never implemented it just right. Because I got it working in a matter of minutes. I’ve copied the steps below (for my own personal archive), so please don’t ask questions or give thanks – direct those to Fanrastic.

  1. Download the WP-Cache zip file (current version as of writing is 2.1.1) and unzip into wp-content/plugins folder.
  2. If you’re planning to run WP-Cache on IIS, you’ll first need to update wp-cache-phase1.php. Problem is that IIS apparently doesn’t set the REQUEST_URI server variable as expected. There are two ways to fix this issue, depending on how you are managing permalinks.

    The first way to fix this issue is to replace
    $_SERVER['REQUEST_URI']
    with
    $_SERVER['SCRIPT_NAME'].$_SERVER['PATH_INFO']
    This step was contributed by Unsought Input. I believe this works if you have used the pathinfo php.ini method described here.

    The second way to fix this issue was contributed by Yonatanz and it is what worked for me. I am using the 404-redirect method to enable permalinks which can be found over at Keyboard Face. This technique should also work for isapi_redirects. All you need to do is replace
    $_SERVER['REQUEST_URI']
    with
    $_SERVER['SCRIPT_NAME'].$_SERVER['QUERY_STRING']

  3. Copy wp-content/plugins/wp-cache/wp-cache-phase1.php to wp-content/advanced-cache.php (not really sure why this isn’t simplified by the author).
  4. Open the standard wp-config.php file and add define('WP_CACHE', true);
  5. Now comes the tricky part:

    open wp-content/plugins/wp-cache/wp-cache.php in your favourite text editor. Search for the wp_cache_add_pages function and change the function code like this:

    add_options_page('WP-Cache Manager', 'WP-Cache', 5, 'wp_cache/wp_cache.php', 'wp_cache_manager');

    The reason the original code doesn’t work is that the original __FILE__ resolves to wp_cache\wp_cache.php which some browser eat and convert to wp_cachewp_cache.php, which doesn’t exist.

  6. The second problem is that WP-Cache checks for installation step 2) in a windows-incompatible manner. Search for the wp_cache_check_link function. Change the first three lines after the variable declaration in this way:

    # if ( basename(@readlink($wp_cache_link)) != basename($wp_cache_file)) {
    # @unlink($wp_cache_link);
    # if (!@symlink ($wp_cache_file, $wp_cache_link)) {
    if (!file_exists($wp_cache_link)) { {

  7. Finally, if you are running an older version of WP-Cache, open wp-content/plugins/wp-cache/wp-cache-phase2.php and search for ob_end_clean(); and replace with ob_end_flush();. Without this change the cached page contents are not written back when the page is initially cached. It’s unclear to me if that works under *nix, I assume it couldn’t. This appears to have been fixed in WP-Cache 2.1.1.
  8. That’s it- you’re done. Now goto Options/WP-Cache and turn caching on.