PDA

View Full Version : how to include php in bbcode


Vowgaming
01-19-2011, 01:52 PM
Im trying to setup a new bbcode hour,minute,second,month,day,year
this will then grab users timezone and show the correct date and time according to their time zone

You would have to put the information into the bbcode above in GMT time

Now havent played with bbcode much and only a hack at php programming

I have tried placimg the following code in the replacement but does not seem to work

<?php
$input ="{param}";
$offset=$vbulletin->userinfo[timezoneoffset];
$strs = explode(',',$input);
$hrs=$strs[0]+$offset;
$date1=mktime((int)$hrs, (int)$strs[1], (int)$strs[2], (int)$strs[3], (int)$strs[4], (int)$strs[5]);
print date("D, F jS Y g:i a",$date1) . "<br>";



Can someone give me some advice before I pull all my hair out