mirror of
https://gitlab.com/mojo42/Jirafeau.git
synced 2025-01-18 05:18:38 +01:00
[FEATURE] Template Markers: Replace configuration values
Replace markers with configured values.
This commit is contained in:
parent
4a53554259
commit
2b10abd17f
@ -43,6 +43,14 @@ $cfg['lang'] = 'auto';
|
||||
*/
|
||||
$cfg['style'] = 'courgette';
|
||||
|
||||
/* Name the organisation running this installation, eg. 'ACME'
|
||||
*/
|
||||
$cfg['organisation'] = 'ACME';
|
||||
|
||||
/* Provide a contact person for this installation, eg. 'John Doe <doe@example.com>'
|
||||
*/
|
||||
$cfg['contactperson'] = '';
|
||||
|
||||
/* Propose a preview link if file type is previewable
|
||||
*/
|
||||
$cfg['preview'] = true;
|
||||
|
@ -1373,11 +1373,13 @@ jirafeau_replace_markers ($content, $htmllinebreaks = false)
|
||||
{
|
||||
$patterns = array(
|
||||
'/###ORGANISATION###/',
|
||||
'/###CONTACTPERSON###/'
|
||||
'/###CONTACTPERSON###/',
|
||||
'/###WEBROOT###/'
|
||||
);
|
||||
$replacements = array(
|
||||
'[ORGANISATION PROVIDING THIS WEBSITE]',
|
||||
'contact@[THIS WEBSITE]'
|
||||
$GLOBALS['cfg']['organisation'],
|
||||
$GLOBALS['cfg']['contactperson'],
|
||||
$GLOBALS['cfg']['web_root']
|
||||
);
|
||||
$content = preg_replace($patterns, $replacements, $content);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user