Tribe Support

Tribe Support's Articles

Rastin Mehr

Rastin Mehr

December 25 2016

Updating your custom extensions for Anahita 4.3

As you know we have removed all the Joomla code from Anahita in the 4.3 release and if you have any custom extensions (apps, components, plugins, templates) they need to be updated first before you can update your Anahita installations. 

We no longer have an administration back-end in Anahita. Instead we have added a com_settings component which is where all the app and site configuration is happening. Naturally, the file structure of extensions have been simplified too. We have also removed the xml manifest files and replaced them with json files.

Please Note: this is a live document and will be updated based on your questions.

#upgrade #component #app #plugin #json #configuration #extensions #anahita

Apps and Components

Apps are components that are used directly by the users. Here are the changes that you need to make to your custom components:

File Structure 

Until now the files were organized in site and administrator directories. The site files were used in the front-end and the administrator files where used in the admin backend. Now you can structure your files under the src directory in the same fashion that they are going to be installed on your Anahita installation.

Anahita package file structure in 4.3

On the left you see the old way of structuring the files. On the right you see the file structure in the 4.3 release.

Configuration json file

The config.json files allow you to make your components configurable. Anahita creates custom forms by reading this file. The following is an example of config file in the Connect app 

Loading ...

This will render as a form when you edit an app in Site Settings > Apps > Connect under the Configuration title. To see more example of configuration files, check the other components in the Anahita code repository.

Component json file

Every app must have a component.json file which contains information about the component such as name, description, license, copyrights, authors, etc. The following is the component.json file in the Groups app:

Loading ...

To see more example of component.json files, check the other components in the Anahita code repository.

Plugin json file

Anahita Plugins are using json files too with these differences:

  • the name of the json file is the same as the plugin. For example: connect.json or echo.json
  •  they contain both the information about the plugin and configuration fields

The following is the example of s3.json file for the Amazon S3 plugin. Explore the Anahita plugins on Github so you can see other examples of plugin json files. In the plugins the value of parameters are accessed via $this->_params object. For example $this->_params->access_key and so on. 

Loading ...

Important API changes

Here is how you can access the site settings that are stored in the configuration.php file:

Loading ...

Here is how to access a component configuration:

Loading ...

and also:

JRoute::_( $route ) is now route( $route ) 

JText::_( $label ) is now translate( $label ) or AnTranslator::_( $label )


We aren't using an xml manifest file for templates. Instead there is a template.json file which contains information such as name, description, and parameters. You can see the Shiraz template's json file here:

For the template thumbnail use a 200x200 thumbnail.png file in the root of your template directory.

To access template manager go to: Site Settings > Templates

Nick Swinford liked this

Additional Information

Powered by Anahita