[imp] IMP 3.0 $conf['hooks']['from'] destroys design

Jan-Marc Pilawa j.pilawa@tu-bs.de
Tue, 11 Jun 2002 16:11:26 +0200


Hello List, 

don't know what I am doing wrong: 
- Downloaded rpms for horde 2.0, imp 3.0 and followed
  docs/INSTALL

in conf.php I altered/inserted :

$conf['hooks']['from'] = 'imp_expand_fromaddress';
if (!function_exists('imp_expand_fromaddress')) {
  function imp_expand_fromaddress ($imp) {
  return (system("/usr/local/bin/alias ".escapeshellarg($imp['user'])));
  }
}

/usr/local/bin/alias is a skript that echos the mail-alias (if found) or 
$1 (in any other case) to stdout
The Result is, that not only I get the right From-Adress in the compose 
window but also the alias in its body. The Result is, that the 
compose-window begins with the alias before all the Table-Stuff starts.

I don't know where it happens. I am more and more convinced that my 
Problem could be a misunderstanding of PHP (which is not my nativ language 
;-). Has anybody an Idea what went wrong?

Jan.

PS: Here is a shortened part of the HTML-Source. I found all the functions 
in the templates but i cant imagine from where the odd 
j.pilawa 
comes from. (Ok, from the shell-skript, but I think it shouldn't...)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"DTD/xhtml1-transitional.dtd">
<!-- IMP: Copyright 2001, The Horde Project. IMP is under the GPL. -->
<!-- Horde Project: http://horde.org/ | IMP: http://horde.org/imp/ -->

[...]


<body>
<script language="JavaScript" type="text/javascript">

<!--
function open_help_win(module, topic)
{
    var win_location;

[...]

    HelpWin.focus();
}
//-->

</script>
j.pilawa<script language="JavaScript" type="text/javascript">

<!--

function attachment_check(n)
{
    if (n.attachmentAction.value) {
        if (n.attachmentAction.value == 'add') {


 [...]

-- 

+ Kontakt ---------------------------------------------------------+
+ Systembetreuung Rechenzentrum TU Braunschweig                    +
+ Hans-Sommer-Str. 65, D-38092 Braunschweig                        +
+ Tel: +49 531 391-5548 Mail: j.pilawa@tu-bs.de ___________________+