vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Multiple file attachments? (https://vborg.vbsupport.ru/showthread.php?t=46482)

350Chevy 12-08-2002 07:07 AM

Multiple file attachments?
 
Is there a multiple file attachment hack out yet? I've searched up and down with nothing.

I've also been looking for a way to play random sounds (.wav) from anywhere on vB when recieving a PM. :)

Logician 12-08-2002 12:49 PM

Quote:

Is there a multiple file attachment hack out yet? I've searched up and down with nothing.
https://vborg.vbsupport.ru/showthrea...441#post313441

Quote:

I've also been looking for a way to play random sounds (.wav) from anywhere on vB when recieving a PM.
This code will produce the file name in this format : "soundX.wav". X will be randomly between 1 to 10. I guess you can insert it to this hack
PHP Code:

function make_seed() {list($usec$sec) = explode(' 'microtime());return (float) $sec + ((float) $usec 100000);}
    
srand(make_seed()); $srand_code rand (1,10);
$wav_file='sound'.$srand_code.'.wav'

Use "$wav_file" variable instead of file name in that hack..

Boofo 12-08-2002 01:30 PM

Sinan, I tried to get that function to work with that hack but couldn't get it to do it. :)

Logician 12-08-2002 01:44 PM

Quote:

Originally posted by Boofo
Sinan, I tried to get that function to work with that hack but couldn't get it to do it. :)
Can u please post the code u used?

BTW. long time no see, where have u been? :)

Boofo 12-08-2002 02:02 PM

Here's the block of code I tried to use. It works with his sound file.

PHP Code:

 if ($newpm['messages']==0) {
    
$lightbulb='off';
  } else {
    
$lightbulb='on';
  }

function 
make_seed() {list($usec$sec) = explode(' 'microtime());return (float) $sec + ((float) $usec 100000);}
    
srand(make_seed()); $srand_code rand (1,10);
$wav_file='sound'.$srand_code.'wav';

//new PM sound hack
if ($unreadpm['messages']==0) {
$sound='';
} else {
$sound='<embed src="$wav_file" autostart="true" hidden="true">';
}
//end new PM sound hack 

Yeah, it's been a while. ;) The wife just gave birth to twin boys about 4 weeks ago. She was on complete bedrest for the last couple of months of the pregnancy, due to complications, so I was taking care of her and our 5-year-old. :)

350Chevy 12-08-2002 03:07 PM

Holy crap I can't believe I missed that! Many many thanks! :D

350Chevy 12-08-2002 07:53 PM

Fatal error: Cannot redeclare make_seed() (previously declared in /var/home/ls6/www/htdocs/forums/index.php:75) in /var/home/ls6/www/htdocs/forums/index.php on line 275

Yup, didn't work for me either. :)

Logician 12-08-2002 08:16 PM

@boofo:

change this line
PHP Code:

$sound='<embed src="$wav_file" autostart="true" hidden="true">'

like this:
PHP Code:

$sound='<embed src="'.$wav_file.'" autostart="true" hidden="true">'

also congratulations! ;)

@350Chevy: remove this line:
PHP Code:

function make_seed() {list($usec$sec) = explode(' 'microtime());return (float) $sec + ((float) $usec 100000);} 

I guess you are using my birthday greetings hack or another hack which uses the exact function, that's why you got this error..

Boofo 12-08-2002 08:38 PM

Thank you for the congratulations. It has been well worth the trip. ;)

I still get no sound for pms from the code you had me change. :)

350Chevy 12-08-2002 10:56 PM

Quote:

Originally posted by Logician
@350Chevy: remove this line:
PHP Code:

function make_seed() {list($usec$sec) = explode(' 'microtime());return (float) $sec + ((float) $usec 100000);} 

I guess you are using my birthday greetings hack or another hack which uses the exact function, that's why you got this error..

You are correct but it still plays no sound. I've also tried to change the line to something like this:

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>'

And still nothing.. I've used $srand_code = rand (1,10) with no results, then changed it to $srand_snd thinking I needed a different string name considering the birthday mod installed and still nada. So I dunno... :)


All times are GMT. The time now is 10:03 AM.

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.01281 seconds
  • Memory Usage 1,755KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete