From: Paul L. <pa...@sq...> - 2005-09-21 19:28:17
|
Ricardo Stella wrote: > I use multilogin and imapproxy. So all mail servers are 'localhost' but > use different ports. I'm trying to pass down a few plugins a variable > with the name of the mail server that the proxy connects to, but no ide > where to set this in. I've done it in a couple of plugins, but figure, > it's better to just keep only one place to modify this: > > For example: > > if ($imapPort == "143") > $MY_Server = "server1"; > if ($imapPort == "144") > $MY_Server = "server2"; > if ($imapPort == "145") > $MY_Server = "server3"; I don't really understand what this is and where you are trying to do it. But just plain custom variables can be added at will to the multilogin config: $IMAPSelections = array( 'My Domain' => array( 'imapServerAddress' => 'localhost', 'imapPort' => '143', 'mySpecialVariable' => 'blah!', ), ); Then $mySpecialVariable should be availble to you in most anywhere, as long as you reference it as a global var. So, uh, maybe you need this? $IMAPSelections = array( 'My Domain 1' => array( 'imapServerAddress' => 'localhost', 'imapPort' => '143', 'MY_Server' => 'server1', ), 'My Domain 2' => array( 'imapServerAddress' => 'localhost', 'imapPort' => '144', 'MY_Server' => 'server2', ), 'My Domain 3' => array( 'imapServerAddress' => 'localhost', 'imapPort' => '145', 'MY_Server' => 'server3', ), ); and in your plugin: global $My_Server; echo "My_Server<br />"; - paul __________________________ Open Guild, LLC http://openguild.net/ Software.Systems.Solutions |