Author Topic: skin elastic error  (Read 886 times)

Offline maniks

  • Newbie
  • *
  • Posts: 5
skin elastic error
« on: September 14, 2018, 09:44:40 AM »
Hello,
I am asking for help because I can not find an answer anywhere and I have a strange problem with the elastic skins.
Who knows please answer.
I have roundcube installations on my server and I used the elastic skins.
The roundcube version 1.4 beta does not show elastic skins automatically to users only the larry skins. On the program page, they write that you can change the ruler in the config file $config['skin'] = 'larry'; on $config['skin'] = 'elastic'; .

However, after changing this in the file, after all, the program shows the skin of the larry. (even slightly graphically mixed up with larry)
Does anyone know where I make a mistake or wait for the version of the complete 1.4 program where the elastic skin will be set as the main one and automatically users will use the elastic skin? Can you fix it somehow?

Thank you in advance for your reply and help

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,260
Re: skin elastic error
« Reply #1 on: September 14, 2018, 04:07:26 PM »
this is not an error exactly. the skin option can be overridden/set by a user. so if a user has the `skin` option in their user settings this will override what ever is set in the rc config file. there are a couple of ways around this. one is to add `skin` to the dont_override config option - then no users can select their own skin, it always uses what is in the config file. the other way is to use the moduserprefs.sh script in the bin dir of your rc installation. i think (note, i have not tested this command) that:
Code: [Select]
./bin/moduserprefs.sh --delete skin will delete the skin option from any saved user prefs, reverting it to the default for everyone.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline maniks

  • Newbie
  • *
  • Posts: 5
Re: skin elastic error
« Reply #2 on: September 14, 2018, 11:19:15 PM »
How I change $rcmail_config['dont_override'] = array(); on $rcmail_config['dont_override'] = 'skin'; nothing is happening or I change something badly. I also tried $rcmail_config['dont_override'] = 'elastic';  and nothing .

I have also set up in the configuration file

 // skin name: folder from skins/
$config['skin'] = 'elastic';

nevertheless, users fall short on skin larry

In the file ./bin/moduserprefs.sh there is no skin:

#!/usr/bin/env php
<?php
/*
 +-----------------------------------------------------------------------+
 | bin/moduserprefs.sh                                                   |
 |                                                                       |
 | This file is part of the Roundcube Webmail client                     |
 | Copyright (C) 2012-2015, The Roundcube Dev Team                       |
 |                                                                       |
 | Licensed under the GNU General Public License version 3 or            |
 | any later version with exceptions for skins & plugins.                |
 | See the README file for a full license statement.                     |
 |                                                                       |
 | PURPOSE:                                                              |
 |   Bulk-change settings stored in user preferences                     |
 +-----------------------------------------------------------------------+
 | Author: Thomas Bruederli <roundcube@gmail.com>                        |
 +-----------------------------------------------------------------------+
*/

define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' );

require_once INSTALL_PATH.'program/include/clisetup.php';

function print_usage()
{
    print "Usage: moduserprefs.sh [options] pref-name [pref-value]\n";
    print "Options:\n";
    print "    --user=user-id User ID in local database\n";
    print "    --config=path  Location of additional configuration file\n";
    print "    --delete       Unset the given preference\n";
    print "    --type=type    Pref-value type: int, bool, string\n";
}


// get arguments
$args = rcube_utils::get_opt(array(
        'u' => 'user',
        'd' => 'delete:bool',
        't' => 'type',
        'c' => 'config',
));

if ($_SERVER['argv'][1] == 'help') {
    print_usage();
    exit;
}
else if (empty($args[0]) || (empty($args[1]) && empty($args['delete']))) {
    print "Missing required parameters.\n";
    print_usage();
    exit;
}

$pref_name  = trim($args[0]);
$pref_value = $args['delete'] ? null : trim($args[1]);

if ($pref_value === null) {
    $args['type'] = null;
}

if ($args['config']) {
    $rcube = rcube::get_instance();
    $rcube->config->load_from_file($args['config']);
}

rcmail_utils::mod_pref($pref_name, $pref_value, $args['user'], $args['type']);

?>

Do I change something wrong?
« Last Edit: September 14, 2018, 11:24:41 PM by maniks »

Offline alec

  • Hero Member
  • *****
  • Posts: 1,146
Re: skin elastic error
« Reply #3 on: September 15, 2018, 03:18:15 AM »
$rcmail_config['dont_override'] = array('skin');

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,260
Re: skin elastic error
« Reply #4 on: September 15, 2018, 11:37:35 AM »
what alec says. also why are you mixing $config and $rcmail_config? $rcmail_config was depreciated in version 1.0.

Quote
In the file ./bin/moduserprefs.sh there is no skin:
I don't understand what you mean, moduserprefs.sh is a shell script. Its purpose is to bulk modify saved users' prefs
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…