My organization needed a way to create several types of persistent database-stored logs for our PHP website, where each log entry would record which user was requesting the resource. We decided we would try for a solution that did not require us to do a database insert for every page view, for obvious reasons. Here is what we came up with. Our environment is PHP5 and Apache 2.2.
Read the rest of this post »
Habitat Oregon is an umbrella support organization “created to offer fundraising, public relations, and advocacy support to all 34 Habitat affiliates – the groups of dedicated staff and volunteers building the homes – across our state.” We are proud to support Habitat in Oregon, and to offer our small measure of help by launching the newly retooled habitatoregon.org — with new WordPress-powered content management capability, a blog, and an online forum for Habitat affiliate employees throughout Oregon.
Thanks, Habitat for Humanity of Oregon, for the opportunity to lend a hand!
Flexigrid is a nice lightweight jQuery plugin that turns tables into sortable, searchable, data-driven grids. It’s all ajaxed up to the hilt, like every other jQuery plugin, but it can also create a quick nice-looking grid from a plain ol’ HTML table.
Out of the box, though, its column sorting feature does not work unless your grid is hooked up to a server-side data source. Here is a svn patch that adds this functionality to the current head branch of flexigrid.js:
flexigrid-sort-in-place.diff
This patch is built on the current trunk revision of flexigrid.js, which is r3. I am currently unable to create a patch for the current release version (“1.0b3″), which is slightly different; but to apply these changes to that version is pretty simple, since I only made 3 changes:
- add “sortorder: ‘asc’” to the default properties struct up at the top
- add the “else if (!p.url) this.inPlaceSort();” clause to the end of the changeSort method
- copy in the inPlaceSort() function
A short play in one act.
Nick: <typing carefully>
Nick: <clicks button>
[some time passes]
Internet: “Oh, sorry, no trailing period? I’ll just assume you mean to send this
email to freakin Nepal. MORON.”
According to the documentation for the Ant Tar task, the “implicit fileset” of stuff to be included in your archive can be extended “to allow control over the access mode, username and groupname.” I guess you have to read between the lines (or go with the ol’ trial by error) to find out that not only does the implicit fileset provide no control over these properties of your files, it actively reverts the file permissions to some default access mode (644). Java ftw!
So you are hypothetically deploying your ant-built tar’d up software release. Let’s further say for the sake of argument that it contains some business-critical scripts that must keep their executable mode to be run from cron. Oops, those files are no longer executable! You will soon be disappointed at the failure of your cron job to do anything at all, and you may experience some increased email volume accompanied by mild irritation. If this condition persists, call your doctor, or go back and RTFM again because as the docs imply, this shortcoming can be easily overcome.
Read the rest of this post »