XF 2.1 PHP callback widget integrated with CaRP RSS reader

cwe

Active member
I integrated CaRP RSS reader on my old vB 3.8 forum by creating a plugin with hook location global_start:
PHP:
require_once '/home/<redacted>/carp.php';
CarpConf('maxitems',1);
CarpConf('cacheinterval',60);
...
I then created a simple PHP file module for vBAdvanced that created a news feed module:
PHP:
<tr><td class="alt1"><span class="smallfont"><?php

CarpConf('iorder','link,desc');

echo "<a name='top'></a>";
echo "<h2>News</h2>";
echo "<a href='#f1'>Feed 1</a><br />";
echo "<a href='#f2'>Feed 2</a><br />";
echo "<a href='#f3'>Feed 3</a><br />";
...

echo "<a name='f1'></a>";
echo "<h3>Feed 1</h3>";
CarpConf('maxitems',3);
CarpCacheShow('http://www.feed1domain.com/feed/');

echo "<a name='f2'></a>";
echo "<h3>Feed 2</h3>";
CarpConf('maxitems',5);
CarpCacheShow('http://feed2domain.org/feed');

echo "<a name='f3'></a>";
echo "<h3>Feed 3</h3>";
CarpConf('maxitems',10);
CarpCacheShow('https://www.feed3domain/feed/');
...
I was hoping I could create a PHP callback widget in XenForo that does the same thing as my old vBAdvanced php file widget, but I'm a bit lost on where to start in trying to learn how to create XF PHP callback widgets. There doesn't seem to be a lot of documentation or step by step tutorials for the process.

I didn't see any documentation anywhere that explained if it's possible to initialize CaRP one time like I could in vB 3.8 with a global_start hook. How is that done in XF?

I assume that it's possible to create a PHP callback that essentially returns the same text that my old PHP file module was generating, but I'm not sure how that needs to be structured to fit the class and method format for the XF system. Anyone willing to hold this n00b's hand?
 
Top