[thelist] How to insert php script in Invision Power Board

Kirill Voronin k.voronin at e3internet.com
Fri Dec 23 07:27:25 CST 2005


Hi!

Very big cheers and respect to Brian Cummiskey [Brian at hondaswap.com]!

I've inserted some code in the wrapper.

Now it works.

Voronin Kirill
web-developer, e3internet Ltd,
k.voronin at e3internet.com
icq: 284462197

-----Original Message-----
From: Brian Cummiskey [mailto:Brian at hondaswap.com] 
Sent: Wednesday, December 21, 2005 5:35 PM
To: k.voronin at e3internet.com; thelist at lists.evolt.org
Subject: Re: [thelist] How to insert php script in Invision Power Board

Kirill Voronin wrote:
> Hi!
>  
> I need insert (some kind of php-include) the php script (news) in the
> Invision Power Board. 
>  
> I’ve already tried to insert php script in the template but this doesn’t
> work. 
> Probably because it isn’t interpreted in this case.

Right.  php is not parsed by the template engine.  Not only is this more 
secure, it makes their caching method more efficient.  IPB's PHP code 
reads in the skin bits as though they are ASCII text files. It does lots 
of database queries and then does searches and replaces on the skin 
files to produce the final HTML which it then sends to the browser.
So you see IPB does not PHP 'include' the skin files. And because they 
are not included, any include statements that you put into them cannot 
be handled. They are treated as straight ASCII text.


If you are looking for something like:

<?php
	include(news.php);

?>

The good news is, that they created a method to include php files. 
However, this code block ONLY works in the board wrapper.  The 
individual template bits will not work.

<!--exec.file='news.php'-->
or
<!--exec.url='http://www.domain.com/news.php'-->

Throw it in your board wrapper template somewhere useful.

If you need it to show somewhere else, my suggestions is some CSS 
positioning.

GL

-Brian

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.2/208 - Release Date: 20/12/2005
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.5/212 - Release Date: 23/12/2005
 




More information about the thelist mailing list