﻿<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Software Development</title>
    <description>Many years I have wanted to post up code examples and things that I have learned. I just have not wanted to write my own blogging software, and I didnt want to use someone elses. </description>
    <link>http://www.badassride.com/Blog/tabid/358/BlogId/10/Default.aspx</link>
    <language>en-US</language>
    <managingEditor>travis@lvfbody.com</managingEditor>
    <webMaster>travis@lvfbody.com</webMaster>
    <pubDate>Mon, 12 May 2008 15:28:04 GMT</pubDate>
    <lastBuildDate>Mon, 12 May 2008 15:28:04 GMT</lastBuildDate>
    <docs>http://backend.userland.com/rss</docs>
    <generator>Blog RSS Generator Version 3.4.0.39853</generator>
    <item>
      <title>Don't think the 1.0.5 module fixed digmeta - try again?</title>
      <description> When I go to open an existing blog, I still get an error Message:          Here is the error message I get:                 I do love how I can embed images into this thing however. That is just amazing!   Travis        Testing the Open -&gt; Edit -&gt; Save :) </description>
      <link>http://www.badassride.com/Blog/tabid/358/EntryID/133/Default.aspx</link>
      <author>travis@lvfbody.com</author>
      <comments>http://www.badassride.com/Blog/tabid/358/EntryID/133/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.badassride.com/Default.aspx?tabid=358&amp;EntryID=133</guid>
      <pubDate>Sun, 13 Jan 2008 06:18:10 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.badassride.com/DesktopModules/Blog/Trackback.aspx?id=133</trackback:ping>
    </item>
    <item>
      <title>Testing DigMeta found on snowcovered</title>
      <description>   Its a little buggy.  I cant edit any existing posts, but I can post new.  I also manage several blogs that exist on this DNN site, and I can use live writer to select between each one of them.  60 bucks is a little expensive for a slice of software that does not work perfectly.   Anyhow, We will continue to report bugs.. Hopefully they find a fix for this.  </description>
      <link>http://www.badassride.com/Blog/tabid/358/EntryID/132/Default.aspx</link>
      <author>travis@lvfbody.com</author>
      <comments>http://www.badassride.com/Blog/tabid/358/EntryID/132/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.badassride.com/Default.aspx?tabid=358&amp;EntryID=132</guid>
      <pubDate>Sun, 13 Jan 2008 00:08:55 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.badassride.com/DesktopModules/Blog/Trackback.aspx?id=132</trackback:ping>
    </item>
    <item>
      <title>Dynamic SQL statments in SQL 2005 -- Stored Procedures</title>
      <description>&lt;p&gt;I decided to throw up some code that I like to use, but hate re-writting.  This is how I do some of the dynamic SQL statements.  If you think there is a better way of doing it, please let me know.  This has worked very well for me so far.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;textarea rows="600" cols="100" class="c-sharp" name="code"&gt;USE 
GO
/****** Object:  StoredProcedure [dbo].[RS_Reservations_Get_List_By_DateRange]    Script Date: 09/08/2007 17:14:28 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
------------------------------------------------------------------------------------------------------------------------
-- Date Created: Tuesday, November 18, 2006
-- Created By:   Travis
------------------------------------------------------------------------------------------------------------------------

CREATE PROCEDURE [dbo].[RS_Reservations_Get_List_By_DateRange]
	@StartDate datetime,
	@EndDate datetime,
	@CompanyID uniqueidentifier,
	@LocationID uniqueidentifier,
	@ReservationObjectID uniqueidentifier
AS

Declare @BaseSQL nvarchar(900)
Declare @WhereSQL nvarchar(900)
Declare @FinalSQl nvarchar(900)

set @BaseSQL = '
SELECT
	[ReservationID],
	[FK_ReserveObjectID],
	[UTC_ReservationDateTime],
	[ReservedMinutes],
	[HoldExpires],
	[Canceled],
	[UTC_Created],
	[UTC_Updated],
	[FK_CreatedBy],
	[FK_CanceledBy],
	[FK_SalesOrderItemID]
FROM
	[dbo].[viewReservationAssociations]
'

/* Set the initial value */
set @WhereSQL = ''

/* Build the rest of the where clause dynamicly */

if @StartDate IS NOT NULL AND @EndDate IS NOT NULL
begin
	if @WhereSQL = ''
	begin
		set @WhereSQL = ' WHERE '
	end
	else
	begin
		set @WhereSQL = @WhereSQL + ' AND '
	end

set @WhereSQL = @WhereSQL + ' [UTC_ReservationDateTime] between ''' + Convert(varchar(20), @StartDate) + ''' AND ''' + Convert(varchar(20), @EndDate) + ''''
end

if @CompanyID IS NOT NULL
begin
	if @WhereSQL = ''
	begin
		set @WhereSQL = ' WHERE '
	end
	else
	begin
		set @WhereSQL = @WhereSQL + ' AND '
	end

set @WhereSQL = @WhereSQL + ' [CompanyID] = ''' + Convert(varchar(40), @CompanyID) + ''''
end

if @LocationID IS NOT NULL
begin
	if @WhereSQL = ''
	begin
		set @WhereSQL = ' WHERE '
	end
	else
	begin
		set @WhereSQL = @WhereSQL + ' AND '
	end

set @WhereSQL = @WhereSQL + ' [LocationID] = ''' + Convert(varchar(40), @LocationID) + ''''
end

if @ReservationObjectID IS NOT NULL
begin
	if @WhereSQL = ''
	begin
		set @WhereSQL = ' WHERE '
	end
	else
	begin
		set @WhereSQL = @WhereSQL + ' AND '
	end

set @WhereSQL = @WhereSQL + ' [ReserveObjectID] = ''' + Convert(varchar(40), @ReservationObjectID)  + ''''
end

/* Create the final SQL string */
set @FinalSQL = @BaseSQL + @WhereSQL + ' ORDER BY [UTC_ReservationDateTime] DESC '

/* Execute the SQL */

EXEC dbo.sp_executeSQL @statement = @FinalSQL

   &lt;/textarea&gt;&lt;/p&gt;</description>
      <link>http://www.badassride.com/Blog/tabid/358/EntryID/94/Default.aspx</link>
      <author>travis@lvfbody.com</author>
      <comments>http://www.badassride.com/Blog/tabid/358/EntryID/94/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.badassride.com/Default.aspx?tabid=358&amp;EntryID=94</guid>
      <pubDate>Sun, 09 Sep 2007 00:19:34 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.badassride.com/DesktopModules/Blog/Trackback.aspx?id=94</trackback:ping>
    </item>
    <item>
      <title>HTML Trick: How to link image from another site that will work when your user is in HTTP or HTTPS mode</title>
      <description>&lt;p&gt; &lt;/p&gt;
&lt;div style="margin: 10px; float: left;"&gt;&lt;script type="text/javascript"&gt;
digg_url = 'http://www.traviswhidden.com/Blog/tabid/358/EntryID/98/Default.aspx';
&lt;/script&gt; &lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;/div&gt;
&lt;p&gt;I have been involved with web design for many years.  Even with 15 years under my belt, I still am amazed when I find something I didn't know. I am not saying I know everything, its just those things that you wish you knew about years and years ago that really get your excitement up.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;The other day, I was looking at the HackerSafe code that my company (&lt;a href="http://www.amhosting.com" target="_blank"&gt;http://www.amhosting.com&lt;/a&gt;) has on its website.  I saw the way they put in an image tag and I was like, "what the heck.. they have a bug in their code".  Before I went crazy, I decided to look at my live production code and noticed that the way they linked the image was the same in their code they were trying to give me.&lt;/p&gt;
&lt;p&gt;So you know what I am talking about... this is what they put in the code: &lt;/p&gt;
&lt;pre&gt;src="//images.scanalert.com/meter/www.amhosting.com/12.gif"&lt;/pre&gt;
&lt;p&gt;Notice how src="//  part for it.  That is where the magic happens&lt;/p&gt;
&lt;p&gt;This is why its important.  This image is located on my company website: (Secure SSL Mode)&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.amhosting.com/MyAccount/UpdateBillingContactInformation/tabid/746/Default.aspx"&gt;https://www.amhosting.com/MyAccount/UpdateBillingContactInformation/tabid/746/Default.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;and the same image code is located on a non https page: (No SSL)&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.amhosting.com/Home/tabid/293/Default.aspx"&gt;http://www.amhosting.com/Home/tabid/293/Default.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The browser actually knows based on what state your page is on what to call to the remote server.   If you didn't have your code like this, it would throw a security error to the end user asking them if they want to show insecure images. Not only does that break credibility, but it also is very annoying between page clicks. &lt;/p&gt;
&lt;p&gt;I know this is a very "small" finding, but it is very useful when building ecommerce sites that link to outside content. I hope you are as excited as I am with this very small find.&lt;/p&gt;</description>
      <link>http://www.badassride.com/Blog/tabid/358/EntryID/98/Default.aspx</link>
      <author>travis@lvfbody.com</author>
      <comments>http://www.badassride.com/Blog/tabid/358/EntryID/98/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.badassride.com/Default.aspx?tabid=358&amp;EntryID=98</guid>
      <pubDate>Sat, 08 Sep 2007 17:35:23 GMT</pubDate>
      <slash:comments>4</slash:comments>
      <trackback:ping>http://www.badassride.com/DesktopModules/Blog/Trackback.aspx?id=98</trackback:ping>
    </item>
    <item>
      <title>Update for DNN module Smart Redirect for 404 errors. New undefined url tracking</title>
      <description>&lt;p&gt;As some of you may know, I recently released a module for DNN that you can use to help redirect your clients to the correct url. This is very handy if you are moving a website to DNN, and dont want to loose your search engine postion links.&lt;/p&gt;
&lt;p&gt;I recently updated my code to support tracking hits to yoru pages that result in 404, file not found codes.   It increments each time they are entered.&lt;/p&gt;
&lt;p&gt;Here is an example of one of my websites I run that used to be written all in asp.  (click ot enlarge)&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.badassride.com/Portals/15/BlogImages/tracking_undefined_urls.JPG"&gt;&lt;img height="337" alt="Undefined URLs in DotNetNuke " width="500" border="1" src="http://www.badassride.com/Portals/15/BlogImages/tracking_undefined_urls.JPG" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As you can see, this is very good information to have so you dont loose valuable clients coming to your website.&lt;/p&gt;
&lt;p&gt;This product can be purchased on SnowCovered for $10 bucks as of today:&lt;/p&gt;
&lt;p&gt;&lt;u&gt;&lt;font color="#810081"&gt;&lt;a href="http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;PackageID=7640&amp;r=7955725ffc"&gt;http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;PackageID=7640&amp;r=7955725ffc&lt;/a&gt;&lt;/font&gt;&lt;/u&gt;&lt;/p&gt;</description>
      <link>http://www.badassride.com/Blog/tabid/358/EntryID/43/Default.aspx</link>
      <author>travis@lvfbody.com</author>
      <comments>http://www.badassride.com/Blog/tabid/358/EntryID/43/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.badassride.com/Default.aspx?tabid=358&amp;EntryID=43</guid>
      <pubDate>Mon, 02 Jul 2007 23:29:24 GMT</pubDate>
      <slash:comments>3</slash:comments>
      <trackback:ping>http://www.badassride.com/DesktopModules/Blog/Trackback.aspx?id=43</trackback:ping>
    </item>
    <item>
      <title>DNN 404 Smart Redirect Added to SnowCovered</title>
      <description>&lt;p&gt;Today I added a 404 redirect module to Snowcovered.  This module is very easy to use and extreamly important to anyone who is moving to DNN from their oldschool website. &lt;/p&gt;
&lt;p&gt;&lt;u&gt;&lt;font color="#810081"&gt;&lt;a href="http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;PackageID=7640&amp;r=7955725ffc"&gt;http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;PackageID=7640&amp;r=7955725ffc&lt;/a&gt;&lt;/font&gt;&lt;/u&gt;&lt;/p&gt;
&lt;p&gt;Let me know if you have any questions or need assistance with it.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description>
      <link>http://www.badassride.com/Blog/tabid/358/EntryID/41/Default.aspx</link>
      <author>travis@lvfbody.com</author>
      <comments>http://www.badassride.com/Blog/tabid/358/EntryID/41/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.badassride.com/Default.aspx?tabid=358&amp;EntryID=41</guid>
      <pubDate>Wed, 27 Jun 2007 05:04:49 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.badassride.com/DesktopModules/Blog/Trackback.aspx?id=41</trackback:ping>
    </item>
    <item>
      <title>How to make custom errors (ie 404 error) files with DotNetNuke </title>
      <description>&lt;p&gt;&lt;span style="font-size: 9pt; font-family: Arial"&gt;I could not find on DNNs website or on Google a way to configure custom 404 pages inside of DotNetNuke.   This was a little frustrating because I just ported over my website with nearly 6000 links (according to Google) and I did not want my viewers to be sent to a page with nothing on it.  &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; font-family: Arial"&gt;So, after thinking about it a little bit, I realized I could do this within IIS specifically for any DNN website.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; font-family: Arial"&gt;Create a new web in IIS and point it to your DNN install. This new web will need to be configured with all the proper host headers (and removed from the old DNN website host header list).  Once you have it up and running, create your new DNN 404 page.  Make it hidden so it does not show up on your menu bar, but is accessible to your visitors.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; font-family: Arial"&gt;Get the URL for this page, edit the properties for your new website, and click on the tab "Custom Errors".   Find the error code 404, and set the absolute path to it (without the http and the domain name).  &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; font-family: Arial"&gt;Test it and it works great! Example:  &lt;a href="http://www.badassride.com/thisdoesnotexist"&gt;http://www.badassride.com/thisdoesnotexist&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; font-family: Arial"&gt;IIS Properties:&lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;img height="458" alt="" width="472" src="/Portals/15/SiteImages/BlogImages/dnn_404example.gif" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
Cons: This creates another memory instance of the worker process so it uses more memory on your server. I would recommend only doing this for your portals that request it.&lt;/p&gt;</description>
      <link>http://www.badassride.com/Blog/tabid/358/EntryID/11/Default.aspx</link>
      <author>travis@lvfbody.com</author>
      <comments>http://www.badassride.com/Blog/tabid/358/EntryID/11/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.badassride.com/Default.aspx?tabid=358&amp;EntryID=11</guid>
      <pubDate>Wed, 27 Jun 2007 04:35:09 GMT</pubDate>
      <slash:comments>2</slash:comments>
      <trackback:ping>http://www.badassride.com/DesktopModules/Blog/Trackback.aspx?id=11</trackback:ping>
    </item>
    <item>
      <title>Smart Redirector Modules for 404 Pages in DNN (DotNetNuke)</title>
      <description>&lt;p&gt;I am working on a hand full of projects where I dont want to send people that come in off search engines to 404 pages.  So I wrote a module this weekend that will take the 404 info (as seen in my other blog about how to create 404 pages), and redirect them to the correct page, without them even being bothered by a notice telling them the file is not found.&lt;/p&gt;
&lt;p&gt;It was a very simple module (as I expected), and so far it looks and works good.  Now I just have to do the hard part... create all the redirects.   I am thinking I will extend the module to record links that were not handled, so mappings could be easly created for them.&lt;/p&gt;
&lt;p&gt;Update: This module is available for purchase on SnowCovered ( &lt;a href="http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;PackageID=7640"&gt;http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;PackageID=7640&lt;/a&gt; )&lt;/p&gt;</description>
      <link>http://www.badassride.com/Blog/tabid/358/EntryID/29/Default.aspx</link>
      <author>travis@lvfbody.com</author>
      <comments>http://www.badassride.com/Blog/tabid/358/EntryID/29/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.badassride.com/Default.aspx?tabid=358&amp;EntryID=29</guid>
      <pubDate>Wed, 27 Jun 2007 03:34:19 GMT</pubDate>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://www.badassride.com/DesktopModules/Blog/Trackback.aspx?id=29</trackback:ping>
    </item>
    <item>
      <title>Lightbox Scrapbook Module 00.01.03 for DNN</title>
      <description>&lt;p&gt;I recently released a new version of my &lt;a href="http://www.snowcovered.com/snowcovered2/Default.aspx?tabid=242&amp;PackageID=7570"&gt;Lightbox Scrapbook &lt;/a&gt;onto &lt;a target="_blank" href="http://www.snowcovered.com/Snowcovered2/Default.aspx?r=7955725ffc"&gt;SnowCovered&lt;/a&gt;.  This weekend I was running a trace on the SQL server looking for issues, and found that the Yahoo Slurp spider did not like the way I was running my scrapbook.  Infact, yahoo was pulling all of the non url friendly urls from DNN for some reason.  This bothers me because I dont want my non-friendly pages that I create in DNN to be listed as Default.aspx?tabid=xxx&amp;etc.  &lt;/p&gt;
&lt;p&gt;Anyhow, I just released a new version last night that uses the DNN API to create the friendly URLs.  It did break the existing URL structure, but this one should be final.&lt;/p&gt;
&lt;p&gt;You can view this scrapbook in action on this website by clicking on "Scrapbook" on the navigation bar.  You will see the LightBox for DotNetNuke in action!&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;</description>
      <link>http://www.badassride.com/Blog/tabid/358/EntryID/40/Default.aspx</link>
      <author>travis@lvfbody.com</author>
      <comments>http://www.badassride.com/Blog/tabid/358/EntryID/40/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.badassride.com/Default.aspx?tabid=358&amp;EntryID=40</guid>
      <pubDate>Tue, 26 Jun 2007 15:19:08 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.badassride.com/DesktopModules/Blog/Trackback.aspx?id=40</trackback:ping>
    </item>
    <item>
      <title>Bug in DNN - URLs that contain default.aspx may get redirected to the default portal</title>
      <description>&lt;p&gt;As I was working on my 404 smart redirector, I found that its possible that users will get redirected to the default portal if they come in off a search engine.  This is bad because say your domain is like mine:  badassride.com  and a user comes to badassride.com/scrapbook/images/default.aspx from a search engine, well, they will get redirected to hjtcentral.com which is my default (0) portal.  Thats not good.  the traffic should stay within the correct domain alias.  I reported it on DNNs website, but I dont know if this will ever get fixed.&lt;/p&gt;
&lt;p&gt;We have found several bugs with copying modules from page to page, where it has some strange effects. The other day, I actually had to go into the database and remove modules from the page with SQL because you just could not delete them.  Thats a whole other post to start, I just dont have time to type that up.&lt;/p&gt;</description>
      <link>http://www.badassride.com/Blog/tabid/358/EntryID/30/Default.aspx</link>
      <author>travis@lvfbody.com</author>
      <comments>http://www.badassride.com/Blog/tabid/358/EntryID/30/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.badassride.com/Default.aspx?tabid=358&amp;EntryID=30</guid>
      <pubDate>Mon, 11 Jun 2007 06:22:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.badassride.com/DesktopModules/Blog/Trackback.aspx?id=30</trackback:ping>
    </item>
  </channel>
</rss>