Intechnic
Users Developers
Home / Forums / In-Portal CMS / General In-Portal Discussions / php in tpl files / Topic Posts

In-Portal Forum

This is a place for users of In-Portal to ask questions, discuss various topics, and interact with other members of the In-Portal Community. Please report bugs through the Bugs Team (not the Forum). If you are interested in contributing or joining one of the many Teams for In-Portal, please check out the Contribute section of the website.
 

In-Portal Forum

php in tpl files (13)


Posted: 12/01/2004 2:54:28 PM

Reply Quoted  


I'm modifying some .tpl files and I noticed that if I try to put in php code.

Such as:


<?php

  include("../stuff.php");

?>



It doesn't render the php, it displays as plain text?

Posted: 12/01/2004 6:03:35 PM

Reply Quoted  


Hello Cory,

Currently, we didn't put such functionality in the parser for a specific reason. This will be done in the future releases.

Thank you.

Posted: 12/02/2004 8:49:14 AM

Reply Quoted  


Any work around? It seems odd that it doesn't work, the tpl is on a php page(index.php). I suppose I could just put the code on the index.php page?

Posted: 12/02/2004 3:04:50 PM

Reply Quoted  


Hello Cory,

Well, the index.php file doesn't exactly parses templates or tags. All parsing is done by In-portal internal parser and currently it is not setup to support PHP code in it. We'll keep in mind that this is something needs to be done, but I can't promise that it will be included in next 1.0.7 release. I sure there is a hack that can be done, but I wouldn't recommend to that way at lease for sometime.

I hope this make sense.

Thank you.

Posted: 12/02/2004 3:34:59 PM

Reply Quoted  


OK I think I understand, there's a hack but not worth messing with it at this time. That's ok, I'll figure something else out. It will be really nice to have the option of inserting PHP code at some point though.

Posted: 04/28/2005 10:36:34 PM

Reply Quoted  


Is there a way to support php in template files yet? Is this not supported in the latest release? I have some php script that can read RSS and would like to use it but anytime I attempt to use it kills the in-portal. Any advice or work-arounds?

Posted: 04/29/2005 9:10:49 AM

Reply Quoted  


Cory wrote:12/01/2004 2:54:28 PM
I'm modifying some .tpl files and I noticed that if I try to put in php code.

Such as:


<?php

  include("../stuff.php");

?>



It doesn't render the php, it displays as plain text?


Hello,

Here is an example how to create your own tag and include it in a templates -
link.

Thanks.

Posted: 04/29/2005 1:32:16 PM

Reply Quoted  


I decided to user a different work-around: i-frames. You may want to offer this as another alternative. You can insert iframes into the template files without any problem.

Example:

<div style="margin-left:20px;"><iframe width="95%" height="300" id="rss" frameborder="0" name="rssfeed" src="otherpage.php" scrolling="auto"></iframe></div>

[Edited By JHaag75 on 04/29/05 1:33:07 PM]

Posted: 05/01/2005 6:24:54 PM

Reply Quoted  


JHaag75 wrote:04/29/2005 1:32:16 PM
I decided to user a different work-around: i-frames. You may want to offer this as another alternative. You can insert iframes into the template files without any problem.

Example:

<div style="margin-left:20px;"><iframe width="95%" height="300" id="rss" frameborder="0" name="rssfeed" src="otherpage.php" scrolling="auto"></iframe></div>

[Edited By JHaag75 on 04/29/05 1:33:07 PM]


Sure, IFRAMEs should work just fine as long as browser on the clent-side supports them.

Thanks.

Posted: 04/04/2006 12:30:49 PM

Reply Quoted  


Hello, is php now supported directly inside tpl files. I tried without luck

Thanks

Pat

Page:  1 2