We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    Quote from: Everett at Apr 21, 2009, 04:23 PM

    Couldn’t a bot detect if a form was visible? Google can tell if you’ve hidden text from the visitor using CSS or Javascript and they can dock your SEO rankings accordingly, so I would think bots these days are smart enough to know how a page will render.

    It depends on how you do it. SPForm locates the field off-screen and in a miniscule type size. I fairly sure that bots don’t have time to figure out whether it’s visible. Using visibility: hidden would be more likely to result in a penalty.

    The site in my sig uses a hidden field in the contact page and Google absolutely loves the site.

    BTW, spambots are not always fooled by either captcha or the hidden field. Using other spamproofing options built in to SPForm, however, my site has been totally spam-free for about a year.

      Did I help you? Buy me a beer
      Get my Book: MODX:The Official Guide
      MODX info for everyone: http://bobsguides.com/modx.html
      My MODX Extras
      Bob's Guides is now hosted at A2 MODX Hosting
      • 7690
      • 166 Posts
      spform doesnt have validation? Because when i go to your site and submit the form without typing something, i get a modx error.
        • 3749
        • 24,544 Posts
        Oops. That was a bug introduced in the upgrade to PHP5. Should be fixed now.

        The Revolution version of SPForm has JS validation, but I think the 0.9.6 version does it the old-fasioned way.

        Although it’s usually off, I turned on the spamproof mathstring captcha option so you could see it.
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 9207 ☆ A M B ☆
          • 2,475 Posts
          AHA! Finally set up my log files with the help of a sysadmin who knows what they’re doing...

          The problem with the Veriword CAPTCHA is a division by zero error in /manager/includes/veriword.php on line 173:

          PHP Warning:  imagettftext() [<a href='function.imagettftext'>function.imagettftext</a>]: Could not read font in /var/www/ourdomain/html/manager/includes/veriword.php on line 173, referer: http://www.ourdomain.com/manager/
          9:54 PHP Warning:  Division by zero in /var/www/ourdomain/html/manager/includes/veriword.php on line 147, referer: http://www.ourdomain.com/manager/


          Anyone wanna figure out why
          $text_width     = $box[2]-$box[0];


          Sometimes equals zero, and then results in the division by zero a few lines later? What’s up with the font that this is a problem? Could not read font? Hmmm...
            • 3749
            • 24,544 Posts
            Do you have any extra files in your font folder (e.g. ftp log or SVN files)? If so, Captcha will occasionall pick one at random and try to use it as a font file.

            Another possibility is one or more corrupted font files.
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 9207 ☆ A M B ☆
              • 2,475 Posts
              Wow, Bob, thanks. I had no idea my Linux webserver even HAD a font folder. But where is it?

              Found this link:
              http://www.cfilt.iitb.ac.in/fonts/linuxfonts.html
              But that’s more about ADDING new fonts...

              I am using SVN... maybe that’s what’s causing the confusion. I wouldn’t think my font folder is under SVN control, because everything under SVN control is a folder that I created...
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                That depends on your Linux distribution. Possibly /usr/local/share/fonts/.
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 3749
                  • 24,544 Posts
                  Quote from: Everett at Jun 03, 2009, 11:20 PM

                  Wow, Bob, thanks. I had no idea my Linux webserver even HAD a font folder. But where is it?

                  Found this link:
                  http://www.cfilt.iitb.ac.in/fonts/linuxfonts.html
                  But that’s more about ADDING new fonts...

                  I am using SVN... maybe that’s what’s causing the confusion. I wouldn’t think my font folder is under SVN control, because everything under SVN control is a folder that I created...

                  Sorry, should have been clearer. MODx Captcha has its own font folder with just a handful of fonts in it. veriword.php picks one at random to render the image so if there are non-font files in there, Captcha fails.

                  I moved the font folder and removed the original in my local 0.9.6 install when building SPForm so I can’t find the original but it’s there somewhere. Now that I think about it, I believe the original folder is called ttf and there is also a noises folder nearby that could cause the same problem. Look under manager/includes.

                  FYI veriword.php should be there too. Unfortunately it’s a pain to debug because it uses a php file to create an image and any debugging output just gives you a broken image and no output.

                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting
                    • 3749
                    • 24,544 Posts
                    Quote from: Everett at Jun 04, 2009, 08:16 PM

                    Well, if I have the time and inclination (which I don’t right now), I could probably just modify the valid file names that it’s reading... it’s probably reading the .svn file as a valid font every few times.... that explains the randomness of the error.
                    If there’s an svn file there (or any other non-ttf file), that’s almost certainly the problem. There’s a pretty easy fix.

                    In manager/includes/veriword.php replace this code:

                    while (false !== ($file = $dir->read())) {
                         if($file!="." && $file!=".." && file_exists('./ttf/'.$file) && !is_dir('./ttf/' . $file)) {
                    	$fontstmp[] = './ttf/'.$file;
                         }
                    }


                    With this:

                    while ($file = $dir->read()) {
                    
                        if(strstr($file,'.ttf') ) {  // include only .ttf files
                            $fontstmp[] = $this->dir_font.'/'.$file;
                        }
                    }
                      Did I help you? Buy me a beer
                      Get my Book: MODX:The Official Guide
                      MODX info for everyone: http://bobsguides.com/modx.html
                      My MODX Extras
                      Bob's Guides is now hosted at A2 MODX Hosting
                      • 25663 MODX Staff
                      • 12,272 Posts
                      Bob would that still need to check to make sure that the thing trying to be included is not a directory in case someone drops a font.ttf folder containing multiple fonts into the /manager/includes/ttf ? Unlikely corner case but stranger things have happened. FYI, filed as MODX-780
                        Ryan Thrash, MODX Co-Founder
                        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me