Grabbing the session activity to use in your add on focuses on the SessionActivity from the repository.
/** @var SessionActivity $activityRepo */
$activityRepo = XF::app()->repository( 'XF:SessionActivity' );
$activityRepo->updateSessionActivity(...
XenLate is a simple widget showing the latest WordPress blog posts on a XenForo 2 installation.
This is my first add-on for XenForo 2 and plan to write out a tutorial on how the add-on is built. The work took approximately 14 hours from start to finish. Most of the time was spent reading the...
Displaying a widget included with XenForo 2 is one line using templater() and renderWidget.
echo \XF::app()->templater()->renderWidget('forum_overview_members_online');
The identifier is the Widget key found in the admin panel -> Appearances -> Widget. The 'forum_verview_members_online' is the...
In XF2, three lines are required. Create a file named connectXenForo2.php and add the following contents.
<?php
/** @var $fileDir */
$fileDir = '/Absolute/Path/To/xf2';
require( $fileDir . '/src/XF.php' );
\XF::start($fileDir);
$app = \XF::setupApp('XF\Pub\App');
$app->start();
Now create...
LPH is working on lesson plans. He will be available during his breaks. The next break is the middle of June 2024.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.