Is the gallery standard feature for vbportal? If it is you may want to try asking it there, or if it is a seperate addon, you may want to try asking the author, but it seems you make a modification to something, I really don't know what, because Im not familiar with barely anything hehe.