Boo-Yah
As a number of you may know, DPWR is (still) undergoing a long-overdue and much-talked-about-by-me upgrade to the latest version of Invision Power Board and its ancillary components. Among the things being done is a complete overhaul of the Archive and a major upgrade to the Gallery. I’m hoping to automate the Golden KI and make it easier and less tedious to manage and participate. The Library may also see some extra love, but it depends on the time I have after upgrading the Archive – much as I’d love to see the Library flourish, the Archive is what most of the people on the site are there to see.
As you may also know, DPWR integrates the entire site into Invision Power Board’s member database and session tracking classes. I’ve maintained this level of integration between the forum and the site for several years now because I believe it is the best way to provide a consistent experience for the visitor and allows me to create a single site powered by a single database without having to re-invent the wheel too much. Unfortunately, this integration also comes at the price of not just being able to toss up the latest version of the forum whenever a release comes out. The upgrade from 2.0 to 2.1 would have completely destroyed the site integration bridge I had built (okay, “cobbled together” is perhaps a better term), and the delays in completing the new skin as well as the site integration back-end caused 2.1 to become 2.2, and I had to start over again. Finally, I managed to catch up with the release of 2.3, and DPWR is well on its way to being upgraded, hopefully by the end of the month. If not, then by mid-August at the latest. The new Archive component will likely be finished within a week or two, and IP.Gallery is moving toward Release Candidate by the end of this week, and those are the only remaining third-party updates I need to get. Everything else is up to me.
On that note, I decided to undertake the site integration bridge tonight while I waited for final releases of the other components. It’s still something of a hack – essentially I’m copying the forum’s index.php file and removing the parts I don’t need to create a site init file – but I’m being smarter about how I implement it this time. For 2.0, I very crudely hacked on the init file and started throwing code willy-nilly in a fashion that only vaguely resembled OOP standards. This time, I’m being clever about it.
Invision Board, for those who don’t know, includes additional files into its execution through index.php based on the task it needs to perform. With IPB 2.1 and later, these files inherit a base class called ipsclass, which contains all of the skin, session, language, and common control functions to do away with the old method of using global variables. I’ve emulated this behavior by creating each PHP file with a class identical to the name of the file itself (i.e. “index” for index.php, “library” for library.php), including the site init file, and then instantiate that class by stripping the file name out of the PHP_SELF variable. From there I can then pass the ipsclass class into the site’s files without resorting to old-fashioned global variables and messy non-OOP practices.
It’s a fairly simple thing, but I’m rather proud of myself for figuring it out in about 30 minutes.
I would also like to note that I never thought I would see the day when a 23″ widescreen display wasn’t big enough for me, but I’m rapidly approaching that point with the number of text files and browser windows I’m juggling trying to pull this whole mess together.