The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hi there,
I'm integrating vBulletin into some of my existing site templates - how can I replicate the following simple php code within a vBulletin template (header), as I can't use raw php in a template can I? Code:
<?php echo date('m'); ?> Phil |
#2
|
|||
|
|||
![]()
make a new plugin for the header and do something like
$mydate = vbdate(); and in your template <div>$mydate</div> check the API for the syntax for vbdate() If the vb4 template echoing out is different, i wouldn't know. never bothered to look at it. I remember though it might be like <vb:raw $mydate> or something. |
#3
|
|||
|
|||
![]()
Thanks, following your suggestions this seems to work:
Made a new global_start plugin as so: Code:
$mymonth = vbdate('m'); vB_Template::preRegister('header',array('cssdate' => $mymonth)); Code:
{vb:raw mymonth} Phil |
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|