AndyB
Well-known member
In Xenforo 1.2 a new tag called <xen:callback> was introduced. This allows calling a php file directly from a template.
Here's an example where banner.php is called.
1) First create an index.php file and put it in the /library/Example/Banner folder
2) Create a index.php file
3) Add this to the ad_above_top_breadcrumb template
Here's an example where banner.php is called.
1) First create an index.php file and put it in the /library/Example/Banner folder
PHP:
<?php
class Example_Banner_index
{
public static function getHtml()
{
include '/home/path_to_file/www/banner.php';
return $output;
}
}
?>
2) Create a index.php file
PHP:
<?php
$output = 'Hello World';
?>
3) Add this to the ad_above_top_breadcrumb template
Code:
<xen:callback class="Example_Banner_index" method="getHtml"></xen:callback>
Last edited by a moderator: