Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 12-08-2002, 11:03 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

guys you both receive a pm in your board and check source code of the page where this code is displayed. Check how is it rendered in the source code. You probably have file name or URL problem. Dont forget to have sound files in this format:
sound1.wav
sound2.wav
etc.

and caps is important in file names!

Also is the directory structure..
Reply With Quote
  #12  
Old 12-09-2002, 01:30 AM
350Chevy's Avatar
350Chevy 350Chevy is offline
 
Join Date: Nov 2002
Location: Tampa, FL
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You da man...

I thought there was something missing there... It was searching for sound1wav because your line of code was missing a simple . lol

should be:

PHP Code:
srand(make_seed()); $srand_snd rand (1,18); 
$sound='<embed src="audio\sound'.$srand_snd.'.wav" autostart="true" loop="0" hidden="true"></embed>'
Thanks again.. it's working perfectly! Now if only someone would release the multiple file attach.
Reply With Quote
  #13  
Old 12-09-2002, 02:00 AM
350Chevy's Avatar
350Chevy 350Chevy is offline
 
Join Date: Nov 2002
Location: Tampa, FL
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can also add the function to the global file then call it from the template to call the sound from any page.. which is preferable.
Reply With Quote
  #14  
Old 12-09-2002, 03:33 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by 350Chevy
You can also add the function to the global file then call it from the template to call the sound from any page.. which is preferable.
350Chevy, what is your exact coding for that piece of code?
Reply With Quote
  #15  
Old 12-09-2002, 03:56 AM
350Chevy's Avatar
350Chevy 350Chevy is offline
 
Join Date: Nov 2002
Location: Tampa, FL
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Boofo


350Chevy, what is your exact coding for that piece of code?
Take all the code out of index.php that you added...

Make sure this code is NOT in index.php

PHP Code:
function make_seed()  { list($usec$sec) = explode(' 'microtime()); return (float) $sec + ((float) $usec 100000); } 
and place in in global.php under

PHP Code:
<?php
next find this in global.php

PHP Code:
$headnewpm='';

if (
$checknewpm and $bbuserinfo['userid']!=and $bbuserinfo['pmpopup']==2) {
  if (
$noshutdownfunc) {
    
$DB_site->query("UPDATE user SET pmpopup=1 WHERE userid=$bbuserinfo[userid]");
  } else {
    
$shutdownqueries[]="UPDATE LOW_PRIORITY user SET pmpopup=1 WHERE userid=$bbuserinfo[userid]";
  }
  
$newpmmsg=1;
  eval(
"\$headnewpm = \"".gettemplate('head_newpm')."\";");

Add this under that code:

PHP Code:
$headerpms='';
$permissions=getpermissions();
if (
$enablepms==and $permissions['canusepm'] and $bbuserinfo['receivepm']) {
  
$ignoreusers="";
  if (
trim($bbuserinfo['ignorelist'])!="") {
    
$ignoreusers='AND fromuserid<>'.implode(' AND fromuserid<>',explode(' ',$bbuserinfo[ignorelist]));
  }
  
$headpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND messageread=0 AND folderid=0 $ignoreusers");
  if (
$headpm['messages']!=0) {
    
srand(make_seed()); $srand_snd rand (1,10); 
    
$sound='<embed src="audio\sound'.$srand_snd.'.wav" autostart="true" loop="0" hidden="true"></embed>';
  } else {
    
$sound=''
  
}

and place your sound1.wav - sound10.wav files in the sub folder called audio.

then open your header template and place $sound anywhere you see fit.

That should do it.
Reply With Quote
  #16  
Old 12-09-2002, 03:57 AM
350Chevy's Avatar
350Chevy 350Chevy is offline
 
Join Date: Nov 2002
Location: Tampa, FL
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have the blinking PM's in header mod installed too so I'm not sure if all that code above is needed but it should still do the trick.
Reply With Quote
  #17  
Old 12-09-2002, 04:07 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Whoa! You've totally lost me on this. I have no sound wav files at all. All I needed to do is get the sound code that Logician wrote to play on new messages. Where do I get the sound wav files.
Reply With Quote
  #18  
Old 12-09-2002, 08:43 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Boofo
Whoa! You've totally lost me on this. I have no sound wav files at all. All I needed to do is get the sound code that Logician wrote to play on new messages. Where do I get the sound wav files.
LOL Boofo!

The hack is for playing a random sound file when you have a PM and it produces a file name like sound1.wav, sound2.wav etc. So you have to have these files in your server.. :knockedout:

I just gave you the code, I don't use the hack myself. So I hope 350Chevy will help you with wav files..
Reply With Quote
  #19  
Old 12-09-2002, 09:32 AM
EvilLS1's Avatar
EvilLS1 EvilLS1 is offline
 
Join Date: Apr 2002
Location: Georgia, USA
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can find lots of free wav files here:

http://www.eventsounds.com/

or here:

http://www.top50wavsites.com/

Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:47 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.10507 seconds
  • Memory Usage 2,270KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete