Jump to content

[IPS4] parse include?


LaCollision

Recommended Posts

Perhaps if you explain what the end goal is it might be easier to advise. It's possible what you are trying to do is better suited to a theme hook

​Thanks a lot Andy for your help.

My needs are very basic: my Invision installation is part of a "regular" website. I just want to include in the globalTemplate some PHP files, that display parts of my website (for instance a "latest news" block somewhere in the template).

With the IPB 3.x {parse include="…"} instruction, I was able to do it very simply, without going too deep in the IP.Board configuration (creating a hook…).

Do you think it is possible with IPS 4 ?

Thanks again,

Link to comment
Share on other sites

Perhaps if you explain what the end goal is it might be easier to advise. It's possible what you are trying to do is better suited to a theme hook

​I did something like that:

{{include('../path/file.php');}}
{$renderedPHP|raw}

With the file.php using a buffer system:

$renderedPHP = "";
ob_start();

include('the-file-i-want-to-include.php');
	
$renderedPHP = ob_get_contents();
ob_end_clean();

 

… but it's not very clean, is it?

>_<

Link to comment
Share on other sites

Thanks Andy, we've also been using the same to include some simple html files that are generated to the shared file system from another system to incorporate some articles. It's good it's a quick and easy thing to do :) 

Link to comment
Share on other sites

  • 10 months later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...