Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. You know that example cleared up most of what I wanted to know.. But Seriously do you think I am going to help now ?
  2. I foresee problems!
  3. I'll be honest, I looked at this thread ans skipped it, as there's not really any detail to work with, if you wrote the classes then your know have an idea of where the problem is, if you didn't then any helper would need to dig thought the classes and ask for every little detail, also i don't see a clearly stated problem (ie what your getting / expecting)
  4. It would seam that $value is infact an array, do a vardump($value); and see if you can find the data you want and post the results back here (with the info about the expected results)
  5. You are placing EVERY number from 0 to 60.. so the results your getting are correct.. also $i should be 0 I think you want to limit your replacement, ie every quoted number ie "0" That's just an example
  6. C. try re-installing the internet (just an idea) also a joke!
  7. Something like if($value[0]==$subid && $issubcatticked == false){
  8. This dirname(__FILE__) will return the absolute path to the current file. so IN the controllers, you would have include dirname(__FILE__).'/../scripts/utilities.php'; and IN the gateway, you would have include dirname(__FILE__).'/scripts/utilities.php';
  9. Okay well that should be fine, of course assuming the case is the same, it maybe worth connecting via FTP and checking the permission and file size, while your their upload another font, ie arial.ttf into the captcha folder, then (if no changes were made to the gentium fonts) update captcha.php from $this->fonts = array( dirname(__FILE__) . '/gentium/GenAI102.TTF', dirname(__FILE__) . '/gentium/GenAR102.TTF', dirname(__FILE__) . '/gentium/GenI102.TTF', dirname(__FILE__) . '/gentium/GenR102.TTF'); to $this->fonts = array( dirname(__FILE__) . '/arial.ttf'); assuming that works, you can repeat the test with each font, $this->fonts = array( dirname(__FILE__) . '/gentium/GenAI102.TTF'); then $this->fonts = array( dirname(__FILE__) . '/gentium/GenAR102.TTF'); etc etc
  10. do you have the other 3 files ? GenAR102.TTF GenI102.TTF GenR102.TTF
  11. I knew someone would say it!
  12. okay, the folder that captcha.php is in, you should have another folder called 'gentium' inside that you should have the following fonts GenAI102.TTF GenAR102.TTF GenI102.TTF GenR102.TTF' on unix this is case sensitive So for example this path should be valid /home/xxx/public_html/wp-content/plugins/mm-forms/captcha/gentium/GenAI102.TTF
  13. Here some choice from the manual imagecreatefromgif imagecopymerge imagettftext imagepng And here a basic sample <?php // Create image instances $dest = imagecreatefrompng('background.png'); $src = imagecreatefrompng('sprite.png'); // The text to draw $text = 'Testing...'; // Replace path by your own font path $font = 'arial.ttf'; //colour $black = imagecolorallocate($dest, 0, 0, 0); // Add the text imagettftext($src, 20, 0, 10, 20, $black, $font, $text); // Copy and merge imagecopymerge($dest, $src, 10, 10, 0, 0, 100, 47, 75); imagepng($dest,"newimage.png"); imagedestroy($dest); imagedestroy($src); ?> Hope that helps
  14. Well i did suggest it a few posts back but i didn't have the iframe details I'm glade it works
  15. the font used in imagettftext can't be found or doesn't exists, goto line 60 of captcha.php and check the 7th parameter to check the name (it maybe missing .ttf), or update to another font
  16. I think that was an old rule as you can,
  17. 1. don't label as urgent, unless its in the freelance section 2. use code tags 3. "not working" and "not working properly" isn't much help..
  18. Humm, its kinda hard to follow with so many queries however if you pass the id, logically it should work <iframe width="237" height="270" src="userapplet.php?morelikethis=<?php echo "".$m['musicartist'].""; ?>" name="morelikethis" border="0" frameborder="0"></iframe></div></td> become <iframe width="237" height="270" src="userapplet.php?morelikethis=<?php echo $m['musicartist']."&mid=".$name; ?>" name="morelikethis" border="0" frameborder="0"></iframe></div></td> $name2 = mysql_real_escape_string($_GET['morelikethis']); $sql = sprintf("SELECT * FROM music WHERE musicartist LIKE '%s%%' AND musicartist !='%s' ORDER BY `musicartist` ASC LIMIT 0,6",$name2, $name2); $s = mysql_query($sql) or die(mysql_error()); becomes $name2 = mysql_real_escape_string($_GET['morelikethis']); $mid = (int)$_GET['mid']; $sql = sprintf("SELECT * FROM music WHERE musicartist LIKE '%s%%' AND musicid !=%d ORDER BY `musicartist` ASC LIMIT 0,6",$name2, $mid); $s = mysql_query($sql) or die(mysql_error());
  19. I can't see the problem in the code or on the site, please explain it again!
  20. I think it would be worth seeing the whole code, but i'll look at it in the morning its 4am here.
  21. Is that query ran via ajax ? if so does it pass the v parameter as it would seam that v isn't being passed. Personally i like to pass ID's but this would also work $sql = sprintf("SELECT * FROM music WHERE musicartist LIKE '%s%%' AND musicartist !='%s' ORDER BY `musicartist` ASC LIMIT 0,6",$name2, $name2);
  22. If its changing then its likely it uses the logic i stated in my last post.. the XML is updating a counter of time passed since last active
  23. same logic, just replace $box = imageTTFbbox ( $fontsize, 2, $font, $text ); with a function that breaks the string up into letters then runs a loop using something close to my last post
  24. I'm an idiot %%s% should be %s%% EDIT: removed a '
  25. Oh pants, update to this $sql = sprintf("SELECT * FROM music WHERE musicartist LIKE '%%s%' AND musicid !=%d ORDER BY `musicartist` ASC LIMIT 0,6",$name2, $_GET['v']); $s = mysql_query($sql) or die(mysql_error()); i didn't notice you had used mysql_real_escape_string already
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.