icecoder/ICEcoder

Icecoder 8 beta - Integration in cms

Closed this issue · 7 comments

Please help.
Since version 8 you've changed the way configs are generated.
In our REDAXO icecoder-AddOn we've made the settings for Icecoder in this way: https://github.com/FriendsOfREDAXO/icecoder/blob/master/config___settings.php
This file will be copied after download of icecoder so that it works with admin rights in REDAXO.

Please could you help us understand what to do to update our AddOn with Version 8?
You now generate domain_specifig setting-files in a new format.

We love icecoder. It's very handy und helps quick fixing of errors on production websites.

Thanks for this cool IDE.

The setting files are kind of similar to before but also modified a little. The global settings are stored in lib/template-global.php:
(https://github.com/icecoder/ICEcoder/blob/master/lib/template-config-global.php) and as you can see, it's now in a serialized format, rather than a PHP array.

Differences to note between old and new:
Now obtained from class: versionNo and docRoot
Removed: codeMirrorDir and devMode

Looking at https://github.com/FriendsOfREDAXO/icecoder/blob/master/config___settings.php#L36-L51 - if you're just looking to provide that, the getConfigGlobalSettings method in thew new Settings class should provide what you need: classes/Settings.php (https://github.com/icecoder/ICEcoder/blob/master/classes/Settings.php)

I'd therefore suggest something like this (untested, but you hopefully get the idea)...

require "classes/Settings.php";
$settingsClass = new \ICEcoder\Settings();

$ICEcoderSettings = $settingsClass->getConfigGlobalSettings();
// and as it looks like you then set the password, update that in the array you've got:
$ICEcoderSettiings["password"] = bin2hex(openssl_random_pseudo_bytes(4));

...probably covers the sort of thing you'd need to change?

@mattpass thanks, I will try and report 👍

Hopefully you're able to make adjustments given the above info - will close issue, let me know if you need further advice.

#953
i was not able to update our addon - please help my friend @staabm

#953
i was not able to update our addon - please help my friend @staabm

Have replied with an example and info - hope it helps.

Thanks

It works nice I've added our code to the index.php and I've generated a global_config.php as you described. 👍🏻
Very nice. Thanks.
https://github.com/FriendsOfREDAXO/icecoder