[imp] Fwd: charset recode

Michael M Slusarz slusarz at horde.org
Fri Apr 14 08:34:42 PDT 2006



----- Forwarded message from miksir at maker.ru -----
     Date: Fri, 14 Apr 2006 13:45:09 +0400
     From: Dmitriy MiksIr <miksir at maker.ru>
  Subject: charset recode
       To: Michael M Slusarz <slusarz at horde.org>

Hello!
Sorry for disturb, but really need your help.
I try to create recode feature for change charset of message until view.
I add new pref to prefs.php and change
imp/templates/message/navbar_navigate.inc - add the following:
<?php if ($prefs->getValue('show_recode_message')): ?>
    <?php echo _("Recode") ?>
    <select name="recode_message"
       onChange="document.location='<?php echo $self_link ?>
&amp;recode='+this.options[this.selectedIndex].value;">
    <?php
       foreach ($nls['encodings'] as $charset => $name) {
         echo "<option value='$charset'",
            ($charset == $recode ? " selected" : ""),
            ">$name</option>";
        }
    ?>
    </select>
<?php endif; ?>
Now the main trouble - change encode in message.php.
Can you help me? Need information - how (and where) set charset (for
override default or message charset) and how (and where) get the
current charset of message (for set 'selected' in drop-down menu).
And sorry again, if this message strain you.

----- End forwarded message -----


___________________________________
Michael Slusarz [slusarz at horde.org]


More information about the imp mailing list