You are here

function imagepicker_get_insert_template in Image Picker 6.2

Same name and namespace in other branches
  1. 7 imagepicker.functions.inc \imagepicker_get_insert_template()
1 call to imagepicker_get_insert_template()
theme_imagepicker_iframe in ./imagepicker.module

File

./imagepicker.functions.inc, line 2980
Imagepicker functions

Code

function imagepicker_get_insert_template() {
  $file = IMAGEPICKER_PATH . DIRECTORY_SEPARATOR . IMAGEPICKER_INSERT_TEMPLATE;
  $t = '<div class="imgp_title">__TITLE__</div>__INSERT__<div class="imgp_desc">__DESC__</div>';
  $template = '';
  if (file_exists($file)) {

    // for php 4
    $handle = fopen($file, "r");
    $template = fread($handle, filesize($file));
    fclose($handle);

    //$template = file_get_contents($file);
  }
  if ($template) {
    return $template;
  }
  return $t;
}