I've been loving the new Firefox 3.0 release, but missing the hell out of Firebug for Javascript debugging. The seemingly offical firebug web site is a bit out of date. The 1.1 beta version download on their homepage doesn't work and they don't list the newest 1.2 beta release for Firefox 3.0. After a brief search I stumbled across the Firebug 1.2.0b3 release which is the current recommended version for use with Firefox 3.
Sometimes in X-Cart you may want to view something as a specific customer would view it. To temporarily access customer pages as a particular user you need only to be logged in as the admin and then pass the variable $HTTP_GET_VARS['operate_as_user'] to the customer page you are trying to view. So you would just add something like this to the querystring of your requested URL....
&operate_as_user=username_to_operate_as
or if you're trying to be all nice and XHTML compliant you'd use:
&operate_as_user=username_to_operate_as
Not an earthshattering bit of info, but useful to know nontheless.
I just completed a simple X-Cart mod that will let you specify a different default FedEx package type for international addresses in X-Cart. Normally, when using the FedEx Direct integration method with X-Cart you can only specify a package type for FedEx Express and FedEx Ground service. I ran into a situation with a client who needed to specify FedEx ExpressPak as the package type only for international addresses, so I whipped up this simple mod which you might find helpful...
I've been writing a new AJAX based POS system for a client and lamenting the horrible state of javascript array manipulation which has consumed the bulk of my time. It seems that there is a major problem with trying to iterate over arrays with arbitrary numerical indexes. The problem is, there's no good way to iterate over a javascript array to achieve a typical "foreach" type of loop such as what you would commonly do in PHP. One of the best uses for this is to gain access to the name or number of the index for the array element you are currently iterating over so you can use the array index in some kind of programming logic. To achieve this same functionality in Javascrtip, most people use (for...in) loops to "enumerate" the properties of an array. This works if you have created a "sparse array" that contains only numeric indexes, but the problem is that Javascript library creators (Scriptaculous, Prototype, and many others) modify the Array prototype at runtime and add all sorts of properties that get added to your array and end up being enumerated in your for...in loop. This tends to break the hell out of legacy javascript code that relies on for...in to loop over an array. Not cool. Javascript gurus will tell you this is normal behavior and that's what a for...in loop is for, but lazy programmers like me will tell you this sucks because it makes something that should be extremely simple, extremely difficult. Anyway, this article on DHTML Kitchen explains it better than I do. If you're trying to iterate over a Javascript array like you do your PHP arrays, read the article to see why your life is such hell.
Microsoft products are quickly becoming famous for showstopping update problems. I just spent 4 hours trying to fix a .NET problem caused by a failed .NET update, which was in turn caused by a Quickbooks update. It's hard to put either company at the top of my "most hated" list when they both really deserve to share the #1 spot. It's also very hard to believe that massive software installation problems with .NET can sometimes only be fixed by downloading a 3rd party program to do a REAL uninstall of all traces of .NET so you can perform a clean reinstall. Microsoft certainly does nothing to make this an easy task. Fortunately for everyone, there IS such a tool from someone name Aaron Stebner. Check out Aaron Stebner's .NET removal tool which quickly and easily removes ALL traces of ALL versions of the .NET frameworks. Mad props to Aaron Stebner for this incredibly necessary tool!
I did something recently that I'm quite proud of. One day a few months ago, MS Word suddenly started refusing to open or save documents, complaining constantly about not being able to write to my Temp directory. After a couple of weekends of fruitless troubleshooting, the problem had spead to MS Outlook, making the situation critical. I was so fed up with trying to troubleshoot my MS Office installation that I finally just uninstalled it all and installed OpenOffice.org as my general MSOffice replacement and Mozilla Spicebird as an Outlook replacement. I'd been casually using OpenOffice.org for a couple of years, so it was no surprise to me that it could easily replace most of my MS Office apps, especially since I don't generally care about using or maintaining any custom formatting in my Word or PowerPoint docs. Spicebird however, has turned out to be a pleasant surprise.
For those that do not know, the httpd.conf file is that special file on your Apache web server that controls all the fun stuff. It's where you enable modules, set default behaviors for web directories and create your "vhosts" which are the configuration containers that turn your specific web sites on and off. Depending on how your server is set up, you may need to take special things into consideration simply to make edits to this file because some types of servers build this file automagically and will destroy some types of changes. This is apparently true on WHM/CPanel servers. There are certain things you can and can't modify by hand in your Apache httpd.conf file on a WHM/Cpanel based server. The following info applies to Apache 1.3.41 and may not work for Apache2. Some options, such as enabling gzip output compression should be done from the WHM/CPanel apache updater, which will make the necessarry configuration file changes for you after you have recompiled apache with new modules or new PHP options. Sometimes you may need to manually modify the httpd.conf file to customize some things, but if you don't run a few extra commands after you are done, your config changes will be lost the next time apache is recompiled.
If you've ever tried to install the Alternative PHP Cache (APC) on your Linux server, you've probably tried to use the PECL installer and discovered that you just get an error. When this happens you will need to manually compile the module from source and install it yourself. It's actually quite easy, but it's a pain if you don't know how. Here's how it was done on one of my WHM/CPanel based servers. Please note, you may first wish to try the PECL package installer built into WHM, but that has never worked right for me, so below is a list of commands you can enter to install it manually from a root commandline.
Get Your War On: The Definitive Account of the War On Terror 2001-2008
My favorite comic is getting ready to be relased as a single volume. You can preorder now. If you hate the war and love to laugh, do yourself a favor and order this. You can also read all the GYWO comics online for free here.
BBS The Documentary
This is by far the most comprehensive and entertaining documentary I have ever seen regarding the early BBS system. If you're serious about knowing your internet history, or you just want some extra geek-cred, this is your new favorite documentary.
The Nada Chair "BackUp"
The best alternative I have found to overpriced ergonomic office chairs, especially for very low pain around the sacral joint. Works better than my Aeron chair ever did. Also, it comes in navy blue and black, in case you're not into the whole pregnant woman aesthetic (pictured).It's really not meant for sitting on the floor, it's really better for seats that offer poor back support, and works great at sporting events to make sitting in bleachers much more comfortable.
Antec Quiet PC Case
At just under $120 including a 500 Watt power supply, this "quiet pc" case has worked great for me for over 2 years. In fact I now own two great Antec cases/PSUs. For the money, it's hard to beat this combination.