• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Issue with "font size" - Captcha helper

#1
[eluser]ojcarga[/eluser]
Hey guys,

I just found this little problem with setting the font size for the captcha helper, this is the current code and as it is right now, the font size that user set will never work

Code:
if ($use_font == FALSE)
{
        $font_size = 5;
        $x = rand(0, $img_width/($length/3));
        $y = 0;
}
else
{
        $font_size = 16;
        $x = rand(0, $img_width/($length/1.5));
        $y = $font_size+2;
}

I just added that piece of code to my project and it works very well, maybe that should be updated for next version of CI.


Code:
if(isset($data["font_size"]))
    $font_size = $data["font_size"]; //The font size value the user set
else
    $font_size = 16; //Default


if ($use_font == FALSE)
{
        ////$font_size = 5;
        $x = rand(0, $img_width/($length/3));
        $y = 0;
}
else
{
        ////$font_size = 16;
        $x = rand(0, $img_width/($length/1.5));
        $y = $font_size+2;
}

Hope I explained well... let me know what you think Smile

Cheers!


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.