As it is right now, the font and image paths default to an empty string, making the default settings completely useless for TextImage. The administrator has to manually go in and change the paths to the correct path on the server in order for TextImage to find the fonts. By changing the default setting for the textimage_fonts_path and textimage_images_path variables, we can have TextImage working without the user having to manually change these paths in the configuration.

In order for this to work, you have to do a search and replace to change the following:

  variable_get('textimage_fonts_path', '');
  ==> variable_get('textimage_fonts_path', drupal_get_path('module', 'textimage') . '/fonts');
  variable_get('textimage_images_path', '');
  ==> variable_get('textimage_images_path', drupal_get_path('module', 'textimage') . '/captcha-background');

As you can see, it then gets the default paths from module's directory, relative to Drupal's installation folder. Much more user friendly. I'll create a diff patch if you'd prefer that....

Comments

deciphered’s picture

Version: 5.x-1.2 » 5.x-2.x-dev

Something similar will be in a future version.

deciphered’s picture

Status: Active » Fixed

Committed to HEAD and DRUPAL-5--2.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.