Last thing I want is to change any core files to distrupt any updates or upgrades. but I have a nice indicator.gif I want to use that looks good with my theme. Of course I could easily replace it in the images/ folder but don't want to do that. I've tried different combinations but can't seem to get it to work. Any suggestions?
I have a matching portal theme to go with my console theme and will share once this is fully complete. Thanks guys!
The main problem is that the URL to this file is hardcoded in most parts of the app... There is no native way to change it.
I see 2 workarounds, but none of them is really good...
1- Manual copy
Manually copy the image to replace the original one. Main drawback of this, is that the file will overwritten during the next upgrade, you will have to manually replace the image again.
2 - Extension setup
There is a mechanism for an extension to do things during iTop's setup, it allows for example to create objects in the database or to add some config. parameters.
You could use this mechanism to copy the file in the /images folder everytime the setup is ran.
The main drawback here is that the /images folder might not be writable by the webserv user (eg. apache, www-data) depending on the permissions you have set. So it could failed and be a known limitation. If you go this way, make sure to use a try / catch or something similar to prevent setup from crashing completely if it can't move the loader in the /images folder.
Hope this helps!
Guillaume
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Last thing I want is to change any core files to distrupt any updates or upgrades. but I have a nice indicator.gif I want to use that looks good with my theme. Of course I could easily replace it in the images/ folder but don't want to do that. I've tried different combinations but can't seem to get it to work. Any suggestions?
I have a matching portal theme to go with my console theme and will share once this is fully complete. Thanks guys!
Last edit: Andrew Myers 2020-10-09
Hello Andrew,
The main problem is that the URL to this file is hardcoded in most parts of the app... There is no native way to change it.
I see 2 workarounds, but none of them is really good...
1- Manual copy
Manually copy the image to replace the original one. Main drawback of this, is that the file will overwritten during the next upgrade, you will have to manually replace the image again.
2 - Extension setup
There is a mechanism for an extension to do things during iTop's setup, it allows for example to create objects in the database or to add some config. parameters.
You could use this mechanism to copy the file in the /images folder everytime the setup is ran.
The main drawback here is that the /images folder might not be writable by the webserv user (eg. apache, www-data) depending on the permissions you have set. So it could failed and be a known limitation. If you go this way, make sure to use a try / catch or something similar to prevent setup from crashing completely if it can't move the loader in the /images folder.
Hope this helps!
Guillaume
Thank you once again for the quick response. I'll just manually replace it, it's not a huge deal as of now.
If you ever publish the extension as public on GitHub or such, I'll make a contribution for the image mechanism 😊
Take care,
Guillaume
sure thing!