Monday, September 12, 2011

Alternative install script for concrete5

I've recently started moving the panto society's website over to concrete5 (the idea being to set up a nice easy to use CMS so that people who aren't me can maintain the website in the future). Overall, I've been pretty pleased with the software; it's certainly the easiest to use php based CMS I've ever used.

So far, I only have one gripe with it: concrete5 insists on being installed into an empty database. This was somewhat problematic for us, as our hosting provider only gives us one database, and I wanted to integrate the forums, etc, from the old site into the new one. I found a thread detailing a few kludgy hacks that could be used to get concrete to install into a non-empty database, and they seemed to work fine; I got everything up and running.

However, it would have been nice if the install script could have taken care of these issues by itself. So, in the spirit of open-source software, I've modified the installer to do just that. My modified script will allow concrete5 to be installed into a non-empty database. If the user attempts to do this, it first checks the names of the tables that are already in the database to ensure that no naming conflicts occur. If a naming conflict is found, it warns the user and refuses to install. Otherwise, it happily installs concrete5 alongside anything else that happens to be living in the database.

To use the modified installer, simply replace concrete/controllers/install.php with the version linked below, and then follow the standard concrete5 installation instructions.

http://dl.dropbox.com/u/1614464/concrete/install.php

Saturday, September 10, 2011

Poll Mod v0.1.2

Another minor release of my poll mod for punBB

Contains a few bugfixes:
  • Poll Admin panel now generates standards compliant html. The old admin panel displays fine in firefox, but not on chrome (I'd only tested on firefox). The new admin panel should display fine on all browsers
  • Improved installation script and instructions. Installation script will now perform the upgrade cleanly if version 0.1.0 or 0.1.1 is already installed.
  • Tested on punBB 1.2.23. Definitely works on all versions between 1.2.16 and 1.2.23 (previously had only been tested on 1.2.16)

http://dl.dropbox.com/u/1614464/robs_poll_mod/robs_poll_mod_0.1.2.tar.gz

Wednesday, September 7, 2011

Small script for fixing mp4box installation

Every time Xulrunner gets updated on my ubuntu box, my mp4box installation breaks. The reason for this is that installing mp4box from source (the only real option, since it's not available in the repositories, at least not on 10.04) requires updating /etc/ld.so.conf by adding a line like
"/usr/lib/xulrunner-1.9.2.22/"
So that mp4box can find and load mozilla's javascript libraries. The problem is that every time Xulrunner gets upgraded, the version number changes, and ld.so.conf needs to be updated again with the new version number. While this isn't actually hard, it is tedious, plus I always have to look up which config file to edit, find out the new version of Xulrunner I've just installed, etc.
It's just slightly irritating.

So I made a script. I saved the following in /usr/bin/mp4boxupdate

#!/bin/bash
sed -i.bak -e "s/\/usr\/lib\/xulrunner-[0-9.]*/\/usr\/lib\/xulrunner-`xulrunner --gre-version`/" /etc/ld.so.conf
ldconfig

Now updating /etc/ld/so.conf is just a simple matter of running "sudo mp4boxupdate"

Of course, the ideal solution would be if mp4box were available in the repositories - then the package manager could do all these updates for us. Until then, I'll just use this workaround.