Log in

View Full Version : Insert php somewhere in / near header


DF031
05-21-2013, 03:32 PM
Hi All,

I have created (basically tweaked some available free code) a small quotes database and some php code to retrieve a random quote.

I would like to include that php code somewhere so that the random quote is display here

https://dl.dropboxusercontent.com/u/2287968/Forums/VB6582/here.PNG

or here

https://dl.dropboxusercontent.com/u/2287968/Forums/VB6582/orhere.PNG

Is that possible ?

Thanks in advance for all your help !

ForceHSS
05-21-2013, 03:44 PM
Have you not tried adding it to the header template

DF031
05-21-2013, 04:07 PM
Yes I tried that. No error, but seems the php code is ignored. Or maybe I am doing something wrong ?!

Zachery
05-21-2013, 08:02 PM
You can't use raw php in vBulletin templates. You can check out articles here on vBulletin.org, or in the vBulletin.com docs on how to include external files, or parse your php into a variable for output in a template.

DF031
05-25-2013, 08:16 PM
Thanks for the help Zachery.

I used this technique --> https://vborg.vbsupport.ru/showthread.php?t=242454

Works like a charm !