Here is my problem.
I have a "template manager" that I made in PHP
PHP Code:
<?php
setlocale(LC_ALL, 'fr_CA');
$fn = "/usr/local/www/data/www.quebecphotos.ca/template.html";
$tfile = fopen($fn, "r");
$template = fread($tfile,filesize($fn));
fclose($tfile);
$template = preg_replace("/\[\[DATE\]\]/",strftime("%d %B %Y"),$template);
list($qphotos_header, $qphotos_footer) = split ('\[\[CONTENU\]\]', $template);
?>
It's reading this template:
http://www.quebecphotos.ca/template.html
In the index.php it's working well
PHP Code:
<?php
include "template.php";
echo $qphotos_header;
?>
Here is the content !
<?php
echo $qphotos_footer;
?>
Now.. for vBulletin
I added to the global.php file the following
(Just between the "Start initialisation" and "turn off popups if they are not available to this browser")
PHP Code:
ob_start();
include('/usr/local/ww/data/www.quebecphotos.ca/template.php');
$qphotos_header = ob_get_contents();
ob_end_clean();
ob_start();
include('/usr/local/ww/data/www.quebecphotos.ca/template.php');
$qphotos_footer = ob_get_contents();
ob_end_clean();
I don't know why.. but the $qphotos_footer is empty
$qphotos_header is working fine
You can see that on
http://www.quebecphotos.ca/forum/ There is no custom footer
I made the changes to the header/footer templates by adding this at the appropriate places.. and when viewing the source we can see the <!-- .. --> tags but not the footer..
Code:
<!--// QPHOTOS HEADER //-->
$qphotos_header
<!--// /QPHOTOS HEADER //-->
[...]
<!--// QPHOTOS FOOTER //-->
$qphotos_footer
<!--// /QPHOTOS FOOTER //-->
Is there anything that I am doing wrong ?
My guess is that I'm doing something wrong in the global.php file because I'm not sure if I well understood how to add 'plugins'