Add PHP to your Templates (Trick)
First of all, let's make clear something. Yes, (unfortunatelly) vBulletin does not allows PHP in templates. But don't stuck on this. Extend your imagination. "If you can't go left, go right. Just don't stand" :)
The solution for this problem is much more easier than you can think. "If you can't add PHP in the templates, add templates to PHP" :) You just need a "echo" command in your PHP file. Yes it's so simple, the result will be exactly what you want, and most important, you can use vboptions, vbphrases, datamanager and everything you want. 1.- Create a template for Header: HTML Code:
<template name="php_header" templatetype="template" date="" username="" version=""> Remark: If you want to make use of vB sidebar in your page, you must add within head section: HTML Code:
<script type="text/javascript"> 2.- Create a template for Footer: HTML Code:
<template name="php_footer" templatetype="template" date="" username="" version=""> Code:
// Header Block Code:
// Footer Block Hope that this short tutorial will be useful to those who have stuck with this vB limitation. I love to use the Smarty template engine with PHP. |
That is a way I searched for a lot!
Thanks Nick |
For What?
|
Quote:
|
All times are GMT. The time now is 02:22 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|