whynot Posted April 19, 2012 Share Posted April 19, 2012 I found s3captcha captcha jquery plugin. this worked perfectly but i have a problem. my project not in english language and in this plugin images set with english Prefix. in act fruit images ( apple.jpg ,lemon.jpg etc... ) or general images ( rss.jpg , folder.jpg etc ... ) and for captcha message u see this : Verify that you are a human, please choose folder , apple (EXT NAME OF JPG). now if i change message i need to change Prefix images. this not worked because my language not support images prefix. so i need to replace prefix name images to my language . e.x: please select hoş . hoş = apple or çıkan = folder in images. There is a way? thanks For Any Help. setup plugin : $values = array('apple','strawberry','lemon','cherry','pear'); // image names // $imageExt = 'jpg'; // images extension // $imagePath = 's3images/'; // images path // $imageW = '33'; // icon width // $imageH = '33'; // icon height // Desc of owner : ( my problem ) Please note that the way you name your image, is the same name that will be shown at the front end where scipt ask you to select that image. HTML : <form name="demo" action="verify.php" method="post"> <div id="capcha"> <?php include("s3Capcha.php"); ?> </div><br /><br /><br /> <input type="submit" value="Submit" /> </form> s3captcha.php : <?php session_start(); include("s3Config.php"); $rand = mt_rand(0,(sizeof($values)-1)); shuffle($values); $s3Capcha = '<p>Verify that you are a human, please choose <strong>'.$values[$rand]."</strong></p>\n"; for($i=0;$i<sizeof($values);$i++) { $value2[$i] = mt_rand(); $s3Capcha .= '<div><span>'.$values[$i].' <input type="radio" name="s3capcha" value="'.$value2[$i].'"></span><div style="background: url('.$imagePath.$values[$i].'.'.$imageExt.') bottom left no-repeat; width:'.$imageW.'px; height:'.$imageH.'px;cursor:pointer;display:none;" class="img" /></div></div>'."\n"; } $_SESSION['s3capcha'] = $value2[$rand]; echo $s3Capcha; ?> THANKS Link to comment https://forums.phpfreaks.com/topic/261242-replace-array-in-select-of-s3captcha-jquery-plugin/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.