Okay, worked this out for myself. I have a number of other mods added to my vBulletin installation including the excellent GARS (http://www.thevbgeek.com/geekmart.ph...ayproduct&id=3
) mod. It would appear GARS also adds a number of new phrases and uses the phrasetypeids 577, 578 and 579. This causes problems when installing vBGallery because it tries to insert it's own phrasetypeids with these same IDs.
What I did to overcome this was hack the vbagallery_install.php file so that it utilises phrasetypeids 580-584 instead. I then un-installed my first attempt at the vBGallery and then ran the install a second time - it worked just fine. My vBGallery is now up and running perfectly.
Would it not make sense to check to see what phrasetypeids are in use before inserting new ids into this table? As using hard coded values like vBGallery currently does is always going to cause problems as I'm sure GARS isn't the only vBulletin mod out there that tries to use these phrasetypeids.