YouTube Enabled

With the YouTube craze spreading like a wildfire, last summer (’07) I took some time to enable Noteful.COM with YouTube. Users can now visually depict their thoughts using YouTube videos. The code wasn’t hard and thanks to C.K. Sample’s blog (here), it was even easier…

<object type="application/x-shockwave-flash" data="[INSERT VIDEO URL FROM EMBED CODE PROVIDED HERE]" width="400" height="326"><param name="movie" value="[INSERT VIDEO URL FROM EMBED CODE PROVIDED HERE]" /><param name="FlashVars" value="playerMode=embedded" /></object>

With this code I can also allow users to embed Google Videos as well, this would have to be done soon before I fall behind. More and more video streaming sites are hitting the web that are a must for me. Stage6, for example is on the top of my list. If anyone has any advice on this, please comment. 🙂

UPS WorldShip XML Auto Import

I have a new “UPS WorldShip XML Auto Import” osCommerce contribution if anyone is interested… Its actually a few months old, but I never took the time to blog about it. You can find it here on the osCommerce Addons Website… http://addons.oscommerce.com/info/5519.

This contribution allows you to process your UPS Worldship orders with the click of a link. The links are located in the order’s details page.

Your are required to have: UPS Worldship software that can be ordered free here: http://www.ups.com/orderworldship?loc=en_US, an UPS account to order and use the UPS Worldship software, and a daily UPS pick-up required for use of the software.

Also, you must have UPS Worldship running, specifically… you must have their “XML Auto Import” running. Instructions straight from UPS: http://ups.com/media/en/XML_Technical_Support_Guide_Final.pdf

My future plans for this contribution are:

  • Fancy up the 7 new UPS ServiceType Links, maybe javascript, maybe css.
  • Make it so the User data is entered/configurable thru the osCommerce back admin.
  • It would be nice if tracking number could be read from UPS’s AUTO XML IMPORT output file and inputted in order comment and customer notified.
  • Some of the options are still hard coded into this contribution… ie/ number of packages and anything I haven’t noticed.

Codecs Galore

So you some how downloaded a video from somewhere… and you happen to come across a video that you can’t play. Windows Media Player will give you an error then tells you that it has to close. In the end, if you haven’t already done so… you would have to download the codec for that video.

With all the codec packs out there which do you go with? My favorite one for right now (12/10/2007) is the “K-Lite Mega Codec”. It’ll have pretty much everything you’ll need to play almost any video. You can download it here from http://www.free-codecs.com.

Oh, before you install it, you should really uninstall all other codec packs to keep you system clean. And while you are installing it, I suggest that you choose “Profile 5: Lots of Stuff”, in my opinion its the only way to take full advantage of the “mega pack.” Along the way, the installer might tell you it found broken codec registry entries… just click yes as they recommend.

ASP.net 1.1 Repeater Columns

While writing a script to mass approve posts on a site, similar to deleting all unwanted email using: a repeater (not a datagrid), a checkbox in each indexItem, and a button; I ran into a common problem for many… ASP.net repeaters don’t have columns. I searched the net and visited two of my favorite forums looking for help and came up with nothing…

Here’s my Psuedo/Logic:
1) Load Repeater with list of “UNmoderated” items
2) Put a checkbox inside the repeaters ItemTemplate
3) Add code to button (dosomething if checkbox is checked)

Problem:
I couldn’t locate the column with the PrimaryUniqueID because there are no columns in repeaters, but my Stored Procedure “requires” the PrimaryUniqueID.

Button code:
Private Sub MassApprove_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MassApprove.Click
Try
Dim MyRptItem As RepeaterItem
For Each MyRptItem In MyRepeater.Items
Dim chbxMassApprove As CheckBox = CType(MyRptItem.FindControl(“chbxMassApprove”), CheckBox)
Dim PrimaryUniqueID As String = MyRptItem.DataItem(PrimaryUniqueID) PROBLEMATIC LINE
If chbxMassApprove.Checked = True Then
‘DO THE MASS APPROVE
‘LOOP THRU STORED PROCEDURE
End If
Next
Catch exc As Exception
Response.Write(exc.ToString)
End Try
End Sub

Solution:
I used this as a workaround if this helps anyone…

Front End:
Text='<%# DataBinder.Eval(Container, “DataItem.PrimaryUniqueID”) %>’

Back End:
Dim PrimaryUniqueID As String = ckbxMassApprove.Text.ToString

Use Firefox People


Download Firefox Now!

If you haven’t already… Download the lastest version of Mozilla’a Firefox Web Browser… NOW!!! There are many reasons why you should use it, but by far the best reason is: IT IS SO MUCH FASTER. Along with the speed, it is safer to use, you can extend it, and change its looks using themes. Trust me you’ll notice a difference. What are my suggested extensions?

For the average Jane/Joe: Adblock, Adblock FilterSet.G, PopupSound, Stop AutoPlay, & Vista-Aero

For the developer in you: FireFTP, Web Developer, & Firebug

Code Commenting

I recently took full control of a clients website.  And as I was doing a few requested changes, I kept running into coding difficulties.  My main problem was that I had to spend a substantial amount of time figuring out what was changed for what reason.  If not do it for the next webmaster :), do it for yourself… comment on your coding. A nicely documented page of code will always be read twice as fast!

Useful information

By default the osCommerce team have put some very useful information regarding your shop’s order on the admin index page (no longer used in osCommerce RC1)…

os_useful_1.gif

But once we pass this page, that useful information is gone. So I did a little editing… the end result is everywhere within a shop’s admin section you’ll have access to that information…

os_useful_2.gif

The modification is very simple. It is now a contribution on the osCommerce website, here.

Alexa Ranking

I have been evaluating Noteful.COM’s Alexa Ranking and notice that it changes drastically from time to time.  Why is this happening?

My professional guess… It is because very few people actually install the Alexa Toolbar.  How do I know this?  Remember… I am a system administrator.  I have seen my share of “other people’s” systems.  People generally use the default MS IE without any addon toolbars.  For more savvy people, they use FireFox which doesn’t support Alexa.

My current opinion of Alexa is if Amazon (Alexa parent company) doesn’t do something to get more people caught onto it’s Ranking System soon it will be too late.

ASP.net Paging

So, the users of a certain website of mine have been requesting that I add paging to one of my controls. I initially didn’t want to do it, not because I couldn’t do it. But because the control didn’t really call for it. But they are my users, without them the site wouldn’t be there right? So I went ahead with it. Its been a while since I used any paging code, so I was refreshed after reviewing ASP.net paging webcontrols:

System.Web.UI.WebControls.PagedDataSource

What we have to do for us to paging through our data vs. displaying all of it at once? We simply inject the paging into our data before displaying it. In my case, I am using a repeater:

'get the data
Dim myData As System.Collections.ArrayList
myData = ** myStoredProcedure **
'ensure there is data to work with
If myData .Count > 0 Then
'create a new instance of PagedDataSource
myPagedDataSource = New System.Web.UI.WebControls.PagedDataSource
'set my pagin preferences
myPagedDataSource.DataSource = myData
myPagedDataSource.AllowPaging = True
myPagedDataSource.PageSize = 5
myPagedDataSource.CurrentPageIndex = myCurrentPageIndex
'then finally bind the data to my repeater
myRepeater.DataSource = myPagedDataSource
myRepeater.DataBind()
End If

Quite simple to use. Knowing that the webcontrol is there really is the hard part of it all.

Cheap Linux Hosting

Below are my recommendations for cheap reasonable, reliable website hosts:

Lunarpages.com
+ Affordable Plans ($6.95 monthly)
+ Decent Support
+ Linux and Windows Hosting ($8.95 monthly)
++ (10) Free Addon Domains
++ WHM (web hosting manager)

Siteground.com
++ Affordable Plans ($5.95 monthly)
++ Excellent Support
– Linux Only Hosting
– – Only (1) Domain

Hostgator.com
+ Affordable Plans ($6.95 monthly)
+ Decent Support
– Linux Only Hosting
++ Good Reseller Plans
++ WHM (web hosting manager)

Godaddy.com
++ Dirty Cheap Hosting ($3.99 monthly)
– – Poor Service
– No cPanel
++ Up-to-date Software

Please note that it really depends on what your goals are and what you need your site to do. Give me a ring if you can’t decide or need help.