Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
On my site I use a base-directory in which drupal is installed.
For this case I noticed that the sound files couldn't be found because of a bug in im.module.
After changing the code as mentioned below, I was able to hear the notification sounds (to my regret only in FireFox, not in IE7).
Hans Bos
/* create the UI for IM console (display and command line)
*/
function im_make_block_console() {
global $base_path;
global $user;
$im_settings = array(
'refresh_rate' => variable_get('im_refresh_rate', 2000),
'im_refresh_rate_inactive_threshold' => variable_get('im_refresh_rate_inactive_threshold', 10000),
'im_refresh_rate_inactive' => variable_get('im_refresh_rate_inactive', 5000),
'drupal_root' => $_SERVER['DOCUMENT_ROOT'],
'anymsgs_url' => $anymsgs_url,
);
if (_has_audio()) {
$im_settings['has_audio'] = '1';
$im_settings['msg_in_mp3'] = $base_path . drupal_get_path('module', 'im') . '/msg_in.mp3';
$events = im_events();
foreach ($events as $event) {
/* $im_settings[$event['name']] = '/' . $event['sound_file']; */
$im_settings[$event['name']] = $base_path . $event['sound_file']; /* corrected */
}
}
Comments
Comment #1
pahariwalla CreditAttribution: pahariwalla commentedThanks @hansbos It's nice to get actual code fixes from the community ;-)
I've made the fix in rev 1.9.2.24 of im.module
Raj