News:

Wondering if this will always be free?  See why free is better.

Main Menu

CAPTCHA Audio Problem With IE

Started by cameronbprince, January 25, 2008, 10:19:04 PM

Previous topic - Next topic

Grudge

I wish I did. Do you have a link to the board you are having the problems on so I can check I get it too and on what browsers?
I'm only a half geek really...

jrcarr

I'm sorry, I should have thought about links.  I have two boards for two different sites.  www.carrscorner.com/yabbse and www.carrscorner.net/yabbse the problem exists with both of the them.  I fixed the problem with the image not showing up on either of them with a change found here on the forum making a change in the Source/Subs-Graphics.php file.  That part works fine now, but the sound doesn't.  Thanks Grudge

Jack
Jack Carr

jrcarr

I've also tried it with IE7 and Firefox.  With Firefox I get absolutely nothing sound wise, though the image works.  With IE7 the image works and I only get the 3 first letters in the audio.

Jack
Jack Carr

SleePy

What change did you make to that file?
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

jrcarr

Quote from: SleePy on February 17, 2008, 11:52:47 AM
What change did you make to that file?
Sorry SleePy, which one? Subs-Graphics.php or Subs-Sounds.php?

Jack
Jack Carr

SleePy

yes to fic your image issue, there may be another reason why this happens if you had to fix both.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

jrcarr

I changed this on about line 1409 of Subs-Graphics.php

  $code_image = imagecreate($total_width, $max_height);


To This:

    if ($gd2)
  $code_image = imagecreatetruecolor($total_width, $max_height);
else
  $code_image = imagecreate($total_width, $max_height);


In the the Subs-Sound.php file I changed line 41 from this:

global $settings, $user_info;


To This:

global $settings, $user_info, $context;


And lines 84 and 85 from this:

header('Content-type: audio/x-wav');
header('Content-Length: ' . $file_size);


to This:

    if (empty($context['browser']['is_ie']))
header('Content-Length: ' . $file_size);


Like I said, the image started working on both forums fine, but the sound on both are still only giving me the first three characters.

Jack
Jack Carr

Grudge

jrcarr,

The:

header('Content-type: audio/x-wav');


should still be there - you only need to add the if statement?
I'm only a half geek really...

Advertisement: