Koozali.org: home of the SME Server

Horde 5.2 Webmail Modifications

Offline pmstewart

  • *
  • 73
  • +0/-0
Horde 5.2 Webmail Modifications
« on: September 02, 2021, 10:19:09 PM »
In v9 and prior we were able to create template fragments which allowed us to customize the login screen for webmail.

It appears the previous template fragments will not work with the new Horde 5.2.

Thoughts?  Thanks In Advance.

Paul

Offline TerryF

  • grumpy old man
  • *
  • 1,821
  • +6/-0
Re: Horde 5.2 Webmail Modifications
« Reply #1 on: September 03, 2021, 01:41:27 AM »
never used, what are the templates being customised..

The wiki article re  adding a db entry does not seem to work either..
--
qui scribit bis legit

Offline pmstewart

  • *
  • 73
  • +0/-0
Re: Horde 5.2 Webmail Modifications
« Reply #2 on: September 03, 2021, 07:15:13 PM »
There were 2 mods which needed to be made. The first is the db add "Name" for Horde.

The second was to modify a template for Horde to accommodate the image which appeared
just above the username. Adding the image is the part I cannot remember.

BTW - thanks for saving me the trouble of finding out the db add name doesn't work. I won't be
trying it until we figure out why.

 

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Horde 5.2 Webmail Modifications
« Reply #3 on: September 03, 2021, 11:34:31 PM »
If you can check the v9 templates and let us know we may be able to add it back.

Lots has changed and some bits may have been missed.

Have a grep through the old v9 templates.

Code: [Select]
cd /etc/e-smith/templates

grep -r {db entry name} *

Eg

Code: [Select]
grep -r TCPPort *
Let us know.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline TerryF

  • grumpy old man
  • *
  • 1,821
  • +6/-0
Re: Horde 5.2 Webmail Modifications
« Reply #4 on: September 05, 2021, 01:05:09 AM »
actually found the old instructions in an old forum post and elsewhere..all out the wndow now as horde in sme10 is substantialy different, if nothing more than dirs are all different, need a better mind than mine
--
qui scribit bis legit

Offline pmstewart

  • *
  • 73
  • +0/-0
Re: Horde 5.2 Webmail Modifications
« Reply #5 on: September 05, 2021, 02:54:16 PM »
After some deep investigation (long story) a quick history will reveal something (probably of no use!).

I did an in place upgrade from 9.1 to 9.2 where my webmail has been challenged since. Turns out my template
fragment was overwritten buy "Koozali" where the logo for 9.2 is set above the line where you can enter your
own company info by a config db entry.

Previously the template fragment put our custom logo below. I believe that is what broke this feature and changed
the file which makes this happen. So searching for my bits makes no difference because the "Koozali" logo placement
over-rides whatever it was we put in to make it work.

So I guess a new feature request to put back the "Koozali" logo on the webmail screeen and a db entry to customize
with the company name. My thought is if the Koozali logo was already in place with a given size constraint rewriting the
template fragment and assigning the new pic file would be simple.

As with you my mind it lacks the necessary training to be something other than jello!

Offline pmstewart

  • *
  • 73
  • +0/-0
Re: Horde 5.2 Webmail Modifications
« Reply #6 on: September 05, 2021, 03:02:43 PM »
Also - in the documentation we used to be able to change the "admin" to a horde administrator to set the theme and such.

https://wiki.koozali.org/SME_Server:Documentation:FAQ:Section04#Change_Horde_Webmail_Login_Page_.27Welcome_To.27_Title

Quote
Add the admin user as an administrator for Horde - config setprop horde Administration enabled - signal-event email-update
It appears this feature is enabled by default now and there are no themes except the default available. Is adding themes on the roadmap or a new feature request?>

TIA Paul

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Horde 5.2 Webmail Modifications
« Reply #7 on: September 06, 2021, 02:17:18 PM »
It appears this feature is enabled by default now and there are no themes except the default available. Is adding themes on the roadmap or a new feature request?>

Chipping away at the various bits raised here.

This would be a NFR - though I am not sure quite how to do it, or how it would be updated/maintained.

You'll have to link to a template so we can have a play.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Horde 5.2 Webmail Modifications
« Reply #8 on: September 07, 2021, 12:13:10 PM »
OK I got it. So, you have 'templates' which define layout, and 'themes' which define colours etc.

You can add a new 'theme' pretty easily and that goes in:

/usr/share/horde/themes

And you then have to modify the keys noted below.

BEWARE - you may break things so this needs thoroughly testing.

Code: [Select]
config/prefs.php:22: * $_prefs['theme']['locked'] = true;
Code: [Select]
themes/default/info.php:2:$theme_name = _("Default");
To change the logo put your new png logo in /usr/share/horde/themes/default/graphics

Then:

Code: [Select]
cp /etc/horde/motd.php /etc/horde/motd.local.php
Edit this line:

Code: [Select]
<table width="100%"><tr><td align="center"><img src="<?php echo Horde_Themes::img('horde-power1.png'?>" alt="Powered by Horde" /></td></tr></table>
Something like this:

Code: [Select]
<table width="100%"><tr><td align="center"><img src="<?php echo Horde_Themes::img('myLogo.png'?>" alt="Powered by myCompany" /></td></tr></table>

But if you want to change the actual layout via templates then you are on your own.

You need to hack the files in the templates directory say like this:

Code: [Select]
diff -ruN /usr/share/horde/templates/login/login.old /usr/share/horde/templates/login/login.inc

Code: [Select]
--- /usr/share/horde/templates/login/login.old 2021-09-06 15:48:36.478865858 +0200
+++ /usr/share/horde/templates/login/login.inc 2021-09-07 10:39:09.279603393 +0200
@@ -1,4 +1,6 @@
 <div class="modal-form">
+<br />
+<p style="text-align:center;font-weight: bold;">Welcome to my Webmail</p>
 <?php if (!is_null($auth_label)): ?>
  <div class="label login-app"><?php echo $auth_label ?></div>
 <?php endif; ?>

But be aware updates may overwrite this.

Hope someone may update the wiki with that.....!!
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline TerryF

  • grumpy old man
  • *
  • 1,821
  • +6/-0
Re: Horde 5.2 Webmail Modifications
« Reply #9 on: September 07, 2021, 11:34:13 PM »
It appears this feature is enabled by default now and there are no themes except the default available. Is adding themes on the roadmap or a new feature request?>
TIA Paul

You can do a NFR but it will be way back of the back burner, maybe do some investigation and add that to the bug may add some impetuous, but dont hold your breath
--
qui scribit bis legit

Offline pmstewart

  • *
  • 73
  • +0/-0
Re: Horde 5.2 Webmail Modifications
« Reply #10 on: September 08, 2021, 12:14:12 AM »
Give me some time to digest what ReetP put up and I'll give updating the wiki a whirl as well as trying what he has laid out as the road map.

I want to ensure what I'm putting in the wiki makes sense through trial and error.

As for hitting the bug tracker for this as a nfr - developers always have their hands full! Back burner for sure!

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Horde 5.2 Webmail Modifications
« Reply #11 on: September 08, 2021, 12:38:25 AM »
I have a note of the various Horde config entries that can go on the wiki too. I'll post tomorrow.

Note again.

You can easily add a theme - colour/css etc.

You cannot easily add a template for structure.

Check the relevant dirs for more.

If you want to talk to us about documentation/dev etc then ask for a Rocket account and I'll set one up.

Just DM me full name & email.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Horde 5.2 Webmail Modifications
« Reply #12 on: September 10, 2021, 02:24:07 PM »
So this is how you find some keys.

Note they have two forms, just to confuse things!

Code: [Select]
$horde{remindertime}

$horde->prop('PHPMemoryLimit')

Hewre's how to find things:

Code: [Select]
cd /etc/e-smith/templates/
grep -rn \$horde *

These are for the Horde virtual web server setup.

Code: [Select]
etc/httpd/conf/httpd.conf/VirtualHosts/35HordeActivesyncAliases:4:    my $syncStatus = $horde{'ActiveSync'} || "disabled";
etc/httpd/conf/httpd.conf/85HordeAccess:9:    my $status = $horde{'status'};
etc/httpd/conf/httpd.conf/85HordeAccess:31:       $OUT .= ( $horde{access} eq "public" ) ? "all" : $localAccess;
etc/crontab/hordeagendas:3:    my $agendas = $horde{agendas} || "disabled";
etc/crontab/hordeagendas:9:        my $agendatime = $horde{agendatime} || "5";
etc/crontab/hordeagendas:14:               $OUT .= "# disabled - horde daily agendatime value of $horde{agendatime} is greater than 24.  Value needs to be 0 - 24\n";
etc/crontab/hordereminders:3:    my $reminders = $horde{reminders} || "enabled";
etc/crontab/hordereminders:8:        my $remindertime = $horde{remindertime} || "5";
etc/php-fpm.d/www.conf/20Horde:5:  my $horde = $c->get( "horde" );
etc/php-fpm.d/www.conf/20Horde:7:  my $version             = PhpFpmVersionToUse($horde,"72"); #$horde->prop('PHPVersion') || '72';
etc/php-fpm.d/www.conf/20Horde:8:  my $status              = $horde->prop('status') || 'disabled';
etc/php-fpm.d/www.conf/20Horde:10:  my $key                 = $horde->key;
etc/php-fpm.d/www.conf/20Horde:12:  my $memory_limit        = $horde->prop('PHPMemoryLimit')       || '128M';
etc/php-fpm.d/www.conf/20Horde:13:  my $max_execution_time  = $horde->prop('PHPMaxExecutionTime')  || '30';
etc/php-fpm.d/www.conf/20Horde:14:  my $max_input_time      = $horde->prop('PHPMaxInputTime')      || '60';
etc/php-fpm.d/www.conf/20Horde:15:  my $allow_url_fopen     = $horde->prop('PHPAllowUrlFopen')     || 'disabled';
etc/php-fpm.d/www.conf/20Horde:16:  my $post_max_size       = $horde->prop('PHPPostMaxSize')       || '10M';
etc/php-fpm.d/www.conf/20Horde:17:  my $upload_max_filesize = $horde->prop('PHPUploadMaxFilesize') || '10M';
etc/php-fpm.d/www.conf/20Horde:18:  my $file_upload         = $horde->prop('PHPFileUpload')        || 'enabled';
etc/php-fpm.d/www.conf/20Horde:24:  my $open_basedir        = $horde->prop('PHPBaseDir')           || '/usr/share/horde' 
etc/php-fpm.d/www.conf/20Horde:34:  my $disabled_functions  = $horde->prop('PHPDisabledFunctions') || 'system,show_source,' .
etc/php-fpm.d/www.conf/20Horde:38:  my $MailForceSender     = $horde->prop('MailForceSender')  || "$name\@$DomainName";


These are Horde specific config items.

Code: [Select]
usr/share/horde/config/conf.php/100ConfHordePHP:9:$conf['secret_key'] = '{$horde{SecretKey}}'; 
usr/share/horde/config/conf.php/100ConfHordePHP:20:   if (($horde{'Cookies'} || 'enabled') eq 'disabled')
usr/share/horde/config/conf.php/100ConfHordePHP:32:$conf['sql']['password'] = '{$horde{DbPassword}}';
usr/share/horde/config/conf.php/100ConfHordePHP:59:       my @HordeAdmins = split /[,:]/, $horde{Admins} || ''; 
usr/share/horde/config/conf.php/100ConfHordePHP:61:       if (($horde{RemoveUsers} || 'disabled') eq 'enabled')
usr/share/horde/config/conf.php/100ConfHordePHP:134:   if (($horde{'cache'} || 'disabled') eq 'enabled')
usr/share/horde/config/conf.php/100ConfHordePHP:213:   if (($horde{'ActiveSync'} || 'disabled') eq 'enabled')
usr/share/horde/config/conf.php/100ConfHordePHP:237:   if (($horde{'DeviceLog'} || 'disabled') eq 'enabled')
usr/share/horde/config/hooks.local.php/300pref_init:13: my @filtered = split /[;,: ]/, $horde{SubdomainFilter} || "www,mail,webmail";
usr/share/horde/config/hooks.local.php/300pref_init:24: my $UsePrimary = $horde{ForcePrimaryDomain} || "disabled";
usr/share/horde/config/mime_drivers.local.php/10mime_drivers.php:8:    if (($horde{inlineMSWord} || "false") eq "true") {
usr/share/horde/config/mime_drivers.local.php/10mime_drivers.php:32:    if (($horde{inlineMSExcel} || "false") eq "true") {
usr/share/horde/config/mime_drivers.local.php/10mime_drivers.php:57:    if (($horde{inlineMSPowerpoint} || "false") eq "true") {
usr/share/horde/config/mime_drivers.local.php/10mime_drivers.php:81:    if (($horde{inlineWordperfect} || "false") eq "true") {
usr/share/horde/imp/config/backends.local.php/120IMAPServers:33:        if (($horde{'quota'} || 'disabled') eq 'enabled')
usr/share/horde/imp/config/conf.php/100ConfImpPHP:16:   if (($horde{'LogMessages'} || 'disabled') eq 'enabled')
usr/share/horde/imp/config/mime_drivers.local.php/10mime_drivers.local.php:3:   $Inline = (defined $horde{Limitinlinesize})
usr/share/horde/imp/config/mime_drivers.local.php/10mime_drivers.local.php:4:        ? $horde{Limitinlinesize}
usr/share/horde/imp/config/mime_drivers.local.php/10mime_drivers.local.php:11:$mime_drivers['html']['inline'] = { $horde{inlineHTML} || 'true' };
usr/share/horde/imp/config/mime_drivers.local.php/10mime_drivers.local.php:13:$mime_drivers['images']['inline'] = { $horde{inlineImages} || 'true' };
usr/share/horde/ingo/config/conf.php/100IngoConfPHP:5:   if (($horde{'IngoSqlPrefs'} || 'disabled') eq 'enabled')
usr/share/horde/smeserver/mysql_set_horde_password.sql:7:        password('{$horde{DbPassword}}')
usr/share/horde/turba/config/backends.local.php/40LocalSQL:3:    my $sab = ($horde{SharedAddressBooks} || 'enabled') eq 'disabled' ? 'false' : 'true';
usr/share/horde/turba/config/backends.local.php/50LocalLDAP:36:    if (($horde{freebusy} || "disabled") eq "enabled") {
usr/share/horde/turba/config/backends.local.php/50LocalLDAP:98:    if (($horde{freebusy} || "disabled") eq "enabled") {


They need thinking down and documenting really.....

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline pmstewart

  • *
  • 73
  • +0/-0
Re: Horde 5.2 Webmail Modifications
« Reply #13 on: September 19, 2021, 04:38:22 PM »
Unless I'm going about this the wrong way could not find "config/prefs.php".

Found the following searching for "prefs.php". This is a fresh install of v10.

Code: [Select]
/etc/horde/prefs.php
/etc/horde/nag/prefs.php
/etc/horde/kronolith/prefs.php
/etc/horde/turba/prefs.php
/etc/horde/mnemo/prefs.php
/etc/horde/ingo/prefs.php
/etc/horde/imp/prefs.php
/usr/share/horde/services/prefs.php

Offline TerryF

  • grumpy old man
  • *
  • 1,821
  • +6/-0
Re: Horde 5.2 Webmail Modifications
« Reply #14 on: September 20, 2021, 04:28:12 PM »
Unless I'm going about this the wrong way could not find "config/prefs.php".

cat /usr/share/horde/config/prefs.php

or

cat /etc/horde/prefs.php
--
qui scribit bis legit