The below-linked article is an excellent example of how to use multiple databases in CakePHP, with an eye towards having a production, development and potentially, even more environments with which to work.
Easy peasy database config (Articles) | The Bakery, Everything CakePHP:
Like a lot of developers out there, I use Subversion to keep control of my code and projects, and I also use a different database for development and production. But when using Cake this can be a problem when checking out my code from development to production. Unless I edit my database.php with my production config, the production code would [...]
I’m continuing to work with my CakePHP project and have run across some interesting math problems I thought I’d share that surround ratings and popularity ranking for the site.
The hypothetical new service provides a social network sensibility to local civic participation, allowing users to vote on the importance of issues and comment on them. The ranking system is a simple up-or-down voting system, held in the database as either a 1 or 0, depending on the vote.
So, being a social networking site, it is important to provide some rankings in order for people to know what’s hot and what’s [...]
The last few weeks have been absorbed in some freelance work for a local marketing company, which is a nice change of pace. But that also means I’ve not been able to get at my new pet project in that time, which has been a bit of a downer.
And since that new project is CakePHP driven and I’m only really learning the platform, time away from the project means knowledge lost or at least deeply buried. That makes getting back into it something of a challenge.
And indeed, I took the better part of the last two days figuring [...]
I’d been holding off on upgrading to WPMU version 1.5.1 because I was worried that the extent of the changes from 1.3 to the new 2.5 codebase might be a bit too much for the system without some serious recoding. Turns out, I was about half right. And when I did finally upgrade about a week ago, it was a comedy of errors that forced my hand.
Since I’m on a web host that limits the size of my database, it has ever been a concern that I would hit the cap on my main blog. The Tan-Tan Noodles Flickr Plugin [...]
When I started using FireFox, I discovered something truly amazing (to me at least) in the development world: the idea of separating basic functionality from advanced usage; the idea that a program could be continually improved upon in terms of security and stability without having to add on new features and gadgets, and new gadgets could be added as desired without danger to the core application’s stability. This was something foreign to someone accustomed to downloading the latest Microsoft updates, which always blend fixes with new features in a confusing and often problematic way.
And since working with WordPress, I’ve come [...]
I’ve just completed a new plugin, called the Titles to Tags plugin, which I’m sorta proud of. Basically, it checks the title of your post against a list of ignorable words, and then adds tags to your post automatically out of those words that did not appear on the ignore list. The idea is to automatically create a list of relevant keyword tags for your posts. The nice thing is: since I’ve learned to adopt the WordPress API, I’ve found that writing plugins often becomes a much less complex process.
For example, in this plugin, I have to add [...]
It was with much anticipation and a fair amount of trepidation that I awoke this morning, prepared to upgrade WordPress MU to the new 1.3 version. The new version brings MU in line with the WordPress 2.3.1 codebase, including its new and complex “taxonomy” structure, while also implementing a bunch of MU-specific upgrades. I’ve been looking forward to working with the tagging concepts for a while, now, but upgrading MU is not an easy or entirely clean process.
Because unlike WordPress, you can’t just overwrite files from the old version. Well, you can occasionally, but in this instance, [...]