TLDR
Active member
Hi!
I am preparing the update of a forum currently running XF 1.5. It has a custom sidebar widget which was implemented by a template modification and a PHP callback.
So the current set-up is:
Template-Mod:
library/mycompany/partner.php:
Now I saw, XF 2.1 has a widget administration builtin where I can manage custom widgets. That's awesome. However, I'm a little desperate on how I would port this code over to XF 2.1.
So what's better, a template callback or a PHP Callback widget? And how would I do this? Where do I put the files? How is XF looking for the files?
Thank you!
I am preparing the update of a forum currently running XF 1.5. It has a custom sidebar widget which was implemented by a template modification and a PHP callback.
So the current set-up is:
Template-Mod:
Code:
<xen:callback class="mycompany_partner" method="getPartnerLinks"></xen:callback>
library/mycompany/partner.php:
PHP:
<?php
class mycompany_partner {
public static function getPartnerLinks() {
return '<a href="https://google.com">Google</a>';
}
}
Now I saw, XF 2.1 has a widget administration builtin where I can manage custom widgets. That's awesome. However, I'm a little desperate on how I would port this code over to XF 2.1.
So what's better, a template callback or a PHP Callback widget? And how would I do this? Where do I put the files? How is XF looking for the files?
Thank you!