I have just run these in the install script:
Reinstall the templates.
Reinstall the phrases.
Update your image paths.
But still this has not fixed the error.
I have not changed my file storage method for vbulletin (I take it you are taking about vbulletin and not the gallery system) in ages.
But I did actually end up changing the File Storage Method for the gallery by mistake, but this was actually after the error happened as I was running a few of the maintenance scripts in the admincp for the gallery, to see if any of these would fix the problem.
Any new ideas on how I might be able to fix this?