Newmail plugin: Set a default and relative path in prefs?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello SquirrelMail experts,
Hello Mike,

I did add the newmail plugin to my SquirrelMail setup and it worked fine
at once. Many thanks to the author. ;-)

Then I tried to change the default: I wanted to enable a "new mail" sound
to be effective for all users, but did not find out how to do that.
Users shall be able to choose their own "newmail" setting, but I want to
control the default for all users who don't change anything.

It's possible to achieve that with forced_prefs plugin (added_settings),
but that's not quite the way I'd like to do that, because forced_prefs
writes the setting to the user prefs as soon as they log in, and any
further changes to my default wouldn't affect them.

I tried to add my designated default to load_prefs.php - but it does not
work like this:

$newmail_enable = getPref($data_dir, $username, 'newmail_enable', 'on');
$newmail_media = getPref($data_dir, $username, 'newmail_media', 'http://server/squirrelmail/plugins/newmail/sounds/yougotmail.wav');

What is the right way?

Something else that I mulled over after I found out how newmail writes
the settings to the user prefs files: Like above, it writes the full path
for the sound. I am not certain if that is good.

In my setup, SquirrelMail is to be used in a LAN only and the users can
just enter the name of the server's computer (i.e. "server") to get the
index page, or "server/squirrelmail" to start SquirrelMail.
Works fine with Firefox on Windows, but for a reason unknown to me,
Firefox on Linux can't access the server by its name - it will start a
web search for "server" instead. So the IP address has to be used to
get to the server and to SquirrelMail, and the absolute path stored in
user prefs would not work in theory, but for another reason unknown to
me, it works fine and the sound is played.

However, if we should choose to allow access to SquirrelMail from outside
the LAN (the Internet!), neither the server name nor the local IP address
can possibly work for the soundfile URL. Similar problem if we change the
server's name or move SquirrelMail to another computer.
???

Yours, Gregor


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
--
squirrelmail-users mailing list
Posting Guidelines: http://www.squirrelmail.org/wiki/MailingListPostingGuidelines
List Address: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx
List Archives: http://news.gmane.org/thread.php?group=gmane.mail.squirrelmail.user
List Archives:  http://sourceforge.net/mailarchive/forum.php?forum_id=2995
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

[Index of Archives]     [Video For Linux]     [Yosemite News]     [Yosemite Photos]     [gtk]     [KDE]     [Cyrus SASL]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux