Radi
Member
Hi,
I am working on an add-on that will integrate SilverPop with XenForo.
That is my first add-on, so please bear with me.
By reading the how-to's, I was able to add links to the account sidebar, but am having a hard time finding information on how to add a view and route to it. I have experience with CakePHP, but XenForo is very different MVC.
I am linking users to - /index.php?account/email-preferences and need a way to display my page(view) when a user goes there.
Any help is welcome!
EDIT: Here is my code:
/SilverpopIntegration/Listener/LoadClassController.php
/SilverpopIntegration/Index.php
Now when I reload the account page I see this message:
Fatal error: Class 'SilverpopIntegration_Index_ControllerPublic_Account' not found in W:\var\www\html\www.xenforo.localhost\library\XenForo\FrontController.php on line 442
I am working on an add-on that will integrate SilverPop with XenForo.
That is my first add-on, so please bear with me.
By reading the how-to's, I was able to add links to the account sidebar, but am having a hard time finding information on how to add a view and route to it. I have experience with CakePHP, but XenForo is very different MVC.
I am linking users to - /index.php?account/email-preferences and need a way to display my page(view) when a user goes there.
Any help is welcome!
EDIT: Here is my code:
/SilverpopIntegration/Listener/LoadClassController.php
PHP:
<?php
class SilverpopIntegration_Listener_LoadClassController {
public static function extendControllerPublic_Account($class, array &$extend) {
if ($class == 'XenForo_ControllerPublic_Account') {
$extend[] = 'SilverpopIntegration_Index_ControllerPublic_Account';
}
}
}
/SilverpopIntegration/Index.php
PHP:
<?php
class SilverpopIntegration_Index_ControllerPublic_Account extends XFCP_SilverpopIntegration_Index_ControllerPublic_Account {
public function actionEmailPreferences() {
// code...
}
}
Now when I reload the account page I see this message:
Fatal error: Class 'SilverpopIntegration_Index_ControllerPublic_Account' not found in W:\var\www\html\www.xenforo.localhost\library\XenForo\FrontController.php on line 442
Last edited: