Definition

img_assist_loader()
img_assist/img_assist.module, line 484

Description

Output main img_assist interface HTML.

@todo Remove hard-coded TinyMCE integration.

Related topics

Namesort iconDescription
Image Assist PagesAll but img_assist_loader() are in frames.

Code

<?php
function img_assist_loader() {
  
  $editor = arg(2) ? arg(2) : 'textarea';
  
  $output  = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN">'."\n";
  $output .= "<html>\n";
  $output .= "<head>\n";
  $output .= '<title>'. t('Add image') ."</title>\n";
  $output .= "\n<script type=\"text/javascript\"><!--\n";
  $output .= '  var BASE_URL = "'. base_path() .'";'. "\n";
  $output .= "--></script>\n";
  
  $path = drupal_get_path('module', 'img_assist');
  $output .= '<script type="text/javascript" src="'. base_path() . $path .'/img_assist.js"></script>'."\n";
  if ($editor == 'tinymce') {
    $tinymce_path = drupal_get_path('module', 'tinymce');
    $tinymce_js = base_path() . $tinymce_path .'/tinymce/jscripts/tiny_mce/tiny_mce_popup.js';
    $output .= '<script type="text/javascript" src="'. $tinymce_js .'"></script>' . "\n";
  }
  $editor_js = base_path() . $path .'/img_assist_'. $editor .'.js';
  $output .= '<script type="text/javascript" src="'. $editor_js .'"></script>' . "\n";
  
  $output .= "</head>\n\n";
  
  $output .= '<frameset rows="38, *" onload="initLoader()" frameborder="0" border="0" framespacing="0">' . "\n";
  $output .= '<frame name="img_assist_header" src="" class="img_assist_header" noresize="noresize" />' . "\n";
  $output .= '<frame name="img_assist_main" src="" class="img_assist_main" noresize="noresize" />' . "\n";
  $output .= "</frameset>\n";
  
  $output .= "</html>\n";
  echo $output;
}
?>