php

  1. XenFun

    XF 2.x Guide XenForo Widgets System

    Widgets are small blocks of content that appear around the main body of your site. They can contain dynamic content, such a list of users currently online, or the most recent discussions posted on your forum. XenForo ships with a selection of useful widgets and installs with a collection of...
  2. XenFun

    XF 2.x Guide XenForo Cache Support

    For larger XenForo installations, it can be advantageous to define a cache in order to save on processing time and database queries. XenForo has the ability to store and retrieve various data from a cache, which can be configured in your src/config.php file. Supported providers XenForo ships...
  3. XenFun

    XF 2.x Dev Guide XenForo Template Syntax

    The XenForo 2 template syntax is a powerful tool for both developers and forum administrators, giving you complete control over the layout of your XenForo pages. Best practices XenForo tags, by convention, are lowercase. All XenForo tags are prefixed with the xf: namespace. Useful information...
  4. XenFun

    XF 2.x Dev Guide XenForo Criteria

    When XenForo needs to test something (user/page/post...) against some user-selected conditions (criteria), it uses the Criteria system. Some places, where the Criteria system is used: Trophies User-group promotions Forum notices Addons can also use this system. Criteria types Consider the...
  5. XenFun

    XF 2.x Dev Guide XenForo Entities, finders, and repositories

    There are a number of ways to interact with data within XF2. In XF1 this was mostly geared towards writing out raw SQL statements inside Model files. The approach in XF2 has moved away from this, and we have added a number of new ways in its place. We'll first look at the preferred method for...
  6. XenFun

    XF 2.x Dev Guide XenForo Managing the Schema

    We've taken a look at some of the new approaches available for interacting with data. Of course, there are specific circumstances where interacting with the database directly may be necessary. The database adapter The default database adapter in XF2 is based on MySQL and PHP's mysqli extension...
  7. XenFun

    XF 2.x Dev Guide XenForo Add-on Structure

    In previous versions of XF, there were very few standards and conventions surrounding add-on development. We have done a lot to change that in XF 2.0. Let's look at some of the changes: Add-on IDs and add-ons path Each installed add-on must have a unique ID, and this ID dictates where on the...
  8. XenFun

    XF 2.x Dev Guide XenForo Controller basics

    Controller basics At a basic level, Controllers are the code that is executed when you visit a page within XF. Controllers are generally responsible for handling user input and passing that user input to the appropriate place which, generally, would be to perform some sort of database action...
  9. XenFun

    XF 2.x Dev Guide XenForo Routing basics

    Routing basics Within a PHP application, like XF2, we need a way of being able to take a user request for a specific URL, understand which controller, action and what data that URL represents, so that can present the appropriate response to the user. The concept of converting a URL to a location...
  10. XenFun

    XF 2.x Dev Guide XenForo General concepts

    General concepts The following sections go into detail about some of the general systems and concepts you will come across while developing a XenForo add-on. If you are familiar with XenForo 1.x development, then a lot of these concepts will seem familiar to you, though it's worth reviewing them...
  11. XenFun

    XF 2.x Dev Guide Build an XenForo add-on

    Let's build an add-on For some people, getting stuck straight into a project is the best way to learn, and the aim is that in the following sections you will learn how to build an add-on, from scratch. Be prepared; this isn't a simple 'Hello world' type demo. This is actually a fairly...
Top