hutch2323
New member
Hello,
I'm new to Xenforo 2.0 and clearly there are some changes. I'm simply trying to get a "Hello World" string to be written on my node page, from a .php file. Currently, I have a Test.php file located in the \src\addons\XFP directory. This is the code used in Test.php:
On the node page, under the Template HTML section, I have the following:
Finally, the PHP callback is:
XFP\Test::getHtml
However, when I save and go to the node on my website, "Hello World" is nowhere to be found (see below). What am I doing wrong? Am I missing something in the .php file or under the Template HTML section?
I'm new to Xenforo 2.0 and clearly there are some changes. I'm simply trying to get a "Hello World" string to be written on my node page, from a .php file. Currently, I have a Test.php file located in the \src\addons\XFP directory. This is the code used in Test.php:
PHP:
<?php
namespace XFP;
class Test{
public static function getHtml(){
$output = 'Hello World';
return $output;
}
}
?>
On the node page, under the Template HTML section, I have the following:
HTML:
<xen:callback class="\XFP\Test" method="getHtml"></xen:callback>
Finally, the PHP callback is:
XFP\Test::getHtml
However, when I save and go to the node on my website, "Hello World" is nowhere to be found (see below). What am I doing wrong? Am I missing something in the .php file or under the Template HTML section?