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

AddOn Version ID

mcatze

Well-known member
#3
I wrote a little addon and would like to show the version id of this addon in the template, e.g. "Copyright 2014 v1.01"

Can you give me a little bit more examples, i am a newbie with coding .. ;)

How can i get my addon in {$xenAddOns.addonId} ?
 

Chris D

XenForo developer
Staff member
#4
When you created your add-on in the Admin CP, you gave it an add-on ID and a version string.

Just use {$xenAddOns.addOnId} in the template.

Replace addOnId with your add-on ID.
 

Chris D

XenForo developer
Staff member
#6
You asked for the version ID.

No, that isn't possible unless you cache it separately, or perform a database query to get it.
 

Chris D

XenForo developer
Staff member
#8
Create an option in the Admin CP assigned to your add-on. Make it only visible in Debug Mode. Populate that manually with the version string.

Then you can use {$xenOptions.addOnVersion} in the template.

Replace addOnVersion with whatever the option ID is.

It means you have to do it manually, but unless you write some custom code it's the only way to do it.
 

mcatze

Well-known member
#9
This is an great idea. I think i've seen something likes this in some addons or styles .. Thanks again.

EDIT: You wrote "Make it only visible in Debug Mode". But i can't find this option.
 
Last edited: