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 are components that are used directly by the users. Here are the changes that you need to make to your custom components:
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.
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.
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
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.
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:
To see more example of component.json files, check the other components in the Anahita code repository.
Anahita Plugins are using json files too with these differences:
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.
Here is how you can access the site settings that are stored in the configuration.php file:
Here is how to access a component configuration:
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: https://github.com/anahitasocial/anahita/blob/master/src/templates/shiraz/template.json
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
Powered by Anahita