Quote:
Originally Posted by Natch
Sugges insted of hard coding the filename, try using a
Code:
define(THIS_SCRIPT,'attachment_browser');
statement at the top, this way it's easy enuff then to make one filename change, and one file edit for renaming purposes ...
|
Yes, I already use a constant for the name of the file, for things such as the 'navbar'. However, in vBulletin, the templates, and that is what is in play here, are hard-coded to call XXX.php. As an example, search the default template file, vbulletin-style.xml, for 'memberlist.php'.
Still, I suppose there is no reason one could not set $this_script to be referenced by templates. For that matter, one could set it by referencing the PHP global 'SCRIPT_FILENAME''.