Get the first and last days of last month in PHP

Here’s a really simple way to get the first and last dates of last month in PHP using strtotime. This’ll also format the dates correctly to use in comparisons with MySQL ‘TIMESTAMP’ fields! Nifty eh?


$lastmonth = strtotime("last month");
$fromdate = date('Ym01 00:00:00',$lastmonth);
$todate = date('Ymt 23:59:59',$lastmonth);

echo($fromdate.' to '.$todate);

Quickmark – Link Saver Gadget for iGoogle & Gmail

Hey hey, I’m still here, just busy as usual. I’ve got another quick little Google gadget that I wrote to keep track of links that I want to check out but don’t have time when I find them to give them any justice. Since I always have a Gmail window open regardless of being home or at work I wanted something that was persistent across both, and in my face enough for me to remember to click on them.

True to style, I didn’t look for one that already existed, where’s the fun in that? I wrote one myself that works for me!

Essentially, Quickmark is a very cut down version of a task list that builds a list of whatever you’ve typed in the textbox below. It can be just little text strings, or if it starts with “http” it will treat it as a link when it displays in the list. To remove an item, click the “X” on the left of it.

As with most Google gadgets, it will save persistent data to your Google profile so it’s private but safe and will persist across computers. The only thing with this one though is that it uses TWO SEPARATE LISTS if you install it on both iGoogle and Gmail – one set of data for each domain. I call it a feature, because iGoogle will allow much bigger lists anyway and you don’t want them being squished into the gmail sidebar.

To add it to iGoogle and try it out, click this thing:
Add to iGoogle

If you want it to show up on the Gmail sidebar you’ll need to enable the “Gadgets from URL” Labs feature, then add this URL as a gadget:
http://quickmark-gadget.googlecode.com/svn/trunk/quickmark.xml

(Updated 5/5/2011 with Google Code versions of the XML files)

 

Enjoy!

– K

Upgrading Mootools in Joomla 1.5

I had to figure out how to upgrade Mootools from Joomla 1.5’s default, horribly outdated 1.11 to 1.2 in order to use some funky scripts in a new client template today, and after a bit of stress and searching I found this:

http://www.dwightjack.com/diary/2009/02/23/upgrade-mootools-to-v12x-in-joomla-15/

It seems that the admin dropdown menu’s stop working if you just overwrite the old Mootools files, so Dwight has come up with a quick and easy frontend solution to keep the admin section loading 1.11 and allow the template to load 1.2 instead!

Thanks Dwight!

WoW Teambuilder / List Builder

And now, an update! *gasp*

I just finished putting the final little touches on an idea I’ve been kicking around for years. It’s just a little ap to visually build lists (or teams, etc). It’s got no database, no login/username requirements, and a very simple way to save the state of your workspace to come back to later.

The basic idea is that you can add things to the ‘table’ and then move them around as if they were scraps of paper. So if you’re in a WoW guild with 30+ active raiders and need a way to build 10man Ulduar teams, this is here to help you out.

Check it out, I’m pretty happy with it: Kythin’s WoW Teambuilder and Generic List Builder

And ofcourse if you like it enough to want to support my random programming project habbit, you can always buy me a beer!

Wordspinner News

Hiya Wordspinner fans;

I’ve had a couple of emails lately about this little addon, and I do want to put some more work into it (e.g. nesting brackets, and not needing manual code changes to enable it) but I just haven’t had time lately. If anyone out there wants to make some mods to it, you’re welcome to, just send me your updates and I’ll go through SVN hell again to put it on the wordpress server.

Seriously, have they not heard of an FTP server? geez.