Tag Archives: web design

WordPress recent posts as JSON

For an update to one of my web projects I went looking for a way to get the recent posts as JSON instead of using the RSS feed. I personally find JSON much easier to deal with than RSS, so … Continue reading

Posted in Programming | Tagged , , | 2 Comments

days_ago function for PHP

Can’t take credit for all of this, but I also don’t remember where the code that I started with came from. days_ago is a function that will take two dates and return a more human friendly version of dates. So … Continue reading

Posted in Programming | Tagged , , | 1 Comment

PHP function to get first n words from a string

A handy little function for your bag of tricks. This PHP function will return a max number of words out of a string, or the whole string if it’s already shorter. This probably could be made shorter, but I was … Continue reading

Posted in Programming | Tagged , , , | 1 Comment

JavaScript version of PHP __FILE__ or __DIR__

This is one of those issues I keep coming back to.  I need a way to get the path of the current JavaScript file.  Something analogous to the PHP __DIR__ constant or dirname(__FILE__). Found something close on Stack Overflow.  The … Continue reading

Posted in Programming | Tagged , , | 2 Comments

When in doubt, restart

Sure, it’s a cliche.  Computer not working?  Restart the sucker.  This time though, it paid off. I just spent the better part of this afternoon working on a JavaScript issue.  I’m using SWFUploader to handle image uploads for a web … Continue reading

Posted in Computers & Internet | Tagged , , | Leave a comment

phpMailer – Could not instantiate mail function

Had a client getting this error when trying to send emails last week and have now spent several hours on Google trying to find a solution. Biggest catch is that other scripts were able to send mail, so it seemed … Continue reading

Posted in Programming | Tagged , | Leave a comment

Safari, scriptaculous, and non-clickable links

For the better part of the last couple of days I’ve been trying to figure out why Safari was not allowing me to click on links. Aside from an annoyance, it’s not good to have clients complaining…

Posted in Programming | Tagged , , , , , , , | Leave a comment

Curved corners script for Photoshop

I’ve been looking for an excuse to play around with scripting in Photoshop. Today I found one. I came across a series of actions that rounded off the corners of an image to get it ready for uploading to a … Continue reading

Posted in Programming | Tagged , , , , | Leave a comment

A routine to create GUIDs in PHP

During development of an online application, I needed a way to generate a GUID. I’m sure there are other, better ways to do this. But, this is how I decided to do it.

Posted in Programming | Tagged , , | 2 Comments