Closed vmario89 closed 4 days ago
i have PATH_PREFIX='/' and the config-site.php is not read this way. Means the changed i applied in /etc/config-site.php do never apply because this config overrides it. I think thats not the wanted behaviour
okay, but how to deal with customizations in custom-settings.php for the BRANDING_* settings then? the only way i have right now is changing the settings directly in /var/piler/www/config.php
that file gets overwritten by each project compilation to be updated properly by default
Ehh, you are right, I see your point now. This is the catch 22. You need to defer all PATH_PREFIX related values until you read PATH_PREFIX from config-site.php, however after that you can't override them. I think I'll revert my original PR, and document it that if you changed PATHPREFIX, then you need to fix BRANDING*, etc. variables that depend on it. Give me a little time to think about it. @th-2021 what do you think?
I think we can leave both JS_CODE and CSS_CODE as where they are now, because it's unlikely that you want to override them.
We need to move up the following:
However, I'd rather leave these below after we read config-site.php, unless you want to customize them as well:
Would it be an option to introduce customization variables that give combined with path_prefix the $config variable?
E.g.
config.php.in:
$cust['ICON_FILE'] = 'assets/images/fileicons/file.png'
config-site.php: $cust['ICON_FILE'] = 'assets/images/fileicons/myfile.png
Behind inclusion of config-site.php: $config['ICON_FILE'] = $config['PATH_PREFIX'] . $cust['ICON_FILE']
Am 22.08.2024 um 19:17 schrieb jsuto:
I think we can leave both JS_CODE and CSS_CODE as where they are now, because it's unlikely that you want to override them.
We need to move up the following:
- BRANDING_FAVICON perhaps without $config['PATH_PREFIX']
- SITE_LOGO_LG
- SITE_LOGO_SM
- all the BRANDING_* variables
However, I'd rather leave these below after we read config-site.php, unless you want to customize them as well:
- $config['ICON_DOC'] = $config['PATH_PREFIX'] . 'assets/images/fileicons/doc.png';
- $config['ICON_XLS'] = $config['PATH_PREFIX'] . 'assets/images/fileicons/xls.png';
- $config['ICON_PDF'] = $config['PATH_PREFIX'] . 'assets/images/fileicons/pdf.png';
- $config['ICON_IMAGE'] = $config['PATH_PREFIX'] . 'assets/images/fileicons/image.png';
- $config['ICON_FILE'] = $config['PATH_PREFIX'] . 'assets/images/fileicons/file.png';
— Reply to this email directly, view it on GitHub https://github.com/jsuto/piler/pull/167#issuecomment-2305264490, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVVFCF2T5WB7P53MD2OSMBLZSYMLHAVCNFSM6AAAAABM35E35WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBVGI3DINBZGA. You are receiving this because you were mentioned.Message ID: @.***>
E.g. something like: diff --git a/config.php.in b/config.php.in index 7dd50f96..d12cebf0 100644 --- a/config.php.in +++ b/config.php.in @@ -354,6 +354,14 @@ $letters = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M'
define('NOW', time());
+$config['SITE_LOGO_LG'] = 'assets/images/archive-logo-lg.png'; +$config['SITE_LOGO_SM'] = 'assets/images/archive-logo-sm.png'; + +$config['ICON_DOC'] = 'assets/images/fileicons/doc.png'; +$config['ICON_XLS'] = 'assets/images/fileicons/xls.png'; +$config['ICON_PDF'] = 'assets/images/fileicons/pdf.png'; +$config['ICON_IMAGE'] = 'assets/images/fileicons/image.png'; +$config['ICON_FILE'] = 'assets/images/fileicons/file.png';
/*
';
- -$config['BRANDING_FAVICON'] = ' +if (!isset($config['BRANDING_FAVICON']))
-';
-$config['SITE_LOGO_LG'] = $config['PATH_PREFIX'] . 'assets/images/archive-logo-lg.png'; -$config['SITE_LOGO_SM'] = $config['PATH_PREFIX'] . 'assets/images/archive-logo-sm.png'; +$config['SITE_LOGO_LG'] = $config['PATH_PREFIX'] . $config['SITE_LOGO_LG']; +$config['SITE_LOGO_SM'] = $config['PATH_PREFIX'] . $config['SITE_LOGO_SM'];
-$config['ICON_DOC'] = $config['PATH_PREFIX'] . 'assets/images/fileicons/doc.png'; -$config['ICON_XLS'] = $config['PATH_PREFIX'] . 'assets/images/fileicons/xls.png'; -$config['ICON_PDF'] = $config['PATH_PREFIX'] . 'assets/images/fileicons/pdf.png'; -$config['ICON_IMAGE'] = $config['PATH_PREFIX'] . 'assets/images/fileicons/image.png'; -$config['ICON_FILE'] = $config['PATH_PREFIX'] . 'assets/images/fileicons/file.png'; +$config['ICON_DOC'] = $config['PATH_PREFIX'] . $config['ICON_DOC']; +$config['ICON_XLS'] = $config['PATH_PREFIX'] . $config['ICON_XLS']; +$config['ICON_PDF'] = $config['PATH_PREFIX'] . $config['ICON_PDF']; +$config['ICON_IMAGE'] = $config['PATH_PREFIX'] . $config['ICON_IMAGE']; +$config['ICON_FILE'] = $config['PATH_PREFIX'] . $config['ICON_FILE'];
foreach ($config as $k => $v) { define($k, $v);
Please take a look at #203 to resolve this issue finally. It's sort of a middle ground that allows you to customize the branding stuff.
Closed in favour of #203
some config settings where not taken over from /etc/config-site.php because the initial file overwrites again