![]() |
|
|
|||||||
| For more information about the ads and why they're here, please see the FAQ |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
Ever since I've been downloading the SVN releases I've been altering the code to add in my own ding sound when a new e-mail arrives. I think it would be a good idea to add it as it's very useful. Maybe an option in the preferences settings for those who don't want a sound as well. I've been using a flash sound rather than anything that needs a browser plug-in or whatever. I just think it's much easier to load a flash file than a specific .wav, .mp3, etc. Tell me what you think and if you add it.. fab! |
|
#2
|
|||
|
|||
|
dear,
can u upload that code and sound for us in the post. |
|
#3
|
|||
|
|||
|
yeah this would be nice to have...
__________________
Roundcube SVN 606, with the 'sound on new email' modification. |
|
#4
|
|||
|
|||
|
Alright. It does work in IE7, IE6 and FireFox, but I have not used it for more than a few minutes in IE so do report back if there's crashes.
Save the below code as newAlert.js and upload it to your /pogram/js/ directory. Code:
function makeDing()
{
var flashObject = document.createElement("embed");
flashObject.setAttribute("type", "application/x-shockwave-flash");
flashObject.setAttribute("id", "makeNewDing");
flashObject.setAttribute("src", "./program/newEmail.swf");
flashObject.setAttribute("width", "1");
flashObject.setAttribute("height", "1");
document.body.appendChild(flashObject);
}
Code:
$OUTPUT->include_script('app.js');
Code:
$OUTPUT->include_script('newAlert.js');
Find the file check_recent.inc in the /program/steps/mail/ directory and find the line: Code:
$commands .= sprintf("this.set_quota('%s');\n", $IMAP->get_quota());
Code:
$commands .= "makeDing();\n"; Next download this .swf file here (right click > save as). Upload it to the directory /program/ Refresh (F5) your webmail page and send a new e-mail to yourself to test if it works. |
|
#5
|
|||
|
|||
|
In my system don't work !
![]() |
|
#6
|
|||
|
|||
|
Quote:
Find this line in your file: Code:
$OUTPUT->include_script('emailAlert.js');
Code:
$OUTPUT->include_script('newAlert.js');
|
|
#7
|
|||
|
|||
|
Ok.. !
![]() |
|
#8
|
|||
|
|||
|
Tested it on SVN versons 495 en 498 with no problems.
Would be nice to see it included in the next svn version. Solid piece of work!
__________________
Roundcube SVN 606, with the 'sound on new email' modification. |
|
#9
|
|||
|
|||
|
anyone updated this to work on the latest version?
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
| For more information about the ads and why they're here, please see the FAQ |