Third Party Contributions => API Based Plugins => Topic started by: umount on December 10, 2010, 07:20:00 AM
Title: Check box plugin
Post by: umount on December 10, 2010, 07:20:00 AM
I want to present to you new roundcube plugin chbox. checkbox to select messages.
https://github.com/umount/rcplugin_chbox
It is testing version, need patching list.js file, but soon I will be corrected and I will let out the normal version without a patch.
Also my plugin bounce was still updated. Now it support auto loading. https://github.com/umount/rcplugin_bounce
Title: Check box plugin
Post by: umount on December 13, 2010, 07:12:08 AM
Remove list.patch. Now plugin chbox work without patch, only how plugin roundcube.
Comments and suggestions are welcome.
Title: Check box plugin
Post by: lacri on December 13, 2010, 08:29:02 AM
nice :)
you forgott localizations (chbox.chbox) and a the patch for the functions.js to initialise the selectmenu
in skins/default/functions.js search forfunction rcube_mail_ui() { this.popups = { and add selectmenu: {id:'selectmenu'},and for localizations add folder localization in chbox plugin directory and add File e.G. for german de_DE.inc with this Content
$labels = array(); $labels['chbox'] = 'Checkbox';
?>
Many thanks for this plugin and your work.
Title: Check box plugin
Post by: lacri on December 13, 2010, 08:42:29 AM
rosali has a plugin msglistcols with a small modification in msglistcols.php you can add the chbox plugin to this.
search in msglistcols.php tofor($i=0;$i<9;$i++){ $field_id = 'rcmfd_list_col' . $i;and add $select_col->add(rcube_label('chbox','msglistcols'), 'chbox');a better way is: @rosali add a check if chbox plugin is loaded :)
and add localization string for chbox in msglistcols localization files $labels['chbox'] = "Checkbox";
Title: Check box plugin
Post by: umount on December 13, 2010, 09:40:54 AM
Quote from: lacri;31754nice :)
you forgott localizations (chbox.chbox) and a the patch for the functions.js to initialise the selectmenu
in skins/default/functions.js search forfunction rcube_mail_ui() { this.popups = { and add selectmenu: {id:'selectmenu'},and for localizations add folder localization in chbox plugin directory and add File e.G. for german de_DE.inc with this Content
$labels = array(); $labels['chbox'] = 'Checkbox';
?>
Many thanks for this plugin and your work.
I am sorry have forgotten to add folder localization.
patch for skins/default/functions.js I'm try fix :), for it I forgotten too
Title: Check box plugin
Post by: lacri on December 13, 2010, 01:57:44 PM
i found another small Bug i have on the bottom as last message in the messagelist one message without subject and 0 bytes sice this one wrong message comes not from imap and has no id she is generated by the chbox plugin or caused by the plugin.
i search for a solution tomorrow morning now is evening :)
many greetz :)
Title: Check box plugin
Post by: lacri on December 14, 2010, 04:15:56 AM
the bug is in chbox.php in the message_list function search function message_list($args){ $count = count($args['messages']); for ($i=0;$i<$count;$i++) { $uid = $args['messages'][$i]->uid; $args['messages'][$i]->list_cols['chbox'] = ''; } return $args; } and replace with function message_list($args){ $count = count($args['messages'])-1; for ($i=0;$i<$count;$i++) { $uid = $args['messages'][$i]->uid; $args['messages'][$i]->list_cols['chbox'] = ''; } return $args; } the issue is the wrong count of messages i have change only the count with -1 $count = count($args['messages'])-1;
I hope this helps :)
Title: Check box plugin
Post by: lacri on December 14, 2010, 05:02:07 AM
refix the first fix dont work when folder is empty here is a better solution works fine when folder contains one or more messages and when folder is empty :)
replace message_list function in chbox.php withfunction message_list($args){ $count = count($args['messages']); for ($i=0;$i<$count;$i++) { $uid = $args['messages'][$i]->uid; if($uid != NULL) { $args['messages'][$i]->list_cols['chbox'] = ''; } } return $args; }
Title: Check box plugin
Post by: umount on December 14, 2010, 05:11:44 AM
Quote from: lacri;31761the bug is in chbox.php in the message_list function search function message_list($args){ $count = count($args['messages']); for ($i=0;$i<$count;$i++) { $uid = $args['messages'][$i]->uid; $args['messages'][$i]->list_cols['chbox'] = ''; } return $args; } and replace with function message_list($args){ $count = count($args['messages'])-1; for ($i=0;$i<$count;$i++) { $uid = $args['messages'][$i]->uid; $args['messages'][$i]->list_cols['chbox'] = ''; } return $args; } the issue is the wrong count of messages i have change only the count with -1 $count = count($args['messages'])-1;
I hope this helps :)
Thank you for help.
Title: Check box plugin
Post by: lacri on December 14, 2010, 05:24:31 AM
i have seen in github you have commited my first fix :) this contains a little bug use the fix from my last posting :)
thanks for your plugin ;)
Title: Check box plugin
Post by: umount on December 14, 2010, 05:31:33 AM
Quote from: lacri;31764i have seen in github you have commited my first fix :) this contains a little bug use the fix from my last posting :)
thanks for your plugin ;)
no problem :)
Title: Check box plugin
Post by: umount on December 14, 2010, 08:16:22 AM
Remove need patch functions.js
Title: Check box plugin
Post by: umount on December 15, 2010, 03:11:51 AM
If you need select childs of collapsed rows.
You should uncomment 45 line
Title: Check box plugin
Post by: rosali on December 31, 2010, 11:06:08 AM
Title: Check box plugin
Post by: rosali on December 31, 2010, 01:42:57 PM
Please move ...
chbox_menu
... function out of event listener. It reduces the time to replace the chbox label.
chbox.js
if (window.rcmail) { chbox_menu(); rcmail.addEventListener('init', function(evt) { rcmail.register_command('plugin.chbox.selectmenu', rcmail_selectmenu, true);
Title: Check box plugin
Post by: umount on January 17, 2011, 03:19:49 AM
Quote from: rosali;32130Please move ...
chbox_menu
... function out of event listener. It reduces the time to replace the chbox label.
chbox.js
if (window.rcmail) { chbox_menu(); rcmail.addEventListener('init', function(evt) { rcmail.register_command('plugin.chbox.selectmenu', rcmail_selectmenu, true);
Thank you for advice.
Title: Check box plugin
Post by: @dmin on February 15, 2011, 10:28:47 AM
This plugin is so fantastic and is something I've been waiting for for SO LONG. It really should be added as a base option in the installer.
Wanted to add a few notes about installing this plugin. Make sure you put it in a directory called 'chbox' inside the plugins folder. I was trying to call the folder something else and getting errors.
Also, if you want it enabled by default you can change this line in your main.inc.php:
// These cols are shown in the message list. Available cols are: // subject, from, to, cc, replyto, date, size, status, flag, attachment $rcmail_config['list_cols'] = array('chbox','subject', 'status', 'from', 'date', 'size', 'flag', 'attachment');
Big thanks to the developer for this!
Title: Check box plugin
Post by: umount on February 15, 2011, 01:51:29 PM
Quote from: @dmin;33222This plugin is so fantastic and is something I've been waiting for for SO LONG. It really should be added as a base option in the installer.
Wanted to add a few notes about installing this plugin. Make sure you put it in a directory called 'chbox' inside the plugins folder. I was trying to call the folder something else and getting errors.
Also, if you want it enabled by default you can change this line in your main.inc.php:
// These cols are shown in the message list. Available cols are: // subject, from, to, cc, replyto, date, size, status, flag, attachment $rcmail_config['list_cols'] = array('chbox','subject', 'status', 'from', 'date', 'size', 'flag', 'attachment');
Big thanks to the developer for this!
Thank you very much for your advice and your kind message.
Title: Check box plugin
Post by: cityhunter on May 03, 2011, 08:05:17 PM
very nice plugin thank you very much ^^ wait for a long time
Title: Check box plugin
Post by: sept on August 04, 2011, 02:58:27 AM
hello
i'm using roundecubemail v 0.5.3 and downloaded chbox. But it doesn't work i get all the time the following error:
Quote[04-Aug-2011 08:49:05 +0200]: PHP Error: Failed to load plugin file /var/www/roundcubemail/plugins/chbox/chbox.php in /var/www/roundcubemail/program/include/rcube_plugin_api.php on line 145 (GET /roundcubemail/?_task=mail&_remote=1&_action=check-recent&_t=1312440545807&_mbox=INBOX&_list=1&_=1312440545808&_unlock=0) [04-Aug-2011 08:50:05 +0200]: PHP Error: Failed to load plugin file /var/www/roundcubemail/plugins/chbox/chbox.php in /var/www/roundcubemail/program/include/rcube_plugin_api.php on line 145 (GET /roundcubemail/?_task=mail&_remote=1&_action=check-recent&_t=1312440605806&_mbox=INBOX&_list=1&_=1312440605807&_unlock=0) [04-Aug-2011 08:51:05 +0200]: PHP Error: Failed to load plugin file /var/www/roundcubemail/plugins/chbox/chbox.php in /var/www/roundcubemail/program/include/rcube_plugin_api.php on line 145 (GET /roundcubemail/?_task=mail&_remote=1&_action=check-recent&_t=1312440665806&_mbox=INBOX&_list=1&_=1312440665808&_unlock=0) [04-Aug-2011 08:52:05 +0200]: PHP Error: Failed to load plugin file /var/www/roundcubemail/plugins/chbox/chbox.php in /var/www/roundcubemail/program/include/rcube_plugin_api.php on line 145 (GET /roundcubemail/?_task=mail&_remote=1&_action=check-recent&_t=1312440725806&_mbox=INBOX&_list=1&_=1312440725808&_unlock=0)
i installed the "help" plugin without any problems. does the chbox plugin have problems with the new roundecube version?
thanks
Title: Check box plugin
Post by: umount on August 04, 2011, 04:39:11 AM
No it haven't problem with the new roundecube version. I am use trunk version and all work :) check permission on files and directory
ls -al /var/www/roundcubemail/plugins/chbox/chbox.php
Title: Re: Check box plugin
Post by: koji on January 17, 2013, 02:52:01 AM
I've been using this plugin without noticing problems until I upgraded to 0.8.4 (I'can't be sure this is the cause...)
Now, i can select individual e-mails, but in the chbox icon on the mail bar, the menu to mark all of them, unread... doesn't appear.
It's due to a javascript error in chbox.js:
Uncaught reference error: rcmail_ui is not defined
Here it appears:
function rcmail_selectmenu() { if (!rcmail_ui.popups.selectmenu)
Is this object disappeared or changed, or maybe it's some other kind of problem??
Title: Re: Check box plugin
Post by: bar on August 24, 2013, 02:29:24 PM
Hello, I found the fix below, https://github.com/valarauco/rcplugin_chbox