Thats fine what I am saying is your creating some type of personal conditional which is your own coding. If you want to do things like that you would make sure to also code it to work with vbGallery. Our files have THIS_SCRIPT definitions also.
In our program the natural way to ensure forum links are rewrote there are replacement vars in the vbgallery admin area for header navbar and footer. Now stuff outside the forum url you normally want to use full urls to a file so it can be found by everything.