Messaging Notification
Verfasst: 21.08.2002 18:19
Ich schnall das nicht.I received a PM requesting this mod. It's very similar to my "New message(s) sound, blink/marquee" mod except that this mod will play random sounds from the audio folder you specify.
########################################################
## Mod Title: New PM(s) Random-Sound, blink/marquee
## Mod Version: 1.0.4
## Author: Bill Beardslee < webmaster@webxtractions.com >
##
## Tested: RC2 and Latest CVS
##
## Description: This mod will show the word "new" in the links
## section of the header either blinking or as a marquee for
## new message(s) along with random new message sounds such as:
## .wav, .mid, .au, etc. formats.
## [It's already set up for (.wav, .mid and .au)]
##
## Installation Level: (easy)
## Installation Time: 2-5 Minutes
## Files To Edit: 3 - functions.php, lang_main.php and *.css
## Included Files: 1 - (anim_messages.zip)
##
## Get this mod as a text file and 10 compressed .wav files at:
## http://webxtractions.com/downloads/anim_messages.zip (83kb)
##
########################################################
##
## Installation Notes:
##
## /lang_XXX/ = Your default language
##
## Create a folder for your audio files.
##
## Change the "ABSOLUTE" and "URL" paths to your audio folder.
##
## Change the wording, color, etc. variables to suit.
##
## Upload your audio files (.wav, .mid, .au, etc.) to the audio
## folder you specify in the script.
##
########################################################
#
#-----[ OPEN ]------------------------------------------
#
language/lang_XXX/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
The header comments located at the top.
(ie: Text within /* */ or text after // tags)
#
#-----[ ADD AFTER ]-------------------------------------
#
//
// Random Sound Script Start
//
// Create a folder for your audio files. The default below is "/audio"
// Change the full "ABSOLUTE" path to your audio folder for $localdir
// Change the full "URL" path to your audio folder for $webdir. No ending "/"
//
$localdir = "/usr/local/home/site_name.com/httpdocs/phpBB/audio/";
$webdir = "http://www.site_name.com/phpBB/audio";
$snd = getRandomSound($localdir);
$snd = str_replace("$localdir","",$snd);
//
// Random Sound Script End
//
#
#-----[ FIND ]------------------------------------------
#
$lang['New_pms'] = "You have %d new messages"; // You have 2 new messages
#
#-----[ REPLACE WITH ]----------------------------------
#
$lang['New_pms'] = "You have %d <span class=pm><blink>*<marquee width=50>new</marquee>*</blink></span> messages<bgsound src='$webdir/$snd' border='0'>"; // You have 2 new messages
#
#-----[ FIND ]------------------------------------------
#
$lang['New_pm'] = "You have %d new message"; // You have 1 new message
#
#-----[ REPLACE WITH ]----------------------------------
#
$lang['New_pm'] = "You have %d <span class=pm><blink>*<marquee width=50>new</marquee>*</blink></span> message<bgsound src='$webdir/$snd' border='0'>"; // You have 1 new message
#
#-----[ SAVE AND CLOSE ]--------------------------------
#
language/lang_XXX/lang_main.php
#
#-----[ OPEN ]------------------------------------------
#
includes/functions.php
#
#-----[ FIND ]------------------------------------------
#
function get_userdata($user)
#
#-----[ ADD BEFORE ]--------------------------------
#
//
// Random Sound Mod Start
// Variables
function getRandomSound($dir,$type='random'){
global $errors,$seed;
if (is_dir($dir)){
$fd = opendir($dir);
$sounds = array();
while (($part = @readdir($fd)) == true){
clearstatcache();
// If you want to use other formats, simply add them to (wav|mid|au) below
if (eregi("(wav|mid|au)$",$part)){
$sounds[] = $part;
}
}
if ($type == 'all') return $sounds;
if ($seed !== true){
mt_srand ((double) microtime() * 1000000);
$seed = true;
}
$key = mt_rand (0,sizeof($sounds)-1);
return $dir . $sounds[$key];
}
else
{
$errors[] = $dir.' is not a directory';
return false;
}
}
// Random Sound Script End
//
#
#-----[ SAVE AND CLOSE ]--------------------------------
#
includes/functions.php
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/subSilver.css // or whatever .css file you are using
#
# NOTE: This next one may be different depending on your version of
# RC2 files. You can actually place it just about anywhere within
# your .css file. I just chose this spot.
#
#-----[ FIND ]------------------------------------------
#
/* General text */ or /* General normal text */
#
#-----[ ADD BEFORE ]------------------------------------
#
/* New Messages */
.pm { font-size: 11px; text-decoration: none; color: #FF0000 }
#
#-----[ SAVE AND CLOSE ]--------------------------------
#
templates/subSilver/subSilver.css // or whatever .css file you are using
#
#-------------------------------------------------------
#
1.) Ich finde dass hier in der lang_main.php (German) nicht:
The header comments located at the top. (ie: Text within /* */ or text after // tags)
2.) Dass hier find ich auch nicht:
/* General text */ or /* General normal text */
Kann mir jemand helfen ?