Third Party Contributions > API Based Plugins

ident_switch plugin

(1/3) > >>

johnwayne:
looking for help manually installing the ident_switch plugin. im using rc 1.1.6

johnwayne:
i answered my own question, but now have a new one.

first, here's the manual installation steps - so that it can help someone else:
unzip the package from the repo and name the folder "ident_switch" and place it in the plugins directory of your rc installation.
add 'ident_switch' to the $config['plugins'] array in the main config.inc.php file.
you may need to edit the $config['identities_level'] value to allow the ident_switch settings for the additional identities to appear.
open your phpmyadmin and import the mysql.initial.sql file to add the necessary table to the database.

my new question, is:
the ident_switch plugin replaces the static display of the email account at the top of the interface in desktop view with the account chooser, but when using the melanie2 mobile rc skin, the static display of the email account is not replaced with the account chooser. any suggestions on how to achieve this?

johnwayne:
the melanie2 author has sent me a suggestion to potentially complete my second question, i will update once i can test it.
now to list a quirk in the ident_switch plugin itself: the server settings if entered when first creating the additional identity, will not be saved. you must first create the new identity, then thereafter edit the server settings for the then existing new identity.

so on to the next question: in all the places that roundcube allows the user to select between identities prior to this plugin - such as the compose window, etc. can the ability to select the other identities in roundcube be disabled? in effect locking the usage into whichever identity is currently selected by the chooser created by the plugin?

without that restriction, sent items and such can get misplaced into other accounts if the identity choice is made from the compose window instead of from the plugin chooser, and so on.

5kyy:
Hello,
in current Roundcube 1.3.0 the Plugin didnĀ“t work...

--- Code: ---TypeError: $truName.size is not a function
--- End code ---
Any solutions?

ineo:
I experience the same, Roundcube 1.3.0 and ident_switch 1.1 not working.

For example the pull-down options isn't working so one can't switch between identities.

Below developer console information


--- Code: ---jQuery.Deferred exception: $truName.size is not a function @https://hostname/plugins/ident_switch/ident_switch.min.js?s=1476818596:1:55
j@https://hostname/program/js/jquery.min.js?s=1498503424:36:29997
g/</k<@https://hostname/program/js/jquery.min.js?s=1498503424:36:30313

TypeError: $truName.size is not a function
 undefined
--- End code ---

So seems to be a js problem.

Update July 21 11:30 UTC


Always nice to find the answer  ;)


--- Code: ---The .size() method is deprecated as of jQuery 1.8. Use the .length property instead.

So change the size () methode with length in both .js files and everything seems to be working again.

Old:

$(function() {
        var $truName = $('.topright .username');
        if ($truName.size () > 0) {
                $sw = $('#plugin-ident_switch-account');
                if ($sw.size () > 0) {
                        $sw.prependTo('.topright');
                        $truName.hide();
                        $('#plugin-ident_switch-account').show();
                }
        }

New:

$(function() {
        var $truName = $('.topright .username');
        if ($truName.length > 0) {
                $sw = $('#plugin-ident_switch-account');
                if ($sw.length > 0) {
                        $sw.prependTo('.topright');
                        $truName.hide();
                        $('#plugin-ident_switch-account').show();
                }
        }


--- End code ---


Regards

Navigation

[0] Message Index

[#] Next page

Go to full version