• Welcome to Tux Reports: Where Penguins Fly. We hope you find the topics varied, interesting, and worthy of your time. Please become a member and join in the discussions.

XenFront: A First Look

XenFront 2-21-2017 1128 am.png


There are many ways to replace the front end of a XenForo driven website. To learn more about developing add-ons for XenForo, I've been playing around with a simple add-on with its own templates.

The add-on is far from complete. Below the five WordPress posts will be the latest threads. Below the threads will be links to each of the main website categories.

At this point almost everything is adjusted for a responsive site. I'm not good with CSS but the challenge is worth the enjoyment of building something unique for the site.

Here are the steps I took to create this add-on.

1. Created the directories and files for XenFront.

PHP:
/**
* Class TRN_XenFront_Route_Index
*/
class TRN_XenFront_Route_Index implements XenForo_Route_Interface
{
   /**
    * @param $routePath
    * @param Zend_Controller_Request_Http $request
    * @param XenForo_Router $router
    *
    * @return XenForo_RouteMatch
    */
   public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
   {
      return $router->getRouteMatch('TRN_XenFront_ControllerPublic_Index', $routePath);
   }
}

PHP:
/**
* Class TRN_XenFront_ControllerPublic_Index
*/
class TRN_XenFront_ControllerPublic_Index extends XenForo_ControllerPublic_Abstract
{
   public function actionIndex()
   {

      $viewParams = array(

      ); // Pass variables to template

      return $this->responseView('TRN_ViewPublic_Index', 'trn_xenfront', $viewParams);

   }
}

2. Created the add-on in the XenForo ACP.

XenFront Add-on ACP Settings.png


3. Created template files.

XenFront Templates.png


4. Created the Route Prefix

XenFront Landing Route Prefix.png


5. Adjust the CSS.

6. Export the xml and create the .zip file for uploading to the site.

7. Install.

Outstanding Issues

The biggest issue is the CSS. The "Keep Reading" is overlapping. There are also issues with the top row of text below the font-awesome icons.

Let me know if you'd like to try out the add-on. You might use it as a starting point for your own project or simply laugh at the simplicity.
  • Like
Reactions: robru

Blog entry information

Author
LPH
Views
1,831
Last update

More entries in General

More entries from LPH

Top