• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Friendly XenForo Version ID

nrep

Well-known member
#1
I'm creating a monitoring script for my sites, and as part of that I'm displaying a value for the XF version in a PHP script.

I've found that I can echo XenForo_Application::$versionId, but I get an unfriendly version string: "1020270". Is there a way I can find out the friendly Version ID? i.e. 1.2.2
 

Chris D

XenForo developer
Staff member
#2
A bit primitive and not totally correct and would only work for stable versions:

PHP:
str_replace('0', '.', substr(XenForo_Application::$versionId, 0, 4));