Devs,
I recently received a bulk e-mail from an event organizer that displayed in
RoundCube (using Firefox 3) with the little square hex-code glyphs in place
of some of the punctuation marks. I researched why this was happening, and
tracked it down to an encoding issue.
The text/html message part in the e-mail source specified iso-8859-1
encoding. After RoundCube converted the message part to UTF-8, there were
still non-UTF8 characters in the resulting text. One such character was
0x92, which is not even a valid iso-8859-1 character. It turns out that the
message originator must have been using Windows-1252 encoding (in which
0x92 is a single-quote character, which was correct in the context in which
it appeared), but incorrectly specified iso-8859-1 encoding in the MIME
message.
The Windows-1252 character set is effectively a superset of the iso-8859-1
character set, replacing some of the seldom-used control character code
points with additional punctuation and accent characters. Some mail agents
incorrectly blur the line between these two encodings, and send
Windows-1252 characters in iso-8859-1 messages.
The following workaround (in rcube_charset_convert()) corrects the issue
(at least for my one test case):
// Workaround for mail agents that include Windows-1252 characters
// in text advertised as ISO-8859-1
if ($from == "ISO-8859-1" && preg_match("/[\x80-\x9F]/", $str))
$from = "WINDOWS-1252";
What does everyone think of including a workaround like this? I'm generally
reluctant to work around improper behavior from other software, but this
particular kind of relaxed interpretation seems common (check out the
ISO-8859-1 page on Wikipedia).
--
Eric Stadtherr
estadtherr(a)gmail.com
_______________________________________________
List info: http://lists.roundcube.net/dev/
In http_response() we have:
if (response.action == 'list')
this.triggerEvent('listupdate', { folder:this.env.source, rowcount:this.contact_list.rowcount });
I think we should add (instead) a "global" event at the end of http_response function:
this.triggerEvent('http_response', { action:response.action });
So, plugins could bind to one (http_response) event and there just check
for which action it's executed. Am I right?
--
Aleksander 'A.L.E.C' Machniak http://alec.pl gg:2275252
LAN Management System Developer http://lms.org.pl
Roundcube Webmail Project Developer http://roundcube.net
_______________________________________________
List info: http://lists.roundcube.net/dev/
----- Original Message -----
From: "Cor Bosman" <cor(a)xs4all.nl>
To: "Roland Liebl" <roland(a)roland-liebl.de>
Sent: Monday, June 01, 2009 9:31 AM
Subject: Re: [RCD] Plugin WIKI page
> Hi Roland, a tip concerning your limit recipients plugin. Check out
> function imap->decode_address_list().
> You can feed it a ['header']['from'] and it will return an array of valid
> recipients. Much cleaner than what you do now.
>
> I had to find that myself as well..unfortunately the docs dont mention
> such handy functions.
>
> Cor
>
>
>
Thanks for the hint. Next update of limit_recipients will do the check by
...
function check_recipients($args){
$rcmail = rcmail::get_instance();
$recipients =
count($rcmail->imap->decode_address_list($args['headers']['To'])) +
count($rcmail->imap->decode_address_list($args['headers']['Cc']))
+
count($rcmail->imap->decode_address_list($args['headers']['Bcc']));
if($recipients > $rcmail->config->get('limit_recipients')){
if($rcmail->config->get('limit_recipients_log')){
$this->log("Limit Recipients: " . $recipients . " > " .
$rcmail->config->get('limit_recipients') . " --> " . $_SESSION['username'] .
" --> IP: " . $this->getVisitorIP());
}
$this->add_texts('localization/');
$rcmail->output->command('display_message',sprintf(rcube_label('limit_recipients_msg','limit_recipients'),$rcmail->config->get('limit_recipients')),'error');
$rcmail->output->send('iframe');
}
return $args;
}
_______________________________________________
List info: http://lists.roundcube.net/dev/
Hi,
158 Apache:
159 -------
160 To enable these features in apache the following modules need to be enabled:
161 * mod_compress
162 * mod_expire
163 * mod_headers
I thought mod_compress is part of Lighttpd only. Isn't it mod_deflate for apache? I can't find mod_compress in my apache 2.2 installation.
Regards,
Roland
_______________________________________________
List info: http://lists.roundcube.net/dev/
1. Shouldn't 'create_identity' hook be called after 'create_user' (in
rcube_user::create)?
2. E.g. in rcube_user::create() we have:
$data = $rcmail->plugins->exec_hook('create_user', array('user'=>$user,
'user_name'=>$user_name, 'user_email'=>$user_email));
Do you plan to add possibility to stop function execution after
executing a hook inside of it?
3. In mail/compose.inc we have now in rcmail_save_attachment function:
'data' => $message->get_part_content($pid),
I think attachments could and should be handled via file pointer.
--
Aleksander 'A.L.E.C' Machniak http://alec.pl gg:2275252
LAN Management System Developer http://lms.org.pl
Roundcube Webmail Project Developer http://roundcube.net
_______________________________________________
List info: http://lists.roundcube.net/dev/
I made some changes to the plugin doc to reflect recent changes. Hope
everyone is ok with them.
Cor
_______________________________________________
List info: http://lists.roundcube.net/dev/
Hi,
I've a problem with loading the plugin local config file.
My config (config.inc.php) in the root dir of my plugin:
<?php
// enable / disable yubikey authentication
$rcmail_config['yubikey'] = TRUE;
// yubikey API key & ID needed to access the web service API
// can be had at: https://api.yubico.com/get-api-key/
$rcmail_config['yubikey_api_id'] = '';
$rcmail_config['yubikey_api_key'] = '';
?>
When I'm calling $this->load_config('config.inc.php') or $this-
>load_config(), the function always returns false and I found the
following error message in the error log ...
[01-Jun-2009 11:26:44 +0200] PHP Error: Failed to load config from /
Users/oliver/Sites/trunk/roundcubemail/plugins//yubikey_auth/
config.inc.php (GET /~oliver/trunk/roundcubemail/?
_task=settings&_action=keep-
alive&_t=1243848404670&_remote=1&_=1243848404671&_unlock=0)
I first tought that the double slash in the path was wrong and so I
changed the code in rcube_plugin.php to ....
//$this->home = $api->dir . DIRECTORY_SEPARATOR . $this->ID;
$this->home = $api->dir . $this->ID;
... but now I'm getting the same error message with the correct path ...
Error message:
[01-Jun-2009 11:35:55 +0200] PHP Error: Failed to load config from /
Users/oliver/Sites/trunk/roundcubemail/plugins/yubikey_auth/
config.inc.php (GET /~oliver/trunk/roundcubemail/?
_task=settings&_action=logout)
Does anybody has some idea about this issue?
Regards,
Oliver
_______________________________________________
List info: http://lists.roundcube.net/dev/
Hi Devs,
do you plan to implement the following (IMO standard) features during v0.3 development or should they better be implemented as a plugin?
#1 - Forward message as attachment
#2 - Copy message to folder (currently only "move" is available)
#3 - Attach vCard according to identity
#4 - Select Range/Invert Selection in message list (I like it and am used to that feature from Squirrel)
#5 - Expand/Collapse all folders in folder list
I'm in process to update MyRoundCube - which has all those features - to use your fantastic plugin API.
I have to take care about my ressources and won't spend time on things which might be already on your ToDo's.
Thank you.
Regards,
Roland
_______________________________________________
List info: http://lists.roundcube.net/dev/
Plugin WIKI page is great. Thanks a lot! People already started to add their plugins there!
Regards,
Roland
_______________________________________________
List info: http://lists.roundcube.net/dev/
Hi Cor,
thanks for your advise ... i will change my plugin tomorrow.
When I add my plugin to repo, where should I store the plugin code?
Regards,
Oliver
Am 31.05.2009 um 23:31 schrieb Cor Bosman:
> Only thing id change is use your own config.inc.php file and call
> $this->load_config(). That way the central config.inc.php doesnt get
> cluttered with plugin config settings.
>
> I just changed the plugin doc to reflect this recent addition to the
> API.
>
> Cor
_______________________________________________
List info: http://lists.roundcube.net/dev/