I have closed this thread because it became too long. vBulletin sometimes uses loads of memory because of this.
This thread is continued here
This thread is continued here