Development

WordPress Hack to Debug Themes on a Live Site

9 April 2007

How can a WordPress them be debugged privately without showing the wizard behind the curtain to everyone else? This simple hack will use the specified theme only for one remote IP… yours. This can be used when creating a new theme by configuring WordPress to present the original theme and specifying your new theme in [...]

Read the full article →

ZenCart Inventory Report – Updated

10 March 2007

Thanks to Ron for posting a bug back on the Zencart forums about my Zencart Inventory Report Fixed… download… enjoy.

Read the full article →

Google Code Search

9 March 2007

Bad code haunts you forever… Google Code Search

Read the full article →

PHP Error – Parse error: syntax error, unexpected $end in

23 February 2007

Parse error: syntax error, unexpected $end in … on line … Don’t you love it when the line number indicated for an error message is the last line in the file which obviously has no error? I spent twenty minutes on this one last night. Check for unmatched braces, brackets, parentheses or PHP tags. Nope. [...]

Read the full article →

Use PHP Substr() and Strpos() to Split a String

30 January 2007

To split a variable $act like: $act = ‘coupon:edit’; $act = ‘coupon:delete’; $method = substr($act, strpos($act, ‘:’)+1);

Read the full article →

PHP Register_Globals and Register_Long_Arrays

9 January 2007

After upgrading several servers to PHP5 a few older versions of popular applications started giving odd errors. Register_globals has been configured off by default for security reasons since early PHP4. Applications that rely on register_globals all had .htaccess files enabling it for the subdirectory only. The errors we were seeing were similar though, data didn’t [...]

Read the full article →

ZenCart Inventory Report

29 November 2006

Here’s a simple admin report for ZenCart that will generate an inventory report with per product totals and a report total. The report may be paginated or generated over the whole catalog. The report was created by modifying the ZenCart default Products Viewed report. It was created from the ZenCart v1.2x source but has been [...]

Read the full article →

ZenCart Products ID Search

20 October 2006

The ZenCart admin does not allow searching for products by the products_id field. This is the field assigned internally to each product as it is entered by ZenCart itself. Using the Paypal Session Viewer (updated v2 here) to debug recent Paypal issues for a client, only shows the products_id ordered without any additional product information. [...]

Read the full article →

Automating Screen Shots on Mac OSX

26 June 2006

MacWorld published a screenshot automation AppleScript which automatically names the file with the date and time and saves the screen shot in the Pictures folder then opens the image in Preview. The AppleScript works great, so I added an option to add my own names instead of the date and time. Download: ScreenShot.scpt

Read the full article →

MySQL RAND Function To Randomly Populate Table

20 June 2006

MySQL’s RAND() function can be used to set random values or fill a table with random data. The following SQL snippet will change column1 in all rows to a random number 0-50. UPDATE tablename SET column1 = (rand() * 50)

Read the full article →