custom theme not working
-
If I copy the bootstrap.php file over to custom_template and rename it to custom.php and then change the setting to template = "bootstrap" in the conf.php
I followed steps from here
https://docs.cloudron.io/apps/privatebin
https://github.com/PrivateBin/PrivateBin/wiki/Templates#creating-templatesjs files and css still are loading from the original source and should work.
I am not sure, why the main area is gone…restarting the app has no success.
-
I found a solution…
It is crucial to use the bootstrap.php file which is provided in the docker! so you have to go in the terminal and go to
/app/code
and use the template from there for your custom theme.I am not sure, if it is a good solution to copy past the whole PHP file… for some markup changes, because then no updates will be applied… would be better if we could work with twig and change just the template, but this is of course no cloudron issue
-
If the theming requires to change much of the actual app code, then I don't think this can be made to work update wise in a sane way. Any update of the app business logic would either break or replace the theming done.
In my opinion theming of app UIs can only be supported if the app has built a (ideally stable) framework or API for this, otherwise it is just a matter of time if it breaks. -
@nebulon In the end I had the same thoughts…
maybe here https://docs.cloudron.io/apps/privatebin/ it the info could be added about the PHP files, that it is not recommended due the fact, that it may break after an update. would maybe help others too!
thx! -
@nebulon I believe @Grienauer is talking about these PrivateBin templates. I actually didn't know these existed but was able to switch themes easily by simply updating the
/app/data/cong.php
file and setting thetemplate
variable to one of the ones listed on the Github page. -
@thetomester13 yes. it is about the privatebin templates, but I think it is also tricky to update these because hash-check-values for js files etc… I tested it and they will now be picked up.
I checked it now. after a new update, it is already broken. a custom theme should also have the js hash numbers to verify and after an update these (or something else changes and the new template does not work any more. so custom themes are not a good idea in the actual state of the module, how it works now. someone has to dig deeper into it to find maybe a proper solution. for now I would say, it is not a good idea to do so, like nebulon suggested already and I have now the proof for that