How to configure Sidekick
First, you need to subscribe and download Sidekick from this page.
Then install it on your Joomla site using Joomla Installer Manager, just like other Joomla extensions. Please note that Sidekick only supports Joomla 3.x and 4.x the latest version is always preferred.
After successful installation, you can access Sidekick in Joomla backend via menu Components → Sidekick.
After that, you can go to Sidekick's Configuration and make your desired option by clicking the Options button on the right side of the navigation bar.
1.How to use Source Tree
Source Tree is a simple yet powerful file manager, it does not include too many features as another advanced file manager, therefore, it works faster and more efficient.
Source Tree allows you to browse files and directories in your Joomla site, it also allows you to perform actions on files and folders like:
- Editing
- Downloading
- Uploading
- Renaming
- Deleting
- Compressing
One of the strongest features of Source Tree is the code search which allows you to search through all files and folders in your Joomla site, it is helpful when you develop or debug your online Joomla site where your advanced text editor or IDE is almost useless.
You can also edit code/text files directly via Source Tree by clicking on the file in the left side and the file will be opened in the right side, supported files will have syntax highlighting for an easier read and follow.
2. How to use variable dumping feature
Do you still debug your online site with var_dump or echo statements? Or do you find it time to consume to set up xdebug on the online site? Let forget all of them and start using Sidekick variable dumping for debugging remotely in a clean and new way with the help of Chrome’s PHP Console extension, more details can be found in our tutorial.
To use this feature, first, you need to install "PHP Console" for Chrome browser (it is only available for Chrome at this moment).
Then the usage is simple, just open a Joomla file that you want to debug (you can open it with Source Tree or with any programs), then instead of using var_dump, echo or var_export… you can just use Sidekick special function call: skDebug(), this function has 01 required parameter which is the variable that you want to debug.
In this tutorial, we will edit file /components/com_solidres/solidres.php as an example, then insert this after line 15: skDebug($controller);
To see it in the front end, you need to go to front-end, sign-in as Joomla super users (debug info is only available for super users) & open the Chrome Console, then you will be able to see the output of this function call.
This debugging method is clean and clearer than traditional methods, you don’t need to output sensitive info in your live website, it also does not interrupt your output and does not break AJAX calls when debugging.
3. How to use log rotation feature
Logging is an essential element for a website, it is used for debugging and management purpose. In most cases, a log file is a simple text file which stores necessary information in a simple format. For a website that has much activity to be logged, the administrator often encounters the following problems:
- Log file size goes too big and it uses too many spaces, it is an issue with size limited VPS or shared hosting or even a dedicated server. But it is not easy to know because log files are one of the files that get less attention from administrators.
- Backup: it is also a waste of space to store a log file with 2 or 3 years of information in it because you rarely need to access information that far. In such case, we should just delete that log file or backup it and store it locally or somewhere else. But it lacks a mechanism to do that automatically and efficiently, especially for Joomla site.
Sidekick’s log rotation feature is an answer for these two problems. First, Sidekick provides a UI to show all of your Joomla log files in one place so that you can always keep an eye on them (size, date) easily. Second, Sidekick allows you to rotate a log file when it reaches certain thresholds that you defined (for example it is X days old or the file size exceeds X megabytes) by performing one of the following actions:
- Delete: just simply delete that log file
- Compress & store: a text log file has a high compress ratio therefore if you don’t want to delete it, you can choose this option so that it can be compressed, renamed and store in-place.
4. How to use the quick button to toggle development mode
Are you tired of having to enable Joomla Debug System, then change the Error Reporting and disable the Joomla Cache each time you want to debug a Joomla site, then revert all of them when you are done? Let Sidekick simplifies them for you with just one click.
5. How to use module backup/restore feature
If you have to work on multiple Joomla templates in a single Joomla site, each template has different module positions system, you will find it is a nightmare to adjust the module positions each time after you switched your template. The Sidekick can back up the modules for each template and restore them with just one click, it makes working with multiple Joomla templates a lot easier than before.