I am planning on getting my entire site converted to take adbantage VB 4. I have more than 50,000 pages, so basically, I cannot use the global_start hook, since I would have hundreds of files / scripts loading on every page. This would not be good...
I thought about using global_start with one product (php master file), and then using conditionals within the script to decide which file to load. But decided to wait until I get some advice on this. One thing I did notice: If you have a php file loaded with global_start, every VB page may or may not use those variables. For example, I created a PHP script that looked for the last 5 forum posts, used a variable called $threadid. It happens to be that $threadid is also used within VB. So the last threadid that was called within my custom script forced VB to use that variable! All links on the forum loaded my own script's variable $threadid. Is this normal behavior? I did change my variable name to something unique, but I'm getting a little paranoid about this, because I may have more than this variable that is also used by VB.
This is what I plan... Any feedback would be great.
Product Example:
ob_start();
include('Masterfile.php');
$masterfile = ob_get_contents();
ob_end_clean();
vB_Template:

reRegister('customfiletemplate',arra y('loadexternalscripts' => $masterfile));
----------------------------------
Masterfile.php Example:
PHP Code:
if ($_GET['file']=='aboutus'){
include_once "aboutus.html";
}
elseif ($_GET['file']=='otherpage'){
include_once "otherpage.php";
}
----------------------------------
Template:
{vb: raw loadexternalscripts}
The files would then be loaded like customfilepage.php?file=aboutus and Mod-rewrite would do the trick with bringing basic filenames to the request.