Author Topic: ident_switch plugin  (Read 13027 times)

Offline johnwayne

  • Jr. Member
  • **
  • Posts: 21
ident_switch plugin
« on: March 06, 2017, 03:00:19 AM »
looking for help manually installing the ident_switch plugin. im using rc 1.1.6

Offline johnwayne

  • Jr. Member
  • **
  • Posts: 21
Re: ident_switch plugin
« Reply #1 on: March 06, 2017, 04:44:09 AM »
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?

Offline johnwayne

  • Jr. Member
  • **
  • Posts: 21
Re: ident_switch plugin
« Reply #2 on: March 06, 2017, 07:28:22 AM »
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.

Offline 5kyy

  • Newbie
  • *
  • Posts: 6
Re: ident_switch plugin
« Reply #3 on: July 12, 2017, 12:26:32 AM »
Hello,
in current Roundcube 1.3.0 the Plugin didn´t work...
Code: [Select]
TypeError: $truName.size is not a functionAny solutions?

Offline ineo

  • Jr. Member
  • **
  • Posts: 40
Re: ident_switch plugin
« Reply #4 on: July 21, 2017, 06:33:46 AM »
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: [Select]
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

So seems to be a js problem.

Update July 21 11:30 UTC


Always nice to find the answer  ;)

Code: [Select]
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();
                }
        }



Regards
« Last Edit: July 21, 2017, 07:22:57 AM by ineo »

Offline 5kyy

  • Newbie
  • *
  • Posts: 6
Re: ident_switch plugin
« Reply #5 on: August 09, 2017, 04:41:28 AM »
Hello,

yes i switch both functions and now the dropdown field is available without errors.

But switching accoutns didn´t work yet.
In Console i geht from the ident_switch.js
gwel

which comes from function in line 52...

Offline johnwayne

  • Jr. Member
  • **
  • Posts: 21
Re: ident_switch plugin
« Reply #6 on: August 25, 2017, 01:03:13 AM »
I solved my issue of disabling the ident_switch availability during compose. will have to follow suit on the mobile skin compose and actually get the identity switcher working in main mobile skin. Does anyone know how to disable editing of the fields that ident_switch creates for the imap settings of additional identities, after they have been created. setting the identities_level = 4 in the config.inc.php doesnt affect those like i had hoped.

Offline 5kyy

  • Newbie
  • *
  • Posts: 6
Re: ident_switch plugin
« Reply #7 on: August 30, 2017, 02:37:12 AM »
Hello,

on any Roundcube 1.3.0 installation? Is this plugin running?
Switching the identities is on my installations not possible see above...

Offline ineo

  • Jr. Member
  • **
  • Posts: 40
Re: ident_switch plugin
« Reply #8 on: September 14, 2017, 07:07:41 AM »

I am running this plugin on a 1.3.1 install based on the changes I made that can be found in this threat.

Looking the plugin repository (https://plugins.roundcube.net/) I don't see any code development, so it seems the bug is stil there when you install is via the composer.

Offline Pretender

  • Newbie
  • *
  • Posts: 3
Re: ident_switch plugin
« Reply #9 on: October 05, 2017, 02:31:27 AM »
ineo, please, can you explain how you the install indent_switch? Because in my roundcube 1.3.1 and Larry skin it doesn`t work...

Offline 5kyy

  • Newbie
  • *
  • Posts: 6
Re: ident_switch plugin
« Reply #10 on: October 18, 2017, 12:34:49 AM »
Today, i run the composer again to reinstall the Plugin.

After reinstalltion the size() -> length values had to be replaced as in post above.

But after this, i get same error if i want to switch Accounts.

QWEL

without Account change.

Offline colinh

  • Newbie
  • *
  • Posts: 1
Re: ident_switch plugin
« Reply #11 on: February 09, 2018, 06:11:58 PM »
Thank You For This Thread.

Today I did a manual install of the ident_switch plugin on a new Roundcube 1.3.4 installation running the Larry skin, initially I was not getting the account selection list in the top right of the screen, after finding this thread I modified the plugin Javascript files as suggested, replacing  size() with length , and now it works fine, the account selection list works and switches accounts successfully, I also installed the identity_smtp plugin by doing a git clone of it into the plugins directory and that plugin works nicely as well, so I can switch accounts and send from the appropriate smtp server for the account.

These plugins do work under Roundcube 1.3.4. I am running PHP 7.2 under Apache 2.4.6 on Centos 7.4

Colin

Offline willsmith501

  • Newbie
  • *
  • Posts: 1
Re: ident_switch plugin
« Reply #12 on: May 08, 2018, 07:08:31 PM »
I'm trying to install the ident_switch plugin on Roundcube 1.3.4, and when I try to import the mysql.initial.sql file, I get the following error:

Notice in ./import.php#704
 Undefined variable: import_text

The IMAP details show up in the identities tab of settings, but nothing is saved into those fields.

Any help would be greatly appreciated!
Thanks!
Will
« Last Edit: May 08, 2018, 07:50:25 PM by willsmith501 »

Offline pauLee

  • Jr. Member
  • **
  • Posts: 29
Re: ident_switch plugin
« Reply #13 on: May 09, 2018, 04:02:25 AM »
I'm trying to install the ident_switch plugin on Roundcube 1.3.4, and when I try to import the mysql.initial.sql file, I get the following error:

Notice in ./import.php#704
 Undefined variable: import_text

The IMAP details show up in the identities tab of settings, but nothing is saved into those fields.

Any help would be greatly appreciated!
Thanks!
Will

Hi Will,

I have successfully installed the ident_switch with the following command on my RC1.3.x installation:

php composer.phar require boressoft/ident_switch:~3.0

After that I deleted the still existing identities and created them new. And now it works, without any manual editing of the database or js files.


Tom