You are here

function _textimage_preset_load_by_name in Textimage 5

load a preset by name

Parameters

name: preset name

2 calls to _textimage_preset_load_by_name()
textimage_image in ./textimage.module
Menu Callback function converts the current textimage path into an image. On first request, the image is returned to the browser from Drupal and then saved to the disk. On subsequent requests (with Clean URLs enabled), the cached image is loaded directly.
textimage_preset_edit_validate in ./textimage.module

File

./textimage.module, line 1078

Code

function _textimage_preset_load_by_name($name) {
  $result = db_query("SELECT pid, name, settings FROM {textimage_preset} WHERE name = '%s'", $name);
  if (db_num_rows($result) == 0) {
    return false;
  }
  else {
    $preset = db_fetch_array($result);
    $preset['settings'] = unserialize($preset['settings']);
    return $preset;
  }
}