Topic: include() within .tpl files?

Hi all!

I'm having a little problem here tongue

I'm trying to use the php function : include() within the file "main.tpl", but it ain't goin' so well yikes

How do i do this?

I want to add a news article within the forum..
cutenews by the way smile

this is what i try to do:

<?php
$number = "4";

include('../news/show_news.php');
?>
But it ain't working at all sad

So, please help me with this...

/linux4me

Re: include() within .tpl files?

http://punbb.org/docs/faq.html#faq3_4

Re: include() within .tpl files?

nope... didn't work at all tongue

Nothing happens...

Any other suggestions?

Re: include() within .tpl files?

There are no other suggestions, that's how you include PHP in the templates.
As the FAQ says, you need to have a script in the include/user directory that does the PHP for you and call THAT script from the pun_include in the template.

Re: include() within .tpl files?

ahh.. tongue

i shall try that smile

Thanks!

Re: include() within .tpl files?

IT WORKED!

Thank you..

*have met my guru* tongue