![]() |
Including header/footer from filesystem and NOT templates?
Hi,
I am running Smarty on my site, which has caused me some headaches integrating with vBulletin. My solution is that I've automated the publishing of these header/footer Smarty-coded files and parse them through Smarty into HTML files (w/ a few vBulletin variables) that vBulletin should be able to import. Obviously I don't want to copy and paste this resulting file into the header/footer DB templates because these will change, and I only want to make header/footer edits in one place. I've seen the threads with adding a new template for sidebar and the like, but these don't really address my problem of needing to replace the header/footer via the filesystem. What is the best way to do a PHP-style include for these headers/footers that contain vBulletin variables which themselves need parsing? Thanks! So a crude start is the "parse_templates" hook. This example is for replacing the template "headinclude" with an external file that gets eval'ed by vBulletin. Code:
$fd = @fopen( $file_to_include, 'rb' ); LMK if there are any obvious perils to doing it this way, or if there is a better way. |
All times are GMT. The time now is 05:02 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|