XF 2.3 What's new in XenForo 2.3.8?

Although you may be anticipating a XenForo 2.4 HYS, we invested considerable effort in 2.3.8, resulting in new functionality significant enough to deserve its own announcement. XenForo 2.3.8 will be released today!

Retina thumbnails​

To ensure attachments are displayed at a much higher fidelity, especially on high-DPI displays, we now generate two versions of every thumbnail. One which matches the configured size under Options > Attachments as usual and a second which is double that size which is displayed in place of the smaller one on compatible devices, resulting in a better quality viewing experience.

Null coalescing operator (??) support​

To catch up with some of the slightly more recent syntax niceties in PHP we have added null coalescing operator support to XenForo template syntax:

HTML:
<h1>Hello {{ $foo.property ?? $bar.value ?? 'World' }}!</h1>

REST API support for Search​

There are new API endpoints for performing searches and retrieving results. You can read more about the available endpoints in our REST API page.

New xf:addon-list CLI command​


Ever needed a quick view of which add-ons are installed and enabled while on the CLI? Yeah, me too!

Code:
php cmd.php xf:addon-list --help
Description:
  Lists installed add-ons

Usage:
  xf:addon-list [options]
  xf-addon:list

Options:
      --active          Only show active add-ons
      --inactive        Only show inactive add-ons
      --json            Output as JSON
      --verbose         More detailed output

Code:
php cmd.php xf-addon:list
 ----------- ------------------------- --------- --------
  Add-on ID   Title                     Version   Active
 ----------- ------------------------- --------- --------
  XFES        XenForo Enhanced Search   2.3.8     Yes  
  XFMG        XenForo Media Gallery     2.3.8     Yes  
  XFS         XenForo Site              3.10.0    No   
 ----------- ------------------------- --------- --------

 Total: 3 add-ons (2 active, 1 inactive)

New xf-make commands for developers​

Scaffolding your next add-on has never been easier. Use the new xf-make commands to generate common code constructs with ease with much less context switching back and forth from your developer tools and the admin control panel.

Code:
    xf-make:extension    Create a new class extension
    xf-make:finder       Create a new finder class
    xf-make:service      Create a new service class
    xf-make:route        Create a route and optionally its controller
    xf-make:repository   Create a new repository class
    xf-make:template     Create a template in the master style
    xf-make:job          Create a new job class
    xf-make:cron         Create a cron class and register a cron entry
    xf-make:entity       Create a new entity class
    xf-make:controller   Create a new controller class
    xf-make:listener     Create a listener class and register an event listener
    xf-make:phrase       Create a phrase in the master language
    xf-make:cli-command  Create a CLI command class
    xf-make:stub-publish Publish stub templates to an add-on for customization.

You can pass arguments and options in explicitly or, alternatively, all commands default to "interactive" mode with no options passed:

Code:
# php cmd.php xf-make:extension

 What class do you want to extend?:
 > XF\Entity\ForumWatch

 Which add-on is this for? []:
  [XFES       ] XFES - XenForo Enhanced Search
  [XFMG       ] XFMG - XenForo Media Gallery
 > XFMG


                                                                                                                     
 [OK] ClassExtension created successfully.                                                                           
                                                                                                                     

 ----------------- -----------------------------------------------------------------------
  Property          Value                                                               
 ----------------- -----------------------------------------------------------------------
  Extension Class   XFMG\XF\Entity\ForumWatch                                           
  Base Class        XF\Entity\ForumWatch                                                
  File              /path/to/src/addons/XFMG/XF/Entity/ForumWatch.php
 ----------------- -----------------------------------------------------------------------

                                                                                                                     
 [OK] Class extension registered in database.
 
Oh Boy Fan GIF
 

New xf-make commands for developers​

Scaffolding your next add-on has never been easier. Use the new xf-make commands to generate common code constructs with ease with much less context switching back and forth from your developer tools and the admin control panel.

xf-make:extension Create a new class extension xf-make:finder Create a new finder class xf-make:service Create a new service class xf-make:route Create a route and optionally its controller xf-make:repository Create a new repository class xf-make:template Create a template in the master style xf-make:job Create a new job class xf-make:cron Create a cron class and register a cron entry xf-make:entity Create a new entity class xf-make:controller Create a new controller class xf-make:listener Create a listener class and register an event listener xf-make:phrase Create a phrase in the master language xf-make:cli-command Create a CLI command class xf-make:stub-publish Publish stub templates to an add-on for customization.
200.gif
 
# php cmd.php xf-make:extension What class do you want to extend?: > XF\Entity\ForumWatch Which add-on is this for? []: [XFES ] XFES - XenForo Enhanced Search [XFMG ] XFMG - XenForo Media Gallery > XFMG
What happens if there are more than 100 add-ons? A choice sheet? Why isn't there an add-on ID like in other cases?
 
What happens if there are more than 100 add-ons? A choice sheet? Why isn't there an add-on ID like in other cases?

The example shows how you can use the commands interactively but you can pass other arguments and options in based on the thing you're "making":

Code:
➜ php cmd.php xf-make:entity --help
Description:
  Create a new entity class

Usage:
  xf-make:entity [options] [--] <name>

Arguments:
  name                  The name of the entity (e.g. "Demo/Thing:EntityName" or "EntityName" with --addon)

Options:
  -a, --addon=ADDON     Add-on ID (not required if using AddOn:Name format)
  -f, --force           Force operation even if target exists
      --finder          Also create a Finder class
      --repository      Also create a Repository class
      --all             Create Entity, Finder, and Repository
  -t, --table=TABLE     The database table name
  -h, --help            Display help for the given command. When no command is given display help for the list command
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
 
Media Gallery V 2.3.8 isn't coming up in the admin panel. It has offered to update the software, EnhancedSearch add-on but not the media gallery. I tried running the check upgrades and it says there isn't anything else needs updating.
 
Back
Top Bottom