Hey!
I am trying to insert my own PHP codes on a custom page. I am adding the callbacks but it never works... Its what I did:
1) Created a directory as named TestCallbacks and put an index.php inside this directory.
(Full path: /var/www/vhosts/example.com/httpdocs/library/TestCallbacks/index.php)
2) index.php codes:
PHP:
<?php
class TestCallbacks_index {
public static function getHtml(){
echo 'hello';
// tried return 'hello'; too and not worked
}
}
3) When I am trying to write the class name as TestCallbacks_index:getHtml I got error:
Hmm, for XF 2.2 is best practice to place in the controllers folder with a generic name like: /src/addons/my/addon/Controller/page_x.php? Or should I place in another folder like /src/addons/my/addon/callbacks/page_x.php?