Previous Thread
Next Thread
Print Thread
Rate Thread
#179685 11/01/2002 3:15 PM
Joined: Jun 2001
Posts: 729
Coder
Coder
Offline
Joined: Jun 2001
Posts: 729
I did not want to continue building ont he 6.3 thread since I am on a differnt version. I am still trying to get the chat to properly display sounds in a drop down. The drop down appears but for some reason it is not reading in the files. I can use the command or link button to produce the sounds so I know the file locations are correct.

Link:
http://www.hostboard.com/cgi-bin/ultimatebb.cgi?ubb=chat

Here is what I have:

Code
	}
$ImportantButtons = qq~<table width="$vars_chat{Width}" border="0" cellspacing="0" cellpadding="0" align="center"><tr><td width="100%">~;
if ($vars_chat{Invite}) {
$ImportantButtons .= qq~<font face="$vars_style{FontFace}" size="$vars_style{TextSize}"><a href="$vars_config{CGIURL}/ultimatebb.cgi?ubb=newinvite" target="_blank"><img src="chat_envelope.gif" alt="$vars_wordlets_mods{chat_send_invitation}" border="0" /> $vars_wordlets_mods{chat_send_invitation}</a></font></td>~;

local(*DIR);
opendir(DIR, "$vars_config{NonCGIPath}") &#0124;&#0124; die "can't opendir NonCGI dir: $!";
my @sounds = grep { /sound_.*?.au/ } readdir(DIR);
closedir DIR;

$ImportantButtons .= qq~<td align="center">n<form id="sound">n<select id="sounds" onchange="if(sound.sounds.options[sound.sounds.selectedIndex].value != '') { jchat.processJInput('/s '+sound.sounds.options[sound.sounds.selectedIndex].value) }">n<option value="" selected="selected">$vars_wordlets_mods{chat_sounds}</option>n<option value="">------------</option>n~;
}
So where or what did I do wrong?

Sponsored Links
#179686 11/01/2002 4:01 PM
Joined: Aug 2000
Posts: 874
Moderator / Developer
Moderator / Developer
Offline
Joined: Aug 2000
Posts: 874
Code
	}
$ImportantButtons = qq~<table width="$vars_chat{Width}" border="0" cellspacing="0" cellpadding="0" align="center"><tr><td width="100%">~;
if ($vars_chat{Invite}) {
$ImportantButtons .= qq~<font face="$vars_style{FontFace}" size="$vars_style{TextSize}"><a href="$vars_config{CGIURL}/ultimatebb.cgi?ubb=newinvite" target="_blank"><img src="chat_envelope.gif" alt="$vars_wordlets_mods{chat_send_invitation}" border="0" /> $vars_wordlets_mods{chat_send_invitation}</a></font></td>~;
local(*DIR);
opendir(DIR, "$vars_config{NonCGIPath}") &#0124;&#0124; die "can't opendir NonCGI dir: $!";
my @sounds = grep { /sound_.*?.au/ } readdir(DIR);
closedir DIR;
$ImportantButtons .= qq~<td align="center">n<form id="sound">n<select id="sounds" onchange="if(sound.sounds.options[sound.sounds.selectedIndex].value != '') { jchat.processJInput('/s '+sound.sounds.options[sound.sounds.selectedIndex].value) }">n<option value="" selected="selected">$vars_wordlets_mods{chat_sounds}</option>n<option value="">------------</option>~;
foreach (@sounds) {
$ImportantButtons .=qq~<option value="$_">$_</option>~;
}
$ImportantButtons .=qq~</select></form>n~;
}

#179687 11/01/2002 5:23 PM
Joined: Jun 2001
Posts: 729
Coder
Coder
Offline
Joined: Jun 2001
Posts: 729
Ok. the sounds now properly show up smile But, they are not played.

When I click on the sound button and enter "yes" it playes "yes"

If I select it from the drop down I get nothing.

The output to the applet is a bit differnt between the 2.

The working one shows:
Guest SOUND yes

The one that does nto work shows:
Guest SOUND sound_yes.au

#179688 11/01/2002 5:25 PM
Joined: Jun 2001
Posts: 729
Coder
Coder
Offline
Joined: Jun 2001
Posts: 729
BTW, is there a modification that will only lengthen the 1 topic's dialog leaving the rest in the default size?

#179689 11/01/2002 6:00 PM
Joined: Aug 2000
Posts: 874
Moderator / Developer
Moderator / Developer
Offline
Joined: Aug 2000
Posts: 874
try this:

Code
	}
$ImportantButtons = qq~<table width="$vars_chat{Width}" border="0" cellspacing="0" cellpadding="0" align="center"><tr><td width="100%">~;
if ($vars_chat{Invite}) {
$ImportantButtons .= qq~<font face="$vars_style{FontFace}" size="$vars_style{TextSize}"><a href="$vars_config{CGIURL}/ultimatebb.cgi?ubb=newinvite" target="_blank"><img src="chat_envelope.gif" alt="$vars_wordlets_mods{chat_send_invitation}" border="0" /> $vars_wordlets_mods{chat_send_invitation}</a></font></td>~;
local(*DIR);
opendir(DIR, "$vars_config{NonCGIPath}") &#0124;&#0124; die "can't opendir NonCGI dir: $!";
my @sounds = grep { /sound_.*?.au/ } readdir(DIR);
closedir DIR;
$ImportantButtons .= qq~<td align="center">n<form id="sound">n<select id="sounds" onchange="if(sound.sounds.options[sound.sounds.selectedIndex].value != '') { jchat.processJInput('/s '+sound.sounds.options[sound.sounds.selectedIndex].value) }">n<option value="" selected="selected">$vars_wordlets_mods{chat_sounds}</option>n<option value="">------------</option>~;
foreach (@sounds) {
if ($_ =~ /(sound_)(.+)(.au)/) {
$ImportantButtons .=qq~<option value="$2">$2</option>~;
}
}
$ImportantButtons .=qq~</select></form>n~;
}

Sponsored Links
#179690 11/01/2002 6:47 PM
Joined: Jun 2001
Posts: 729
Coder
Coder
Offline
Joined: Jun 2001
Posts: 729
Ding, ding we have a winner! Works perfectly smile

As always thanx!!!


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Ruben Rocha
Ruben Rocha
Lutz,FL,USA
Posts: 254
Joined: January 2000
Forum Statistics
Forums63
Topics37,575
Posts293,931
Members13,824
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 1
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)