PDA

View Full Version : Can php be executed within a template?


trancetopia
01-08-2010, 11:28 AM
I have a function which I need in forumdisplay.php but I need to execute that function from within the threadbit template.

The function will detect the first image in the post and i'm then diaplaying it as a thumbnail so in threadbit I need to put something like:

<img src="<?php echo imagethumb($thread[pagetext])" />

The php context seems to be ignored so wondering if vBulletin ignores direct php code within the template?

I would really appreciate anyone pointing me in the right direction.

Thanks.

Lynne
01-08-2010, 01:38 PM
You will need to use a plugin to execute the php and then pass the results off to the template for output.